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

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

public static class AAnnotationsAttributeInfo.Annotation.NameValuePair
extends java.lang.Object

Storage class for a name-value pair.


Field Summary
private  AUTFPoolInfo name
          Name.
private  AAnnotationsAttributeInfo.Annotation.AMemberValue value
          Value.
 
Constructor Summary
AAnnotationsAttributeInfo.Annotation.NameValuePair(AUTFPoolInfo name, AAnnotationsAttributeInfo.Annotation.AMemberValue value)
          Creates a new name-value pair.
AAnnotationsAttributeInfo.Annotation.NameValuePair(ConstantPool cp, byte[] data, int start)
          Creates a new name-value pair.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 AUTFPoolInfo getName()
          Accessor for the name.
 int getSize()
          Returns the size of this name-value pair.
 AAnnotationsAttributeInfo.Annotation.AMemberValue getValue()
          Accessor for the value.
 int hashCode()
          Returns a hash code value for the object.
 java.lang.String toString()
          Returns a string representation of the object.
 void writeToByteArrayOutputStream(ConstantPool cp, java.io.ByteArrayOutputStream baos)
          Writes this name-value pair into the stream.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

name

private AUTFPoolInfo name
Name.


value

private AAnnotationsAttributeInfo.Annotation.AMemberValue value
Value.

Constructor Detail

AAnnotationsAttributeInfo.Annotation.NameValuePair

public AAnnotationsAttributeInfo.Annotation.NameValuePair(AUTFPoolInfo name,
                                                          AAnnotationsAttributeInfo.Annotation.AMemberValue value)
Creates a new name-value pair.

Parameters:
name - name
value - value

AAnnotationsAttributeInfo.Annotation.NameValuePair

public AAnnotationsAttributeInfo.Annotation.NameValuePair(ConstantPool cp,
                                                          byte[] data,
                                                          int start)
Creates a new name-value pair.

Parameters:
cp - constant pool
data - data array
start - start index in array
Method Detail

getSize

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

Returns:
size in bytes

writeToByteArrayOutputStream

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

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.

getName

public AUTFPoolInfo getName()
Accessor for the name.

Returns:
name name

getValue

public AAnnotationsAttributeInfo.Annotation.AMemberValue getValue()
Accessor for the value.

Returns:
value

equals

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

hashCode

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