public class ConstantPoolShrinker extends java.lang.Object implements ClassVisitor, MemberVisitor, ConstantVisitor, AttributeVisitor, BootstrapMethodInfoVisitor, RecordComponentInfoVisitor, InnerClassesInfoVisitor, ExceptionInfoVisitor, StackMapFrameVisitor, VerificationTypeVisitor, ParameterInfoVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, RequiresInfoVisitor, ExportsInfoVisitor, OpensInfoVisitor, ProvidesInfoVisitor, AnnotationVisitor, ElementValueVisitor, InstructionVisitor
ClassVisitor
removes all unused entries from the constant pool.Constructor and Description |
---|
ConstantPoolShrinker() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitLibraryClass
visitAnyMember, visitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramField, visitProgramMethod
visitAnyMethodrefConstant, visitDoubleConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitLongConstant, visitMethodrefConstant, visitPrimitiveArrayConstant, visitUtf8Constant
visitAnyTypeAnnotationsAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitLineNumberTableAttribute, 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, visitSourceDebugExtensionAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute
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
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction, visitVariableInstruction
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember)
visitProgramMember
in interface MemberVisitor
public void visitAnyConstant(Clazz clazz, Constant constant)
ConstantVisitor
visitAnyConstant
in interface ConstantVisitor
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
visitStringConstant
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 visitAnyRefConstant(Clazz clazz, RefConstant refConstant)
ConstantVisitor
visitAnyRefConstant
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 visitModuleConstant(Clazz clazz, ModuleConstant moduleConstant)
visitModuleConstant
in interface ConstantVisitor
public void visitPackageConstant(Clazz clazz, PackageConstant packageConstant)
visitPackageConstant
in interface ConstantVisitor
public void visitAnyAttribute(Clazz clazz, Attribute attribute)
AttributeVisitor
visitAnyAttribute
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 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 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 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 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
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