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.Mapclassnames(package private) ConstPooldestPool(package private) java.io.ByteArrayOutputStreamoutput(package private) ConstPoolsrcPool(package private) AnnotationsWriterwriter-
Fields inherited from class javassist.bytecode.AnnotationsAttribute.Walker
info
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) intannotation(int pos, int type, int numPairs)(package private) intannotationArray(int pos, int num)(package private) intannotationMemberValue(int pos)annotation_value(package private) intarrayMemberValue(int pos, int num)array_value(package private) voidclassMemberValue(int pos, int index)class_info_index(package private) byte[]close()(package private) voidconstValueMember(int tag, int index)const_value_index(package private) intcopy(int srcIndex)Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.(package private) intcopyType(int srcIndex)Copies a constant pool entry into the destination constant pool and returns the index of the copied entry.(package private) voidenumMemberValue(int pos, int typeNameIndex, int constNameIndex)enum_const_value(package private) intmemberValuePair(int pos, int nameIndex)element_value_paris[](package private) voidparameters(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 bymapwhen 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:
parametersin classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
annotationArray
int annotationArray(int pos, int num) throws java.lang.Exception- Overrides:
annotationArrayin classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
annotation
int annotation(int pos, int type, int numPairs) throws java.lang.Exception- Overrides:
annotationin classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
memberValuePair
int memberValuePair(int pos, int nameIndex) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerelement_value_paris[]- Overrides:
memberValuePairin classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
constValueMember
void constValueMember(int tag, int index) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerconst_value_index- Overrides:
constValueMemberin classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
enumMemberValue
void enumMemberValue(int pos, int typeNameIndex, int constNameIndex) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerenum_const_value- Overrides:
enumMemberValuein classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
classMemberValue
void classMemberValue(int pos, int index) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerclass_info_index- Overrides:
classMemberValuein classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
annotationMemberValue
int annotationMemberValue(int pos) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerannotation_value- Overrides:
annotationMemberValuein classAnnotationsAttribute.Walker- Throws:
java.lang.Exception
-
arrayMemberValue
int arrayMemberValue(int pos, int num) throws java.lang.ExceptionDescription copied from class:AnnotationsAttribute.Walkerarray_value- Overrides:
arrayMemberValuein 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.
-
-