edu.rice.cs.cunit.classFile.attributes
Class AAnnotationsAttributeInfo.Annotation.ClassMemberValue

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
      extended by edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.ClassMemberValue
Enclosing class:
AAnnotationsAttributeInfo.Annotation

public static class AAnnotationsAttributeInfo.Annotation.ClassMemberValue
extends AAnnotationsAttributeInfo.Annotation.AMemberValue

Storage class for a class value.


Field Summary
(package private)  AUTFPoolInfo classNameInfo
          Class name info.
 
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
tag
 
Constructor Summary
AAnnotationsAttributeInfo.Annotation.ClassMemberValue(char tag, AUTFPoolInfo classNameInfo)
          Creates a new class value.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
<R,P> R
execute(AAnnotationsAttributeInfo.Annotation.IMemberValueVisitor<R,P> v, P param)
          Execute a visitor.
 AUTFPoolInfo getClassName()
          Accessor for the class name.
 int getSize()
          Returns the size of this value.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of the object.
 java.lang.String toStringJava()
          Returns a string representation of the object like it would be seen in a Java listing.
 void writeToByteArrayOutputStream(ConstantPool cp, java.io.ByteArrayOutputStream baos)
          Writes this value into the stream.
 
Methods inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
getTag, read
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

classNameInfo

AUTFPoolInfo classNameInfo
Class name info. NOTE: Apparently this is an UTF item and not a CLASS item as documented.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.ClassMemberValue

public AAnnotationsAttributeInfo.Annotation.ClassMemberValue(char tag,
                                                             AUTFPoolInfo classNameInfo)
Creates a new class value.

Parameters:
tag - _type tag
classNameInfo - class name info
Method Detail

getSize

public int getSize()
Returns the size of this value.

Specified by:
getSize in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Returns:
size in bytes

writeToByteArrayOutputStream

public void writeToByteArrayOutputStream(ConstantPool cp,
                                         java.io.ByteArrayOutputStream baos)
                                  throws java.io.IOException
Writes this value into the stream.

Specified by:
writeToByteArrayOutputStream in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Parameters:
cp - constant pool
baos - stream
Throws:
java.io.IOException

toString

public java.lang.String toString()
Returns a string representation of the object.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the object.

toStringJava

public java.lang.String toStringJava()
Returns a string representation of the object like it would be seen in a Java listing.

Specified by:
toStringJava in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Returns:
a string representation of the object.

execute

public <R,P> R execute(AAnnotationsAttributeInfo.Annotation.IMemberValueVisitor<R,P> v,
                       P param)
Execute a visitor.

Specified by:
execute in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Parameters:
v - visitor
param - visitor-specific parameter
Returns:
visitor-specific return value

getClassName

public AUTFPoolInfo getClassName()
Accessor for the class name.

Returns:
class name

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.

Specified by:
equals in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object.

Specified by:
hashCode in class AAnnotationsAttributeInfo.Annotation.AMemberValue
Returns:
a hash code value for this object.