Top Description Inners Fields Constructors Methods
javassist.bytecode

public Class TypeAnnotationsAttribute

extends AttributeInfo
Class Inheritance
Imports
java.io.DataInputStream, .IOException, java.util.HashMap, .Map, javassist.bytecode.annotation.TypeAnnotationsWriter

A class representing RuntimeVisibleTypeAnnotations attribute and RuntimeInvisibleTypeAnnotations attribute.
Since
3.19

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
pack-priv static class
TypeAnnotationsAttribute.TAWalker

To visit each elements of the type annotation attribute, call annotationArray().

Field Summary

Modifier and TypeField and Description
public static final String
invisibleTag

The name of the RuntimeInvisibleTypeAnnotations attribute.

public static final String
visibleTag

The name of the RuntimeVisibleTypeAnnotations attribute.

Inherited from javassist.bytecode.AttributeInfo:
constPoolinfoname

Constructor Summary

AccessConstructor and Description
public
TypeAnnotationsAttribute(ConstPool
constant pool
cp
,
String
attribute name (visibleTag or invisibleTag).
attrname
,
byte[]
the contents of this attribute. It does not include attribute_name_index or attribute_length.
info
)

Constructs a Runtime(In)VisibleTypeAnnotations_attribute.

pack-priv
TypeAnnotationsAttribute(ConstPool cp, int
the attribute name.
n
,
DataInputStream in)

Method Summary

Modifier and TypeMethod and Description
public AttributeInfo
copy(ConstPool
the constant pool table used by the new copy.
newCp
,
Map<String, String>
pairs of replaced and substituted class names.
classnames
)

Overrides javassist.bytecode.AttributeInfo.copy.

Copies this attribute and returns a new copy.

pack-priv void
public int
numAnnotations()

Returns num_annotations.

pack-priv void
renameClass(String
a JVM class name.
oldname
,
String
a JVM class name.
newname
)

Overrides javassist.bytecode.AttributeInfo.renameClass.

pack-priv void
Inherited from javassist.bytecode.AttributeInfo:
copyAllgetgetConstPoolgetLengthgetNamegetRefClasseslengthlookupreadremoverenameClassrenameClasssetwritewriteAll

Field Detail

invisibleTagback to summary
public static final String invisibleTag

The name of the RuntimeInvisibleTypeAnnotations attribute.

visibleTagback to summary
public static final String visibleTag

The name of the RuntimeVisibleTypeAnnotations attribute.

Constructor Detail

TypeAnnotationsAttributeback to summary
public TypeAnnotationsAttribute(ConstPool cp, String attrname, byte[] info)

Constructs a Runtime(In)VisibleTypeAnnotations_attribute.

Parameters
cp:ConstPool

constant pool

attrname:String

attribute name (visibleTag or invisibleTag).

info:byte[]

the contents of this attribute. It does not include attribute_name_index or attribute_length.

TypeAnnotationsAttributeback to summary
pack-priv TypeAnnotationsAttribute(ConstPool cp, int n, DataInputStream in) throws IOException
Parameters
n:int

the attribute name.

Method Detail

