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
static class AnnotationsAttribute.Copier extends AnnotationsAttribute.Walker
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.Map
classnames
(package private) ConstPool
destPool
(package private) java.io.ByteArrayOutputStream
output
(package private) ConstPool
srcPool
(package private) AnnotationsWriter
writer
-
Fields inherited from class javassist.bytecode.AnnotationsAttribute.Walker
info
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (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 Detail
-
output
java.io.ByteArrayOutputStream output
-
writer
AnnotationsWriter writer
-
srcPool
ConstPool srcPool
-
destPool
ConstPool destPool
-
classnames
java.util.Map classnames
-
-
Constructor Detail
-
Copier
Copier(byte[] info, ConstPool src, ConstPool dest, java.util.Map map)
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.
-
-
Method Detail
-
close
byte[] close() throws java.io.IOException
- Throws:
java.io.IOException
-
parameters
void parameters(int numParam, int pos) throws java.lang.Exception
- Overrides:
parameters
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
annotationArray
int annotationArray(int pos, int num) throws java.lang.Exception
- Overrides:
annotationArray
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
annotation
int annotation(int pos, int type, int numPairs) throws java.lang.Exception
- Overrides:
annotation
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
memberValuePair
int memberValuePair(int pos, int nameIndex) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
element_value_paris[]
- Overrides:
memberValuePair
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
constValueMember
void constValueMember(int tag, int index) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
const_value_index
- Overrides:
constValueMember
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
enumMemberValue
void enumMemberValue(int pos, int typeNameIndex, int constNameIndex) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
enum_const_value
- Overrides:
enumMemberValue
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
classMemberValue
void classMemberValue(int pos, int index) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
class_info_index
- Overrides:
classMemberValue
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
annotationMemberValue
int annotationMemberValue(int pos) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
annotation_value
- Overrides:
annotationMemberValue
in classAnnotationsAttribute.Walker
- Throws:
java.lang.Exception
-
arrayMemberValue
int arrayMemberValue(int pos, int num) throws java.lang.Exception
Description copied from class:AnnotationsAttribute.Walker
array_value
- Overrides:
arrayMemberValue
in classAnnotationsAttribute.Walker
- Throws:
java.lang.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.
-
-