Package proguard.classfile.editor
Class Utf8Shrinker
- java.lang.Object
-
- proguard.classfile.editor.Utf8Shrinker
-
- All Implemented Interfaces:
AnnotationVisitor
,ElementValueVisitor
,AttributeVisitor
,InnerClassesInfoVisitor
,LocalVariableInfoVisitor
,LocalVariableTypeInfoVisitor
,ParameterInfoVisitor
,RecordComponentInfoVisitor
,ConstantVisitor
,ClassVisitor
,MemberVisitor
public class Utf8Shrinker extends java.lang.Object implements ClassVisitor, MemberVisitor, ConstantVisitor, AttributeVisitor, RecordComponentInfoVisitor, InnerClassesInfoVisitor, ParameterInfoVisitor, LocalVariableInfoVisitor, LocalVariableTypeInfoVisitor, AnnotationVisitor, ElementValueVisitor
ThisClassVisitor
removes UTF-8 constant pool entries that are not used.
-
-
Constructor Summary
Constructors Constructor Description Utf8Shrinker()
-
Method Summary
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.attribute.annotation.visitor.AnnotationVisitor
visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation, visitAnnotation
-
Methods inherited from interface proguard.classfile.attribute.visitor.AttributeVisitor
visitAnyAttribute, visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, 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
-
Methods inherited from interface proguard.classfile.visitor.ClassVisitor
visitLibraryClass
-
Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor
visitAnyMethodrefConstant, visitAnyRefConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitUtf8Constant
-
Methods inherited from interface proguard.classfile.attribute.annotation.visitor.ElementValueVisitor
visitAnyElementValue
-
Methods inherited from interface proguard.classfile.visitor.MemberVisitor
visitAnyMember, visitLibraryField, visitLibraryMember, visitLibraryMethod, visitProgramField, visitProgramMethod
-
-
-
-
Method Detail
-
visitAnyClass
public void visitAnyClass(Clazz clazz)
Description copied from interface:ClassVisitor
Visits any Clazz instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyClass
in interfaceClassVisitor
-
visitProgramClass
public void visitProgramClass(ProgramClass programClass)
- Specified by:
visitProgramClass
in interfaceClassVisitor
-
visitProgramMember
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember)
- Specified by:
visitProgramMember
in interfaceMemberVisitor
-
visitAnyConstant
public void visitAnyConstant(Clazz clazz, Constant constant)
Description copied from interface:ConstantVisitor
Visits any Constant instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyConstant
in interfaceConstantVisitor
-
visitStringConstant
public void visitStringConstant(Clazz clazz, StringConstant stringConstant)
- Specified by:
visitStringConstant
in interfaceConstantVisitor
-
visitClassConstant
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
- Specified by:
visitClassConstant
in interfaceConstantVisitor
-
visitNameAndTypeConstant
public void visitNameAndTypeConstant(Clazz clazz, NameAndTypeConstant nameAndTypeConstant)
- Specified by:
visitNameAndTypeConstant
in interfaceConstantVisitor
-
visitUnknownAttribute
public void visitUnknownAttribute(Clazz clazz, UnknownAttribute unknownAttribute)
- Specified by:
visitUnknownAttribute
in interfaceAttributeVisitor
-
visitSourceFileAttribute
public void visitSourceFileAttribute(Clazz clazz, SourceFileAttribute sourceFileAttribute)
- Specified by:
visitSourceFileAttribute
in interfaceAttributeVisitor
-
visitSourceDirAttribute
public void visitSourceDirAttribute(Clazz clazz, SourceDirAttribute sourceDirAttribute)
- Specified by:
visitSourceDirAttribute
in interfaceAttributeVisitor
-
visitSourceDebugExtensionAttribute
public void visitSourceDebugExtensionAttribute(Clazz clazz, SourceDebugExtensionAttribute sourceDebugExtensionAttribute)
- Specified by:
visitSourceDebugExtensionAttribute
in interfaceAttributeVisitor
-
visitRecordAttribute
public void visitRecordAttribute(Clazz clazz, RecordAttribute recordAttribute)
- Specified by:
visitRecordAttribute
in interfaceAttributeVisitor
-
visitInnerClassesAttribute
public void visitInnerClassesAttribute(Clazz clazz, InnerClassesAttribute innerClassesAttribute)
- Specified by:
visitInnerClassesAttribute
in interfaceAttributeVisitor
-
visitEnclosingMethodAttribute
public void visitEnclosingMethodAttribute(Clazz clazz, EnclosingMethodAttribute enclosingMethodAttribute)
- Specified by:
visitEnclosingMethodAttribute
in interfaceAttributeVisitor
-
visitNestHostAttribute
public void visitNestHostAttribute(Clazz clazz, NestHostAttribute nestHostAttribute)
- Specified by:
visitNestHostAttribute
in interfaceAttributeVisitor
-
visitNestMembersAttribute
public void visitNestMembersAttribute(Clazz clazz, NestMembersAttribute nestMembersAttribute)
- Specified by:
visitNestMembersAttribute
in interfaceAttributeVisitor
-
visitPermittedSubclassesAttribute
public void visitPermittedSubclassesAttribute(Clazz clazz, PermittedSubclassesAttribute permittedSubclassesAttribute)
- Specified by:
visitPermittedSubclassesAttribute
in interfaceAttributeVisitor
-
visitModuleAttribute
public void visitModuleAttribute(Clazz clazz, ModuleAttribute moduleAttribute)
- Specified by:
visitModuleAttribute
in interfaceAttributeVisitor
-
visitModuleMainClassAttribute
public void visitModuleMainClassAttribute(Clazz clazz, ModuleMainClassAttribute moduleMainClassAttribute)
- Specified by:
visitModuleMainClassAttribute
in interfaceAttributeVisitor
-
visitModulePackagesAttribute
public void visitModulePackagesAttribute(Clazz clazz, ModulePackagesAttribute modulePackagesAttribute)
- Specified by:
visitModulePackagesAttribute
in interfaceAttributeVisitor
-
visitDeprecatedAttribute
public void visitDeprecatedAttribute(Clazz clazz, DeprecatedAttribute deprecatedAttribute)
- Specified by:
visitDeprecatedAttribute
in interfaceAttributeVisitor
-
visitSyntheticAttribute
public void visitSyntheticAttribute(Clazz clazz, SyntheticAttribute syntheticAttribute)
- Specified by:
visitSyntheticAttribute
in interfaceAttributeVisitor
-
visitSignatureAttribute
public void visitSignatureAttribute(Clazz clazz, SignatureAttribute signatureAttribute)
- Specified by:
visitSignatureAttribute
in interfaceAttributeVisitor
-
visitConstantValueAttribute
public void visitConstantValueAttribute(Clazz clazz, Field field, ConstantValueAttribute constantValueAttribute)
- Specified by:
visitConstantValueAttribute
in interfaceAttributeVisitor
-
visitMethodParametersAttribute
public void visitMethodParametersAttribute(Clazz clazz, Method method, MethodParametersAttribute methodParametersAttribute)
- Specified by:
visitMethodParametersAttribute
in interfaceAttributeVisitor
-
visitExceptionsAttribute
public void visitExceptionsAttribute(Clazz clazz, Method method, ExceptionsAttribute exceptionsAttribute)
- Specified by:
visitExceptionsAttribute
in interfaceAttributeVisitor
-
visitCodeAttribute
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
- Specified by:
visitCodeAttribute
in interfaceAttributeVisitor
-
visitStackMapAttribute
public void visitStackMapAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapAttribute stackMapAttribute)
- Specified by:
visitStackMapAttribute
in interfaceAttributeVisitor
-
visitStackMapTableAttribute
public void visitStackMapTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, StackMapTableAttribute stackMapTableAttribute)
- Specified by:
visitStackMapTableAttribute
in interfaceAttributeVisitor
-
visitLineNumberTableAttribute
public void visitLineNumberTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LineNumberTableAttribute lineNumberTableAttribute)
- Specified by:
visitLineNumberTableAttribute
in interfaceAttributeVisitor
-
visitLocalVariableTableAttribute
public void visitLocalVariableTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTableAttribute localVariableTableAttribute)
- Specified by:
visitLocalVariableTableAttribute
in interfaceAttributeVisitor
-
visitLocalVariableTypeTableAttribute
public void visitLocalVariableTypeTableAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeTableAttribute localVariableTypeTableAttribute)
- Specified by:
visitLocalVariableTypeTableAttribute
in interfaceAttributeVisitor
-
visitAnyAnnotationsAttribute
public void visitAnyAnnotationsAttribute(Clazz clazz, AnnotationsAttribute annotationsAttribute)
Description copied from interface:AttributeVisitor
Visits any AnnotationsAttribute instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyAnnotationsAttribute
in interfaceAttributeVisitor
-
visitAnyParameterAnnotationsAttribute
public void visitAnyParameterAnnotationsAttribute(Clazz clazz, Method method, ParameterAnnotationsAttribute parameterAnnotationsAttribute)
Description copied from interface:AttributeVisitor
Visits any ParameterAnnotationsAttribute instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyParameterAnnotationsAttribute
in interfaceAttributeVisitor
-
visitAnnotationDefaultAttribute
public void visitAnnotationDefaultAttribute(Clazz clazz, Method method, AnnotationDefaultAttribute annotationDefaultAttribute)
- Specified by:
visitAnnotationDefaultAttribute
in interfaceAttributeVisitor
-
visitRecordComponentInfo
public void visitRecordComponentInfo(Clazz clazz, RecordComponentInfo recordComponentInfo)
- Specified by:
visitRecordComponentInfo
in interfaceRecordComponentInfoVisitor
-
visitInnerClassesInfo
public void visitInnerClassesInfo(Clazz clazz, InnerClassesInfo innerClassesInfo)
- Specified by:
visitInnerClassesInfo
in interfaceInnerClassesInfoVisitor
-
visitParameterInfo
public void visitParameterInfo(Clazz clazz, Method method, int parameterIndex, ParameterInfo parameterInfo)
- Specified by:
visitParameterInfo
in interfaceParameterInfoVisitor
-
visitLocalVariableInfo
public void visitLocalVariableInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableInfo localVariableInfo)
- Specified by:
visitLocalVariableInfo
in interfaceLocalVariableInfoVisitor
-
visitLocalVariableTypeInfo
public void visitLocalVariableTypeInfo(Clazz clazz, Method method, CodeAttribute codeAttribute, LocalVariableTypeInfo localVariableTypeInfo)
- Specified by:
visitLocalVariableTypeInfo
in interfaceLocalVariableTypeInfoVisitor
-
visitAnnotation
public void visitAnnotation(Clazz clazz, Annotation annotation)
Description copied from interface:AnnotationVisitor
Visits any Annotation instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnnotation
in interfaceAnnotationVisitor
-
visitConstantElementValue
public void visitConstantElementValue(Clazz clazz, Annotation annotation, ConstantElementValue constantElementValue)
- Specified by:
visitConstantElementValue
in interfaceElementValueVisitor
-
visitEnumConstantElementValue
public void visitEnumConstantElementValue(Clazz clazz, Annotation annotation, EnumConstantElementValue enumConstantElementValue)
- Specified by:
visitEnumConstantElementValue
in interfaceElementValueVisitor
-
visitClassElementValue
public void visitClassElementValue(Clazz clazz, Annotation annotation, ClassElementValue classElementValue)
- Specified by:
visitClassElementValue
in interfaceElementValueVisitor
-
visitAnnotationElementValue
public void visitAnnotationElementValue(Clazz clazz, Annotation annotation, AnnotationElementValue annotationElementValue)
- Specified by:
visitAnnotationElementValue
in interfaceElementValueVisitor
-
visitArrayElementValue
public void visitArrayElementValue(Clazz clazz, Annotation annotation, ArrayElementValue arrayElementValue)
- Specified by:
visitArrayElementValue
in interfaceElementValueVisitor
-
-