public class ConstantPoolRemapper extends java.lang.Object implements ClassVisitor, ConstantVisitor, MemberVisitor, AttributeVisitor, BootstrapMethodInfoVisitor, RecordComponentInfoVisitor, InnerClassesInfoVisitor, ExceptionInfoVisitor, InstructionVisitor, StackMapFrameVisitor, VerificationTypeVisitor, ParameterInfoVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, RequiresInfoVisitor, ExportsInfoVisitor, OpensInfoVisitor, ProvidesInfoVisitor, AnnotationVisitor, ElementValueVisitor
ClassVisitor
remaps all possible references to constant pool entries of the classes
that it visits, based on a given index map. It is assumed that the constant pool entries
themselves have already been remapped.Constructor and Description |
---|
ConstantPoolRemapper() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitLibraryClass
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant
visitAnyMember, visitLibraryMember, visitProgramMember
visitAnyAttribute, visitAnyTypeAnnotationsAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleAnnotationsAttribute, visitRuntimeInvisibleParameterAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeInvisibleTypeAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleAnnotationsAttribute, visitRuntimeVisibleParameterAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitRuntimeVisibleTypeAnnotationsAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSignatureAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction, visitVariableInstruction
visitLessZeroFrame, visitSameZeroFrame
visitDoubleType, visitFloatType, visitIntegerType, visitLongType, visitNullType, visitStackDoubleType, visitStackFloatType, visitStackIntegerType, visitStackLongType, visitStackNullType, visitStackObjectType, visitStackTopType, visitStackUninitializedThisType, visitStackUninitializedType, visitTopType, visitUninitializedThisType, visitUninitializedType, visitVariablesDoubleType, visitVariablesFloatType, visitVariablesIntegerType, visitVariablesLongType, visitVariablesNullType, visitVariablesObjectType, visitVariablesTopType, visitVariablesUninitializedThisType, visitVariablesUninitializedType
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation
visitAnyElementValue
public void setConstantIndexMap(int[] constantIndexMap)
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitIntegerConstant(Clazz clazz, IntegerConstant integerConstant)
visitIntegerConstant
in interface ConstantVisitor
public void visitLongConstant(Clazz clazz, LongConstant longConstant)
visitLongConstant
in interface ConstantVisitor
public void visitFloatConstant(Clazz clazz, FloatConstant floatConstant)
visitFloatConstant
in interface ConstantVisitor
public void visitDoubleConstant(Clazz clazz, DoubleConstant doubleConstant)
visitDoubleConstant
in interface ConstantVisitor
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
visitPrimitiveArrayConstant
in interface ConstantVisitor
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
visitStringConstant
in interface ConstantVisitor
public void visitUtf8Constant(Clazz clazz, Utf8Constant utf8Constant)
visitUtf8Constant
in interface ConstantVisitor
public void visitDynamicConstant(Clazz clazz, DynamicConstant dynamicConstant)
visitDynamicConstant
in interface ConstantVisitor
public void visitInvokeDynamicConstant(Clazz clazz, InvokeDynamicConstant invokeDynamicConstant)
visitInvokeDynamicConstant
in interface ConstantVisitor
public void visitMethodHandleConstant(Clazz clazz, MethodHandleConstant methodHandleConstant)
visitMethodHandleConstant
in interface ConstantVisitor
public void visitModuleConstant(Clazz clazz, ModuleConstant moduleConstant)
visitModuleConstant
in interface ConstantVisitor
public void visitPackageConstant(Clazz clazz, PackageConstant packageConstant)
visitPackageConstant
in interface ConstantVisitor
public void visitFieldrefConstant(Clazz clazz, FieldrefConstant fieldrefConstant)
visitFieldrefConstant
in interface ConstantVisitor
public void visitInterfaceMethodrefConstant(Clazz clazz, InterfaceMethodrefConstant interfaceMethodrefConstant)
visitInterfaceMethodrefConstant
in interface ConstantVisitor
public void visitMethodrefConstant(Clazz clazz, MethodrefConstant methodrefConstant)
visitMethodrefConstant
in interface ConstantVisitor
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
visitClassConstant
in interface ConstantVisitor
public void visitMethodTypeConstant(Clazz clazz, MethodTypeConstant methodTypeConstant)
visitMethodTypeConstant
in interface ConstantVisitor
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant)
visitNameAndTypeConstant
in interface ConstantVisitor
public void visitProgramField(ProgramClass programClass, ProgramField programField)
visitProgramField
in interface MemberVisitor
public void visitProgramMethod(ProgramClass programClass, ProgramMethod programMethod)
visitProgramMethod
in interface MemberVisitor
public void visitLibraryField(LibraryClass libraryClass, LibraryField libraryField)
visitLibraryField
in interface MemberVisitor
public void visitLibraryMethod(LibraryClass libraryClass, LibraryMethod libraryMethod)
visitLibraryMethod
in interface MemberVisitor
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute)
visitUnknownAttribute
in interface AttributeVisitor
public void visitBootstrapMethodsAttribute(Clazz clazz, BootstrapMethodsAttribute bootstrapMethodsAttribute)
visitBootstrapMethodsAttribute
in interface AttributeVisitor
public void visitSourceFileAttribute(Clazz clazz, SourceFileAttribute sourceFileAttribute)
visitSourceFileAttribute
in interface AttributeVisitor
public void visitSourceDirAttribute(Clazz clazz, SourceDirAttribute sourceDirAttribute)
visitSourceDirAttribute
in interface AttributeVisitor
public void visitSourceDebugExtensionAttribute(Clazz clazz, SourceDebugExtensionAttribute sourceDebugExtensionAttribute)
visitSourceDebugExtensionAttribute
in interface AttributeVisitor
public void visitRecordAttribute(Clazz clazz, RecordAttribute recordAttribute)
visitRecordAttribute
in interface AttributeVisitor
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute)
visitInnerClassesAttribute
in interface AttributeVisitor
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
visitEnclosingMethodAttribute
in interface AttributeVisitor
public void visitNestHostAttribute(Clazz clazz, NestHostAttribute nestHostAttribute)
visitNestHostAttribute
in interface AttributeVisitor
public void visitNestMembersAttribute(Clazz clazz, NestMembersAttribute nestMembersAttribute)
visitNestMembersAttribute
in interface AttributeVisitor
public void visitPermittedSubclassesAttribute(Clazz clazz, PermittedSubclassesAttribute permittedSubclassesAttribute)
visitPermittedSubclassesAttribute
in interface AttributeVisitor
public void visitModuleAttribute(Clazz clazz, ModuleAttribute moduleAttribute)
visitModuleAttribute
in interface AttributeVisitor
public void visitModuleMainClassAttribute(Clazz clazz, ModuleMainClassAttribute moduleMainClassAttribute)
visitModuleMainClassAttribute
in interface AttributeVisitor
public void visitModulePackagesAttribute(Clazz clazz, ModulePackagesAttribute modulePackagesAttribute)
visitModulePackagesAttribute
in interface AttributeVisitor
public void visitDeprecatedAttribute(Clazz clazz, DeprecatedAttribute deprecatedAttribute)
visitDeprecatedAttribute
in interface AttributeVisitor
public void visitSyntheticAttribute(Clazz clazz, SyntheticAttribute syntheticAttribute)
visitSyntheticAttribute
in interface AttributeVisitor
public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute)
visitSignatureAttribute
in interface AttributeVisitor
public void visitConstantValueAttribute(Clazz clazz, Field field, ConstantValueAttribute constantValueAttribute)
visitConstantValueAttribute
in interface AttributeVisitor
public void visitMethodParametersAttribute(Clazz clazz, Method method, MethodParametersAttribute methodParametersAttribute)
visitMethodParametersAttribute
in interface AttributeVisitor
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
visitExceptionsAttribute
in interface AttributeVisitor
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
visitCodeAttribute
in interface AttributeVisitor
public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)
visitStackMapAttribute
in interface AttributeVisitor
public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)
visitStackMapTableAttribute
in interface AttributeVisitor
public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)
visitLineNumberTableAttribute
in interface AttributeVisitor
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
visitLocalVariableTableAttribute
in interface AttributeVisitor
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
visitLocalVariableTypeTableAttribute
in interface AttributeVisitor
public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute)
AttributeVisitor
visitAnyAnnotationsAttribute
in interface AttributeVisitor
public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
AttributeVisitor
visitAnyParameterAnnotationsAttribute
in interface AttributeVisitor
public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
visitAnnotationDefaultAttribute
in interface AttributeVisitor
public void visitBootstrapMethodInfo(Clazz clazz, BootstrapMethodInfo bootstrapMethodInfo)
visitBootstrapMethodInfo
in interface BootstrapMethodInfoVisitor
public void visitRecordComponentInfo(Clazz clazz, RecordComponentInfo recordComponentInfo)
visitRecordComponentInfo
in interface RecordComponentInfoVisitor
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
visitInnerClassesInfo
in interface InnerClassesInfoVisitor
public void visitExceptionInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, ExceptionInfo exceptionInfo)
visitExceptionInfo
in interface ExceptionInfoVisitor
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
InstructionVisitor
visitAnyInstruction
in interface InstructionVisitor
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
visitConstantInstruction
in interface InstructionVisitor
public void visitAnyStackMapFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, StackMapFrame stackMapFrame)
StackMapFrameVisitor
visitAnyStackMapFrame
in interface StackMapFrameVisitor
public void visitSameOneFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SameOneFrame sameOneFrame)
visitSameOneFrame
in interface StackMapFrameVisitor
public void visitMoreZeroFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, MoreZeroFrame moreZeroFrame)
visitMoreZeroFrame
in interface StackMapFrameVisitor
public void visitFullFrame(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, FullFrame fullFrame)
visitFullFrame
in interface StackMapFrameVisitor
public void visitAnyVerificationType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VerificationType verificationType)
VerificationTypeVisitor
visitAnyVerificationType
in interface VerificationTypeVisitor
public void visitObjectType(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ObjectType objectType)
visitObjectType
in interface VerificationTypeVisitor
public void visitParameterInfo(Clazz clazz, Method method, int parameterIndex, ParameterInfo parameterInfo)
visitParameterInfo
in interface ParameterInfoVisitor
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
visitLocalVariableInfo
in interface LocalVariableInfoVisitor
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
visitLocalVariableTypeInfo
in interface LocalVariableTypeInfoVisitor
public void visitRequiresInfo(Clazz clazz, RequiresInfo requiresInfo)
visitRequiresInfo
in interface RequiresInfoVisitor
public void visitExportsInfo(Clazz clazz, ExportsInfo exportsInfo)
visitExportsInfo
in interface ExportsInfoVisitor
public void visitOpensInfo(Clazz clazz, OpensInfo opensInfo)
visitOpensInfo
in interface OpensInfoVisitor
public void visitProvidesInfo(Clazz clazz, ProvidesInfo providesInfo)
visitProvidesInfo
in interface ProvidesInfoVisitor
public void visitAnnotation(Clazz clazz, Annotation annotation)
AnnotationVisitor
visitAnnotation
in interface AnnotationVisitor
public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
visitConstantElementValue
in interface ElementValueVisitor
public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
visitEnumConstantElementValue
in interface ElementValueVisitor
public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
visitClassElementValue
in interface ElementValueVisitor
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
visitAnnotationElementValue
in interface ElementValueVisitor
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
visitArrayElementValue
in interface ElementValueVisitor