edu.rice.cs.cunit.classFile.attributes
Class ASingleAnnotationsAttributeInfo

java.lang.Object
  extended by edu.rice.cs.cunit.classFile.attributes.AAttributeInfo
      extended by edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo
          extended by edu.rice.cs.cunit.classFile.attributes.ASingleAnnotationsAttributeInfo
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
RuntimeInvisibleAnnotationsAttributeInfo, RuntimeVisibleAnnotationsAttributeInfo

public abstract class ASingleAnnotationsAttributeInfo
extends AAnnotationsAttributeInfo

Represents a single abstract Annotations attribute in a class file.

Author:
Mathias Ricken

Nested Class Summary
 
Nested classes/interfaces inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo
AAnnotationsAttributeInfo.Annotation
 
Field Summary
 
Fields inherited from class edu.rice.cs.cunit.classFile.attributes.AAttributeInfo
_constantPool, _data, _name
 
Constructor Summary
ASingleAnnotationsAttributeInfo(AUTFPoolInfo name, byte[] data, ConstantPool cp)
          Creates a new abstract parameter annotations attribute.
 
Method Summary
 java.lang.Object clone()
          Creates and returns a copy of this object.
 int getAnnotationCount()
          Return the number of annotations.
 AAnnotationsAttributeInfo.Annotation[] getAnnotations()
          Return the annotations list.
 void setAnnotations(AAnnotationsAttributeInfo.Annotation[] ann)
          Set the annotations list.
 java.lang.String toString()
          Return a human-readable version of this attribute.
 
Methods inherited from class edu.rice.cs.cunit.classFile.attributes.AAnnotationsAttributeInfo
adjustPC, translatePC
 
Methods inherited from class edu.rice.cs.cunit.classFile.attributes.AAttributeInfo
equals, execute, getData, getName, hashCode, read, setData, setName, write
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ASingleAnnotationsAttributeInfo

public ASingleAnnotationsAttributeInfo(AUTFPoolInfo name,
                                       byte[] data,
                                       ConstantPool cp)
Creates a new abstract parameter annotations attribute.

Parameters:
name - name of attribute
data - data array
cp - constant pool
Method Detail

getAnnotationCount

public int getAnnotationCount()
                       throws java.lang.ClassFormatError
Return the number of annotations.

Returns:
number of exceptions
Throws:
java.lang.ClassFormatError

getAnnotations

public AAnnotationsAttributeInfo.Annotation[] getAnnotations()
                                                      throws java.lang.ClassFormatError
Return the annotations list.

Returns:
list of annotations.
Throws:
java.lang.ClassFormatError

setAnnotations

public void setAnnotations(AAnnotationsAttributeInfo.Annotation[] ann)
                    throws java.io.IOException
Set the annotations list.

Parameters:
ann - list of checked exceptions
Throws:
java.lang.ClassFormatError
java.io.IOException

toString

public java.lang.String toString()
Return a human-readable version of this attribute.

Overrides:
toString in class AAttributeInfo
Returns:
string

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException
Creates and returns a copy of this object.

Overrides:
clone in class AAnnotationsAttributeInfo
Throws:
java.lang.CloneNotSupportedException