public class TypeAnnotationsAttribute extends AttributeInfo
RuntimeVisibleTypeAnnotations
attribute and
RuntimeInvisibleTypeAnnotations
attribute.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
invisibleTag
The name of the
RuntimeInvisibleTypeAnnotations attribute. |
static java.lang.String |
visibleTag
The name of the
RuntimeVisibleTypeAnnotations attribute. |
Constructor and Description |
---|
TypeAnnotationsAttribute(ConstPool cp,
java.lang.String attrname,
byte[] info)
Constructs a
Runtime(In)VisibleTypeAnnotations_attribute . |
Modifier and Type | Method and Description |
---|---|
AttributeInfo |
copy(ConstPool newCp,
java.util.Map classnames)
Copies this attribute and returns a new copy.
|
int |
numAnnotations()
Returns
num_annotations . |
get, getConstPool, getName, length, set
public static final java.lang.String visibleTag
RuntimeVisibleTypeAnnotations
attribute.public static final java.lang.String invisibleTag
RuntimeInvisibleTypeAnnotations
attribute.public TypeAnnotationsAttribute(ConstPool cp, java.lang.String attrname, byte[] info)
Runtime(In)VisibleTypeAnnotations_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 int numAnnotations()
num_annotations
.public AttributeInfo copy(ConstPool newCp, java.util.Map classnames)
copy
in class AttributeInfo
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted
class names.Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.