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

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

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

Storage class for constants.


Field Summary
(package private)  APoolInfo constValue
          Constant value.
 
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
tag
 
Constructor Summary
AAnnotationsAttributeInfo.Annotation.ConstantMemberValue(char tag, APoolInfo constValue)
          Creates a new constant 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.
 APoolInfo getConstValue()
          Accessor for the constant value.
 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

constValue

APoolInfo constValue
Constant value.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.ConstantMemberValue

public AAnnotationsAttributeInfo.Annotation.ConstantMemberValue(char tag,
                                                                APoolInfo constValue)
Creates a new constant value.

Parameters:
tag - _type tag
constValue - constant value
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

getConstValue

public APoolInfo 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.