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

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
Direct Known Subclasses:
AAnnotationsAttributeInfo.Annotation.AnnotationMemberValue, AAnnotationsAttributeInfo.Annotation.ArrayMemberValue, AAnnotationsAttributeInfo.Annotation.ClassMemberValue, AAnnotationsAttributeInfo.Annotation.ConstantMemberValue, AAnnotationsAttributeInfo.Annotation.EnumMemberValue
Enclosing class:
AAnnotationsAttributeInfo.Annotation

public abstract static class AAnnotationsAttributeInfo.Annotation.AMemberValue
extends java.lang.Object

Storage class for a member value.


Field Summary
 char tag
          Type tag.
 
Constructor Summary
protected AAnnotationsAttributeInfo.Annotation.AMemberValue(char tag)
          Creates a new member value.
 
Method Summary
abstract  boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
abstract
<R,P> R
execute(AAnnotationsAttributeInfo.Annotation.IMemberValueVisitor<R,P> v, P param)
          Execute a visitor.
abstract  int getSize()
          Returns the size of this value.
 char getTag()
          Returns the tag character of this value.
abstract  int hashCode()
          Returns a hash code value for the object.
static AAnnotationsAttributeInfo.Annotation.AMemberValue read(ConstantPool cp, byte[] data, int start)
          Parses member value data and returns a member value.
abstract  java.lang.String toStringJava()
          Returns a string representation of the object like it would be seen in a Java listing.
abstract  void writeToByteArrayOutputStream(ConstantPool cp, java.io.ByteArrayOutputStream baos)
          Writes this value into the stream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tag

public char tag
Type tag.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.AMemberValue

protected AAnnotationsAttributeInfo.Annotation.AMemberValue(char tag)
Creates a new member value.

Parameters:
tag - _type tag of this value
Method Detail

getSize

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

Returns:
size in bytes

getTag

public char getTag()
Returns the tag character of this value.

Returns:
tag

writeToByteArrayOutputStream

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

Parameters:
cp - constant pool
baos - stream
Throws:
java.io.IOException

read

public static AAnnotationsAttributeInfo.Annotation.AMemberValue read(ConstantPool cp,
                                                                     byte[] data,
                                                                     int start)
Parses member value data and returns a member value.

Parameters:
cp - constant pool
data - data array
start - start index in data array
Returns:
parsed member value

toStringJava

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

Returns:
a string representation of the object.

execute

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

Parameters:
v - visitor
param - visitor-specific parameter
Returns:
visitor-specific return value

hashCode

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

Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.

equals

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

Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.