RuntimeVisibleAnnotations_attribute and
RuntimeInvisibleAnnotations_attribute.
To obtain an ParameterAnnotationAttribute object, invoke
getAttribute(ParameterAnnotationsAttribute.invisibleTag)
in MethodInfo.
The obtained attribute is a
runtime invisible annotations attribute.
If the parameter is
ParameterAnnotationAttribute.visibleTag, then the obtained
attribute is a runtime visible one.
| Modifier and Type | Field and Description |
|---|---|
| public static final String | invisibleTag
The name of the |
| public static final String | visibleTag
The name of the |
| Access | Constructor and Description |
|---|---|
| public | ParameterAnnotationsAttribute(ConstPool
constant pool cp, String attribute name ( attrname, byte[] visibleTag or
invisibleTag).the contents of this attribute. It does not
include info)attribute_name_index or
attribute_length.Constructs
a |
| public | ParameterAnnotationsAttribute(ConstPool
constant pool cp, String attribute name ( attrname)visibleTag or
invisibleTag).Constructs an empty
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public AttributeInfo | |
| public Annotation[][] | Returns: Each element of the returned array represents an array of annotations that are associated with each method parameter.Parses the annotations and returns a data structure representing that parsed annotations. |
| pack-priv void | getRefClasses(Map<String, String> classnames)
Overrides javassist.
|
| public int | |
| pack-priv void | renameClass(String
a JVM class name. oldname, String a JVM class name. newname)Overrides javassist.
|
| pack-priv void | |
| public void | setAnnotations(Annotation[][]
the data structure representing the
new annotations. Every element of this array
is an array of params)Annotation and
it represens annotations of each method parameter.Changes the annotations represented by this object according to
the given array of |
| public String |
| invisibleTag | back to summary |
|---|---|
| public static final String invisibleTag The name of the | |
| visibleTag | back to summary |
|---|---|
| public static final String visibleTag The name of the | |
| ParameterAnnotationsAttribute | back to summary |
|---|---|
| public ParameterAnnotationsAttribute(ConstPool cp, String attrname, byte[] info) Constructs
a | |
| ParameterAnnotationsAttribute | back to summary |
|---|---|
| public ParameterAnnotationsAttribute(ConstPool cp, String attrname) Constructs an empty
| |
| ParameterAnnotationsAttribute | back to summary |
|---|---|
pack-priv ParameterAnnotationsAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
| |
| copy | back to summary |
|---|---|
| public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames) Overrides javassist. Copies this attribute and returns a new copy.
| |
| getAnnotations | back to summary |
|---|---|
| public Annotation[][] getAnnotations() Parses the annotations and returns a data structure representing
that parsed annotations. Note that changes of the node values of the
returned tree are not reflected on the annotations represented by
this object unless the tree is copied back to this object by
| |
| getRefClasses | back to summary |
|---|---|
| pack-priv void getRefClasses(Map<String, String> classnames) Overrides javassist.
| |
| numParameters | back to summary |
|---|---|
| public int numParameters() Returns | |
| renameClass | back to summary |
|---|---|
| pack-priv void renameClass(String oldname, String newname) Overrides javassist. | |
| renameClass | back to summary |
|---|---|
| pack-priv void renameClass(Map<String, String> classnames) Overrides javassist.
| |
| setAnnotations | back to summary |
|---|---|
| public void setAnnotations(Annotation[][] params) Changes the annotations represented by this object according to
the given array of
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Returns a string representation of this object.
| |