Package javassist.bytecode
Class TypeAnnotationsAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.TypeAnnotationsAttribute
A class representing
RuntimeVisibleTypeAnnotations
attribute and
RuntimeInvisibleTypeAnnotations
attribute.- Since:
- 3.19
-
Field Summary
-
Constructor Summary
ConstructorDescriptionTypeAnnotationsAttribute
(ConstPool cp, String attrname, byte[] info) Constructs aRuntime(In)VisibleTypeAnnotations_attribute
. -
Method Summary
Modifier and TypeMethodDescriptionCopies this attribute and returns a new copy.int
Returnsnum_annotations
.Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
Field Details
-
visibleTag
The name of theRuntimeVisibleTypeAnnotations
attribute.- See Also:
-
invisibleTag
The name of theRuntimeInvisibleTypeAnnotations
attribute.- See Also:
-
-
Constructor Details
-
TypeAnnotationsAttribute
Constructs aRuntime(In)VisibleTypeAnnotations_attribute
.- Parameters:
cp
- constant poolattrname
- attribute name (visibleTag
orinvisibleTag
).info
- the contents of this attribute. It does not includeattribute_name_index
orattribute_length
.
-
-
Method Details
-
numAnnotations
public int numAnnotations()Returnsnum_annotations
. -
copy
Copies this attribute and returns a new copy.- Overrides:
copy
in classAttributeInfo
- Parameters:
newCp
- the constant pool table used by the new copy.classnames
- pairs of replaced and substituted class names.
-