org.cojen.classfile.attribute
Class ParameterAnnotationsAttr

java.lang.Object
  extended by org.cojen.classfile.Attribute
      extended by org.cojen.classfile.attribute.ParameterAnnotationsAttr
Direct Known Subclasses:
RuntimeInvisibleParameterAnnotationsAttr, RuntimeVisibleParameterAnnotationsAttr

public abstract class ParameterAnnotationsAttr
extends Attribute

Base class for parameter annotations attributes defined for Java 5.

Author:
Brian S O'Neill
See Also:
AnnotationsAttr

Field Summary
 
Fields inherited from class org.cojen.classfile.Attribute
CODE, CONSTANT_VALUE, DEPRECATED, ENCLOSING_METHOD, EXCEPTIONS, INNER_CLASSES, LINE_NUMBER_TABLE, LOCAL_VARIABLE_TABLE, RUNTIME_INVISIBLE_ANNOTATIONS, RUNTIME_INVISIBLE_PARAMETER_ANNOTATIONS, RUNTIME_VISIBLE_ANNOTATIONS, RUNTIME_VISIBLE_PARAMETER_ANNOTATIONS, SIGNATURE, SOURCE_FILE, SYNTHETIC
 
Constructor Summary
ParameterAnnotationsAttr(ConstantPool cp, String name)
           
ParameterAnnotationsAttr(ConstantPool cp, String name, int length, DataInput din)
           
 
Method Summary
 void addAnnotation(int parameter, Annotation annotation)
           
 Annotation[][] getAnnotations()
          First array index is zero-based parameter number.
 Annotation[] getAnnotations(int parameter)
           
 int getLength()
          Returns the length (in bytes) of this attribute in the class file.
 int getParameterCount()
           
 void writeDataTo(DataOutput dout)
          Write just the attribute specific data.
 
Methods inherited from class org.cojen.classfile.Attribute
getAttributes, getConstantPool, getName, getNameConstant, readFrom, writeTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParameterAnnotationsAttr

public ParameterAnnotationsAttr(ConstantPool cp,
                                String name)

ParameterAnnotationsAttr

public ParameterAnnotationsAttr(ConstantPool cp,
                                String name,
                                int length,
                                DataInput din)
                         throws IOException
Throws:
IOException
Method Detail

getAnnotations

public Annotation[][] getAnnotations()
First array index is zero-based parameter number.


getParameterCount

public int getParameterCount()

getAnnotations

public Annotation[] getAnnotations(int parameter)
Parameters:
parameter - zero-based parameter number

addAnnotation

public void addAnnotation(int parameter,
                          Annotation annotation)
Parameters:
parameter - zero-based parameter number

getLength

public int getLength()
Description copied from class: Attribute
Returns the length (in bytes) of this attribute in the class file.

Specified by:
getLength in class Attribute

writeDataTo

public void writeDataTo(DataOutput dout)
                 throws IOException
Description copied from class: Attribute
Write just the attribute specific data. The default implementation writes nothing.

Overrides:
writeDataTo in class Attribute
Throws:
IOException


Copyright © 2004-2011 Brian S O'Neill. All Rights Reserved.