copyback to summary
public AttributeInfo copy(ConstPool newCp, Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.copy.

Copies this attribute and returns a new copy.

Parameters
newCp:ConstPool

Doc from javassist.bytecode.AttributeInfo.copy.

the constant pool table used by the new copy.

classnames:Map<String, String>

Doc from javassist.bytecode.AttributeInfo.copy.

pairs of replaced and substituted class names.

Annotations
@Override
getRefClassesback to summary
pack-priv void getRefClasses(Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.getRefClasses.

Annotations
@Override
numAnnotationsback to summary
public int numAnnotations()

Returns num_annotations.

renameClassback to summary
pack-priv void renameClass(String oldname, String newname)

Overrides javassist.bytecode.AttributeInfo.renameClass.

Parameters
oldname:String

a JVM class name.

newname:String

a JVM class name.

Annotations
@Override
renameClassback to summary
pack-priv void renameClass(Map<String, String> classnames)

Overrides javassist.bytecode.AttributeInfo.renameClass.

Annotations
@Override
javassist.bytecode back to summary

pack-priv Class TypeAnnotationsAttribute.Copier

extends Copier
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv TypeAnnotationsAttribute.SubCopier
Inherited from javassist.bytecode.AnnotationsAttribute.Copier:
classnamesdestPooloutputsrcPoolwriter

Constructor Summary

AccessConstructor and Description
pack-priv
Copier(byte[] attrInfo, ConstPool src, ConstPool dest, Map<String, String> map)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
Inherited from javassist.bytecode.AnnotationsAttribute.Copier:
annotationannotationMemberValuearrayMemberValueclassMemberValuecloseconstValueMembercopycopyTypeenumMemberValuememberValuePairparameters

Field Detail

subback to summary
pack-priv TypeAnnotationsAttribute.SubCopier sub

Constructor Detail

Copierback to summary
pack-priv Copier(byte[] attrInfo, ConstPool src, ConstPool dest, Map<String, String> map)

Method Detail

annotationArrayback to summary
pack-priv int annotationArray(int pos, int num) throws Exception

Overrides javassist.bytecode.AnnotationsAttribute.Copier.annotationArray.

Annotations
@Override
javassist.bytecode back to summary

pack-priv Class TypeAnnotationsAttribute.Renamer

extends Renamer
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv TypeAnnotationsAttribute.SubWalker
Inherited from javassist.bytecode.AnnotationsAttribute.Renamer:
classnamescpool

Constructor Summary

AccessConstructor and Description
pack-priv
Renamer(byte[] attrInfo, ConstPool cp, Map<String, String> map)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
Inherited from javassist.bytecode.AnnotationsAttribute.Renamer:
annotationclassMemberValueenumMemberValue

Field Detail

subback to summary
pack-priv TypeAnnotationsAttribute.SubWalker sub

Constructor Detail

Renamerback to summary
pack-priv Renamer(byte[] attrInfo, ConstPool cp, Map<String, String> map)

Method Detail

annotationArrayback to summary
pack-priv int annotationArray(int pos, int num) throws Exception

Overrides javassist.bytecode.AnnotationsAttribute.Walker.annotationArray.

Annotations
@Override
javassist.bytecode back to summary

pack-priv Class TypeAnnotationsAttribute.SubCopier

extends SubWalker
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv Map<String, String>
pack-priv ConstPool
pack-priv ConstPool
pack-priv TypeAnnotationsWriter
Inherited from javassist.bytecode.TypeAnnotationsAttribute.SubWalker:
info

Constructor Summary

AccessConstructor and Description
pack-priv
SubCopier(byte[] attrInfo, ConstPool src, ConstPool dest, Map<String, String> map, TypeAnnotationsWriter w)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
pack-priv void
pack-priv void
pack-priv int
pack-priv void
localvarTarget(int pos, int targetType, int startPc, int length, int index)

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.localvarTarget.

pack-priv void
pack-priv void
pack-priv void
pack-priv void
typeArgumentTarget(int pos, int targetType, int offset, int typeArgumentIndex)

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typeArgumentTarget.

pack-priv void
typeParameterBoundTarget(int pos, int targetType, int typeParameterIndex, int boundIndex)

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typeParameterBoundTarget.

pack-priv void
pack-priv int
pack-priv void
typePath(int pos, int typePathKind, int typeArgumentIndex)

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typePath.

Inherited from javassist.bytecode.TypeAnnotationsAttribute.SubWalker:
targetInfotypePath

Field Detail

classnamesback to summary
pack-priv Map<String, String> classnames
destPoolback to summary
pack-priv ConstPool destPool
srcPoolback to summary
pack-priv ConstPool srcPool
writerback to summary
pack-priv TypeAnnotationsWriter writer

Constructor Detail

SubCopierback to summary
pack-priv SubCopier(byte[] attrInfo, ConstPool src, ConstPool dest, Map<String, String> map, TypeAnnotationsWriter w)

Method Detail

catchTargetback to summary
pack-priv void catchTarget(int pos, int exceptionTableIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.catchTarget.

Annotations
@Override
emptyTargetback to summary
pack-priv void emptyTarget(int pos, int targetType) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.emptyTarget.

Annotations
@Override
formalParameterTargetback to summary
pack-priv void formalParameterTarget(int pos, int formalParameterIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.formalParameterTarget.

Annotations
@Override
localvarTargetback to summary
pack-priv int localvarTarget(int pos, int targetType, int tableLength) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.localvarTarget.

Annotations
@Override
localvarTargetback to summary
pack-priv void localvarTarget(int pos, int targetType, int startPc, int length, int index) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.localvarTarget.

Annotations
@Override
offsetTargetback to summary
pack-priv void offsetTarget(int pos, int targetType, int offset) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.offsetTarget.

Annotations
@Override
supertypeTargetback to summary
pack-priv void supertypeTarget(int pos, int superTypeIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.supertypeTarget.

Annotations
@Override
throwsTargetback to summary
pack-priv void throwsTarget(int pos, int throwsTypeIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.throwsTarget.

Annotations
@Override
typeArgumentTargetback to summary
pack-priv void typeArgumentTarget(int pos, int targetType, int offset, int typeArgumentIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typeArgumentTarget.

Annotations
@Override
typeParameterBoundTargetback to summary
pack-priv void typeParameterBoundTarget(int pos, int targetType, int typeParameterIndex, int boundIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typeParameterBoundTarget.

Annotations
@Override
typeParameterTargetback to summary
pack-priv void typeParameterTarget(int pos, int targetType, int typeParameterIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typeParameterTarget.

Annotations
@Override
typePathback to summary
pack-priv int typePath(int pos, int pathLength) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typePath.

Annotations
@Override
typePathback to summary
pack-priv void typePath(int pos, int typePathKind, int typeArgumentIndex) throws Exception

Overrides javassist.bytecode.TypeAnnotationsAttribute.SubWalker.typePath.

Annotations
@Override
javassist.bytecode back to summary

pack-priv Class TypeAnnotationsAttribute.SubWalker

extends Object
Class Inheritance
Known Direct Subclasses
javassist.bytecode.TypeAnnotationsAttribute.SubCopier

Field Summary

Modifier and TypeField and Description
pack-priv byte[]

Constructor Summary

AccessConstructor and Description
pack-priv
SubWalker(byte[] attrInfo)

Method Summary

Modifier and TypeMethod and Description
pack-priv void
catchTarget(int pos, int exceptionTableIndex)

pack-priv void
emptyTarget(int pos, int targetType)

pack-priv void
formalParameterTarget(int pos, int formalParameterIndex)

pack-priv int
localvarTarget(int pos, int targetType, int tableLength)

pack-priv void
localvarTarget(int pos, int targetType, int startPc, int length, int index)

pack-priv void
offsetTarget(int pos, int targetType, int offset)

pack-priv void
supertypeTarget(int pos, int superTypeIndex)

pack-priv final int
targetInfo(int pos, int type)

pack-priv void
throwsTarget(int pos, int throwsTypeIndex)

pack-priv void
typeArgumentTarget(int pos, int targetType, int offset, int typeArgumentIndex)

pack-priv void
typeParameterBoundTarget(int pos, int targetType, int typeParameterIndex, int boundIndex)

pack-priv void
typeParameterTarget(int pos, int targetType, int typeParameterIndex)

pack-priv final int
typePath(int pos)

pack-priv int
typePath(int pos, int pathLength)

pack-priv void
typePath(int pos, int typePathKind, int typeArgumentIndex)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

infoback to summary
pack-priv byte[] info

Constructor Detail

SubWalkerback to summary
pack-priv SubWalker(byte[] attrInfo)

Method Detail

catchTargetback to summary
pack-priv void catchTarget(int pos, int exceptionTableIndex) throws Exception
emptyTargetback to summary
pack-priv void emptyTarget(int pos, int targetType) throws Exception
formalParameterTargetback to summary
pack-priv void formalParameterTarget(int pos, int formalParameterIndex) throws Exception
localvarTargetback to summary
pack-priv int localvarTarget(int pos, int targetType, int tableLength) throws Exception
localvarTargetback to summary
pack-priv void localvarTarget(int pos, int targetType, int startPc, int length, int index) throws Exception
offsetTargetback to summary
pack-priv void offsetTarget(int pos, int targetType, int offset) throws Exception
supertypeTargetback to summary
pack-priv void supertypeTarget(int pos, int superTypeIndex) throws Exception
targetInfoback to summary
pack-priv final int targetInfo(int pos, int type) throws Exception
throwsTargetback to summary
pack-priv void throwsTarget(int pos, int throwsTypeIndex) throws Exception
typeArgumentTargetback to summary
pack-priv void typeArgumentTarget(int pos, int targetType, int offset, int typeArgumentIndex) throws Exception
typeParameterBoundTargetback to summary
pack-priv void typeParameterBoundTarget(int pos, int targetType, int typeParameterIndex, int boundIndex) throws Exception
typeParameterTargetback to summary
pack-priv void typeParameterTarget(int pos, int targetType, int typeParameterIndex) throws Exception
typePathback to summary
pack-priv final int typePath(int pos) throws Exception
typePathback to summary
pack-priv int typePath(int pos, int pathLength) throws Exception
typePathback to summary
pack-priv void typePath(int pos, int typePathKind, int typeArgumentIndex) throws Exception
javassist.bytecode back to summary

pack-priv Class TypeAnnotationsAttribute.TAWalker

extends Walker
Class Inheritance

To visit each elements of the type annotation attribute, call annotationArray().
See Also
annotationArray()

Field Summary

Modifier and TypeField and Description
pack-priv TypeAnnotationsAttribute.SubWalker
Inherited from javassist.bytecode.AnnotationsAttribute.Walker:
info

Constructor Summary

AccessConstructor and Description
pack-priv
TAWalker(byte[] attrInfo)

Method Summary

Modifier and TypeMethod and Description
pack-priv int
Inherited from javassist.bytecode.AnnotationsAttribute.Walker:
annotationannotationannotationArrayannotationArrayannotationMemberValuearrayMemberValueclassMemberValueconstValueMemberenumMemberValuememberValuememberValuePairmemberValuePairparametersparameters

Field Detail

subWalkerback to summary
pack-priv TypeAnnotationsAttribute.SubWalker subWalker

Constructor Detail

TAWalkerback to summary
pack-priv TAWalker(byte[] attrInfo)

Method Detail

annotationArrayback to summary
pack-priv int annotationArray(int pos, int num) throws Exception

Overrides javassist.bytecode.AnnotationsAttribute.Walker.annotationArray.

Annotations
@Override