Package javassist.bytecode
Class AnnotationsAttribute.Copier
java.lang.Object
javassist.bytecode.AnnotationsAttribute.Walker
javassist.bytecode.AnnotationsAttribute.Copier
- Direct Known Subclasses:
TypeAnnotationsAttribute.Copier
- Enclosing class:
AnnotationsAttribute
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) ConstPool
(package private) ByteArrayOutputStream
(package private) ConstPool
(package private) AnnotationsWriter
Fields inherited from class javassist.bytecode.AnnotationsAttribute.Walker
info
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) int
annotation
(int pos, int type, int numPairs) (package private) int
annotationArray
(int pos, int num) (package private) int
annotationMemberValue
(int pos) annotation_value
(package private) int
arrayMemberValue
(int pos, int num) array_value
(package private) void
classMemberValue
(int pos, int index) class_info_index
(package private) byte[]
close()
(package private) void
constValueMember
(int tag, int index) const_value_index
(package private) int
copy
(int srcIndex) Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.(package private) int
copyType
(int srcIndex) Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.(package private) void
enumMemberValue
(int pos, int typeNameIndex, int constNameIndex) enum_const_value
(package private) int
memberValuePair
(int pos, int nameIndex) element_value_paris[]
(package private) void
parameters
(int numParam, int pos) Methods inherited from class javassist.bytecode.AnnotationsAttribute.Walker
annotation, annotationArray, annotationArray, memberValue, memberValuePair, parameters
-
Field Details
-
output
ByteArrayOutputStream output -
writer
AnnotationsWriter writer -
srcPool
ConstPool srcPool -
destPool
ConstPool destPool -
classnames
-
-
Constructor Details
-
Copier
Constructs a copier. This copier renames some class names into the new names specified bymap
when it copies an annotation attribute.- Parameters:
info
- the source attribute.src
- the constant pool of the source class.dest
- the constant pool of the destination class.map
- pairs of replaced and substituted class names. It can be null.
-
Copier
-
-
Method Details
-
close
- Throws:
IOException
-
parameters
- Overrides:
parameters
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
annotationArray
- Overrides:
annotationArray
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
annotation
- Overrides:
annotation
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
memberValuePair
Description copied from class:AnnotationsAttribute.Walker
element_value_paris[]
- Overrides:
memberValuePair
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
constValueMember
Description copied from class:AnnotationsAttribute.Walker
const_value_index
- Overrides:
constValueMember
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
enumMemberValue
Description copied from class:AnnotationsAttribute.Walker
enum_const_value
- Overrides:
enumMemberValue
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
classMemberValue
Description copied from class:AnnotationsAttribute.Walker
class_info_index
- Overrides:
classMemberValue
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
annotationMemberValue
Description copied from class:AnnotationsAttribute.Walker
annotation_value
- Overrides:
annotationMemberValue
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
arrayMemberValue
Description copied from class:AnnotationsAttribute.Walker
array_value
- Overrides:
arrayMemberValue
in classAnnotationsAttribute.Walker
- Throws:
Exception
-
copy
int copy(int srcIndex) Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.- Parameters:
srcIndex
- the index of the copied entry into the source constant pool.- Returns:
- the index of the copied item into the destination constant pool.
-
copyType
int copyType(int srcIndex) Copies a constant pool entry into the destination constant pool and returns the index of the copied entry. That entry must be a Utf8Info representing a class name in the L; form. - Parameters:
srcIndex
- the index of the copied entry into the source constant pool.- Returns:
- the index of the copied item into the destination constant pool.
-