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

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

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

Storage class for an array.


Field Summary
(package private)  AAnnotationsAttributeInfo.Annotation.AMemberValue[] entries
          Array of values.
(package private)  int numEntries
          Number of entries in array.
 
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo.Annotation.AMemberValue
tag
 
Constructor Summary
AAnnotationsAttributeInfo.Annotation.ArrayMemberValue(char tag, int numEntries, AAnnotationsAttributeInfo.Annotation.AMemberValue[] entries)
          Creates a new array.
AAnnotationsAttributeInfo.Annotation.ArrayMemberValue(ConstantPool cp, byte[] data, int start)
          Creates a new array.
 
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.
 AAnnotationsAttributeInfo.Annotation.AMemberValue[] getEntries()
          Accessor for the entries.
 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

numEntries

int numEntries
Number of entries in array.


entries

AAnnotationsAttributeInfo.Annotation.AMemberValue[] entries
Array of values.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.ArrayMemberValue

public AAnnotationsAttributeInfo.Annotation.ArrayMemberValue(char tag,
                                                             int numEntries,
                                                             AAnnotationsAttributeInfo.Annotation.AMemberValue[] entries)
Creates a new array.

Parameters:
tag - _type tag
numEntries - number of entries
entries - array of entries

AAnnotationsAttributeInfo.Annotation.ArrayMemberValue

public AAnnotationsAttributeInfo.Annotation.ArrayMemberValue(ConstantPool cp,
                                                             byte[] data,
                                                             int start)
Creates a new array.

Parameters:
cp - constant pool
data - data arrat
start - start index in array
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

getEntries

public AAnnotationsAttributeInfo.Annotation.AMemberValue[] getEntries()
Accessor for the entries.

Returns:
entries.

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.