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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classTypeAnnotationsAttribute.Copier(package private) static classTypeAnnotationsAttribute.Renamer(package private) static classTypeAnnotationsAttribute.SubCopier(package private) static classTypeAnnotationsAttribute.SubWalker(package private) static classTypeAnnotationsAttribute.TAWalkerTo visit each elements of the type annotation attribute, callannotationArray().
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringinvisibleTagThe name of theRuntimeInvisibleTypeAnnotationsattribute.static java.lang.StringvisibleTagThe name of theRuntimeVisibleTypeAnnotationsattribute.-
Fields inherited from class javassist.bytecode.AttributeInfo
constPool, info, name
-
-
Constructor Summary
Constructors Constructor Description TypeAnnotationsAttribute(ConstPool cp, int n, java.io.DataInputStream in)TypeAnnotationsAttribute(ConstPool cp, java.lang.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, java.util.Map classnames)Copies this attribute and returns a new copy.(package private) voidgetRefClasses(java.util.Map classnames)intnumAnnotations()Returnsnum_annotations.(package private) voidrenameClass(java.lang.String oldname, java.lang.String newname)(package private) voidrenameClass(java.util.Map classnames)-
Methods inherited from class javassist.bytecode.AttributeInfo
copyAll, get, getConstPool, getLength, getName, getRefClasses, length, lookup, read, remove, renameClass, renameClass, set, write, writeAll
-
-
-
-
Field Detail
-
visibleTag
public static final java.lang.String visibleTag
The name of theRuntimeVisibleTypeAnnotationsattribute.- See Also:
- Constant Field Values
-
invisibleTag
public static final java.lang.String invisibleTag
The name of theRuntimeInvisibleTypeAnnotationsattribute.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TypeAnnotationsAttribute
public TypeAnnotationsAttribute(ConstPool cp, java.lang.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.
-
TypeAnnotationsAttribute
TypeAnnotationsAttribute(ConstPool cp, int n, java.io.DataInputStream in) throws java.io.IOException
- Parameters:
n- the attribute name.- Throws:
java.io.IOException
-
-
Method Detail
-
numAnnotations
public int numAnnotations()
Returnsnum_annotations.
-
copy
public AttributeInfo copy(ConstPool newCp, java.util.Map 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.
-
renameClass
void renameClass(java.lang.String oldname, java.lang.String newname)- Overrides:
renameClassin classAttributeInfo- Parameters:
oldname- a JVM class name.newname- a JVM class name.
-
renameClass
void renameClass(java.util.Map classnames)
- Overrides:
renameClassin classAttributeInfo
-
getRefClasses
void getRefClasses(java.util.Map classnames)
- Overrides:
getRefClassesin classAttributeInfo
-
-