Package proguard.classfile.util
Class PrimitiveArrayConstantReplacer
- java.lang.Object
-
- proguard.classfile.util.PrimitiveArrayConstantReplacer
-
- All Implemented Interfaces:
AttributeVisitor
,ConstantVisitor
,PrimitiveArrayConstantElementVisitor
,InstructionVisitor
,ClassVisitor
public class PrimitiveArrayConstantReplacer extends java.lang.Object implements ClassVisitor, AttributeVisitor, InstructionVisitor, ConstantVisitor, PrimitiveArrayConstantElementVisitor
ThisClassVisitor
replaces all instances ofPrimitiveArrayConstant
by Java bytecode compliant array store instructions.- See Also:
ArrayInitializationReplacer
-
-
Constructor Summary
Constructors Constructor Description PrimitiveArrayConstantReplacer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitAnyAttribute(Clazz clazz, Attribute attribute)
Visits any Attribute instance.void
visitAnyClass(Clazz clazz)
Visits any Clazz instance.void
visitAnyConstant(Clazz clazz, Constant constant)
Visits any Constant instance.void
visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
Visits any Instruction instance.void
visitBooleanArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, boolean value)
void
visitByteArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, byte value)
void
visitCharArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, char value)
void
visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
void
visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
void
visitDoubleArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, double value)
void
visitFloatArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, float value)
void
visitIntArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, int value)
void
visitLongArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, long value)
void
visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
void
visitProgramClass(ProgramClass programClass)
void
visitShortArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, short value)
-
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.visitor.AttributeVisitor
visitAnnotationDefaultAttribute, visitAnyAnnotationsAttribute, visitAnyParameterAnnotationsAttribute, visitAnyTypeAnnotationsAttribute, visitBootstrapMethodsAttribute, visitConstantValueAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitDeprecatedAttribute, visitEnclosingMethodAttribute, visitExceptionsAttribute, visitInnerClassesAttribute, visitLineNumberTableAttribute, visitLocalVariableTableAttribute, visitLocalVariableTypeTableAttribute, visitMethodParametersAttribute, visitModuleAttribute, visitModuleMainClassAttribute, visitModulePackagesAttribute, visitNestHostAttribute, visitNestMembersAttribute, visitPermittedSubclassesAttribute, visitRecordAttribute, 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, visitSignatureAttribute, visitSourceDebugExtensionAttribute, visitSourceDirAttribute, visitSourceFileAttribute, visitStackMapAttribute, visitStackMapTableAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitSyntheticAttribute, visitUnknownAttribute
-
Methods inherited from interface proguard.classfile.visitor.ClassVisitor
visitLibraryClass
-
Methods inherited from interface proguard.classfile.constant.visitor.ConstantVisitor
visitAnyMethodrefConstant, visitAnyRefConstant, visitClassConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitStringConstant, visitUtf8Constant
-
Methods inherited from interface proguard.classfile.instruction.visitor.InstructionVisitor
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction, visitVariableInstruction
-
Methods inherited from interface proguard.classfile.constant.visitor.PrimitiveArrayConstantElementVisitor
visitAnyPrimitiveArrayConstantElement
-
-
-
-
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
-
visitAnyAttribute
public void visitAnyAttribute(Clazz clazz, Attribute attribute)
Description copied from interface:AttributeVisitor
Visits any Attribute instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyAttribute
in interfaceAttributeVisitor
-
visitCodeAttribute
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
- Specified by:
visitCodeAttribute
in interfaceAttributeVisitor
-
visitAnyInstruction
public void visitAnyInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, Instruction instruction)
Description copied from interface:InstructionVisitor
Visits any Instruction instance. The more specific default implementations of this interface delegate to this method.- Specified by:
visitAnyInstruction
in interfaceInstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
- Specified by:
visitConstantInstruction
in interfaceInstructionVisitor
-
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
-
visitPrimitiveArrayConstant
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
- Specified by:
visitPrimitiveArrayConstant
in interfaceConstantVisitor
-
visitBooleanArrayConstantElement
public void visitBooleanArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, boolean value)
- Specified by:
visitBooleanArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitByteArrayConstantElement
public void visitByteArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, byte value)
- Specified by:
visitByteArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitCharArrayConstantElement
public void visitCharArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, char value)
- Specified by:
visitCharArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitShortArrayConstantElement
public void visitShortArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, short value)
- Specified by:
visitShortArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitIntArrayConstantElement
public void visitIntArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, int value)
- Specified by:
visitIntArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitFloatArrayConstantElement
public void visitFloatArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, float value)
- Specified by:
visitFloatArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitLongArrayConstantElement
public void visitLongArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, long value)
- Specified by:
visitLongArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
visitDoubleArrayConstantElement
public void visitDoubleArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, double value)
- Specified by:
visitDoubleArrayConstantElement
in interfacePrimitiveArrayConstantElementVisitor
-
-