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

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

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

Storage class for an enum.


Field Summary
(package private)  AUTFPoolInfo constValue
          Name of the enum member.
(package private)  AUTFPoolInfo typeName
          Name of the enum class.
 
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
tag
 
Constructor Summary
AAnnotationsAttributeInfo.Annotation.EnumMemberValue(char tag, AUTFPoolInfo typeName, AUTFPoolInfo constValue)
          Creates a new enum 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 getConstValue()
          Accessor for the constant value.
 int getSize()
          Returns the size of this value.
 AUTFPoolInfo getTypeName()
          Accessor for the type name.
 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

typeName

AUTFPoolInfo typeName
Name of the enum class.


constValue

AUTFPoolInfo constValue
Name of the enum member.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.EnumMemberValue

public AAnnotationsAttributeInfo.Annotation.EnumMemberValue(char tag,
                                                            AUTFPoolInfo typeName,
                                                            AUTFPoolInfo constValue)
Creates a new enum value.

Parameters:
tag - _type tag
typeName - name of enum class
constValue - name of enum member
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

getTypeName

public AUTFPoolInfo getTypeName()
Accessor for the type name.

Returns:
type name

getConstValue

public AUTFPoolInfo getConstValue()
Accessor for the constant value.

Returns:
constant value

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.