|
Javassist 3.15.0-GA-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavassist.bytecode.AttributeInfo
javassist.bytecode.ParameterAnnotationsAttribute
public class ParameterAnnotationsAttribute
A class representing 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.
Field Summary | |
---|---|
static String |
invisibleTag
The name of the RuntimeInvisibleParameterAnnotations
attribute. |
static String |
visibleTag
The name of the RuntimeVisibleParameterAnnotations
attribute. |
Fields inherited from class javassist.bytecode.AttributeInfo |
---|
constPool |
Constructor Summary | |
---|---|
ParameterAnnotationsAttribute(ConstPool cp,
String attrname)
Constructs an empty Runtime(In)VisibleParameterAnnotations_attribute . |
|
ParameterAnnotationsAttribute(ConstPool cp,
String attrname,
byte[] info)
Constructs a Runtime(In)VisibleParameterAnnotations_attribute . |
Method Summary | |
---|---|
AttributeInfo |
copy(ConstPool newCp,
Map classnames)
Copies this attribute and returns a new copy. |
Annotation[][] |
getAnnotations()
Parses the annotations and returns a data structure representing that parsed annotations. |
int |
numParameters()
Returns num_parameters . |
void |
setAnnotations(Annotation[][] params)
Changes the annotations represented by this object according to the given array of Annotation objects. |
String |
toString()
Returns a string representation of this object. |
Methods inherited from class javassist.bytecode.AttributeInfo |
---|
get, getConstPool, getName, length, set |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final String visibleTag
RuntimeVisibleParameterAnnotations
attribute.
public static final String invisibleTag
RuntimeInvisibleParameterAnnotations
attribute.
Constructor Detail |
---|
public ParameterAnnotationsAttribute(ConstPool cp, String attrname, byte[] info)
Runtime(In)VisibleParameterAnnotations_attribute
.
cp
- constant poolattrname
- attribute name (visibleTag
or
invisibleTag
).info
- the contents of this attribute. It does not
include attribute_name_index
or
attribute_length
.public ParameterAnnotationsAttribute(ConstPool cp, String attrname)
Runtime(In)VisibleParameterAnnotations_attribute
.
A new annotation can be later added to the created attribute
by setAnnotations()
.
cp
- constant poolattrname
- attribute name (visibleTag
or
invisibleTag
).setAnnotations(Annotation[][])
Method Detail |
---|
public int numParameters()
num_parameters
.
public AttributeInfo copy(ConstPool newCp, Map classnames)
copy
in class AttributeInfo
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted
class names.public Annotation[][] getAnnotations()
setAnnotations()
.
setAnnotations(Annotation[][])
public void setAnnotations(Annotation[][] params)
Annotation
objects.
params
- the data structure representing the
new annotations. Every element of this array
is an array of Annotation
and
it represens annotations of each method parameter.public String toString()
toString
in class Object
|
Javassist 3.15.0-GA-redhat-2 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |