Package javassist.bytecode
Class TypeAnnotationsAttribute
- java.lang.Object
-
- javassist.bytecode.AttributeInfo
-
- javassist.bytecode.TypeAnnotationsAttribute
-
public class TypeAnnotationsAttribute extends AttributeInfo
A class representingRuntimeVisibleTypeAnnotationsattribute andRuntimeInvisibleTypeAnnotationsattribute.- Since:
- 3.19
-
-
Field Summary
Fields Modifier and Type Field Description static StringinvisibleTagThe name of theRuntimeInvisibleTypeAnnotationsattribute.static StringvisibleTagThe name of theRuntimeVisibleTypeAnnotationsattribute.
-
Constructor Summary
Constructors Constructor Description TypeAnnotationsAttribute(ConstPool cp, String attrname, byte[] info)Constructs aRuntime(In)VisibleTypeAnnotations_attribute.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeInfocopy(ConstPool newCp, Map<String,String> classnames)Copies this attribute and returns a new copy.intnumAnnotations()Returnsnum_annotations.-
Methods inherited from class javassist.bytecode.AttributeInfo
get, getConstPool, getName, length, set
-
-
-
-
Field Detail
-
visibleTag
public static final String visibleTag
The name of theRuntimeVisibleTypeAnnotationsattribute.- See Also:
- Constant Field Values
-
invisibleTag
public static final String invisibleTag
The name of theRuntimeInvisibleTypeAnnotationsattribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TypeAnnotationsAttribute
public TypeAnnotationsAttribute(ConstPool cp, String attrname, byte[] info)
Constructs aRuntime(In)VisibleTypeAnnotations_attribute.- Parameters:
cp- constant poolattrname- attribute name (visibleTagorinvisibleTag).info- the contents of this attribute. It does not includeattribute_name_indexorattribute_length.
-
-
Method Detail
-
numAnnotations
public int numAnnotations()
Returnsnum_annotations.
-
copy
public AttributeInfo copy(ConstPool newCp, Map<String,String> classnames)
Copies this attribute and returns a new copy.- Overrides:
copyin classAttributeInfo- Parameters:
newCp- the constant pool table used by the new copy.classnames- pairs of replaced and substituted class names.
-
-