Package proguard.classfile.util
Class ClassRenamer
- java.lang.Object
-
- proguard.classfile.util.ClassRenamer
-
- All Implemented Interfaces:
ConstantVisitor
,ClassVisitor
,MemberVisitor
public class ClassRenamer extends java.lang.Object implements ClassVisitor, MemberVisitor, ConstantVisitor
ThisClassVisitor
renames the class names and class member names of the classes it visits.
-
-
Constructor Summary
Constructors Constructor Description ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction)
ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, java.util.function.BiFunction<Clazz,Member,java.lang.String> memberNameFunction)
ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, java.util.function.BiFunction<Clazz,Member,java.lang.String> memberNameFunction, ClassVisitor extraClassVisitor, MemberVisitor extraMemberVisitor)
ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, ClassVisitor extraClassVisitor, MemberVisitor extraMemberVisitor)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.void
visitClassConstant(Clazz clazz, ClassConstant classConstant)
void
visitLibraryClass(LibraryClass libraryClass)
void
visitLibraryMember(LibraryClass libraryClass, LibraryMember libraryMember)
void
visitProgramClass(ProgramClass programClass)
void
visitProgramMember(ProgramClass programClass, ProgramMember programMember)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor
visitAnyConstant, visitAnyMethodrefConstant, visitAnyRefConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitPrimitiveArrayConstant, visitStringConstant, visitUtf8Constant
-
Methods inherited from interface proguard.classfile.visitor.MemberVisitor
visitAnyMember, visitLibraryField, visitLibraryMethod, visitProgramField, visitProgramMethod
-
-
-
-
Constructor Detail
-
ClassRenamer
public ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction)
-
ClassRenamer
public ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, java.util.function.BiFunction<Clazz,Member,java.lang.String> memberNameFunction)
-
ClassRenamer
public ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, ClassVisitor extraClassVisitor, MemberVisitor extraMemberVisitor)
-
ClassRenamer
public ClassRenamer(java.util.function.Function<Clazz,java.lang.String> classNameFunction, java.util.function.BiFunction<Clazz,Member,java.lang.String> memberNameFunction, ClassVisitor extraClassVisitor, MemberVisitor extraMemberVisitor)
-
-
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
-
visitLibraryClass
public void visitLibraryClass(LibraryClass libraryClass)
- Specified by:
visitLibraryClass
in interfaceClassVisitor
-
visitProgramMember
public void visitProgramMember(ProgramClass programClass, ProgramMember programMember)
- Specified by:
visitProgramMember
in interfaceMemberVisitor
-
visitLibraryMember
public void visitLibraryMember(LibraryClass libraryClass, LibraryMember libraryMember)
- Specified by:
visitLibraryMember
in interfaceMemberVisitor
-
visitClassConstant
public void visitClassConstant(Clazz clazz, ClassConstant classConstant)
- Specified by:
visitClassConstant
in interfaceConstantVisitor
-
-