public class PrimitiveArrayConstantReplacer extends java.lang.Object implements ClassVisitor, AttributeVisitor, InstructionVisitor, ConstantVisitor, PrimitiveArrayConstantElementVisitor
ClassVisitor
replaces all instances of PrimitiveArrayConstant
by Java
bytecode compliant array store instructions.ArrayInitializationReplacer
Constructor and Description |
---|
PrimitiveArrayConstantReplacer() |
Modifier and Type | Method and 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) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
visitLibraryClass
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
visitAnySwitchInstruction, visitBranchInstruction, visitLookUpSwitchInstruction, visitSimpleInstruction, visitTableSwitchInstruction, visitVariableInstruction
visitAnyMethodrefConstant, visitAnyRefConstant, visitClassConstant, visitDoubleConstant, visitDynamicConstant, visitFieldrefConstant, visitFloatConstant, visitIntegerConstant, visitInterfaceMethodrefConstant, visitInvokeDynamicConstant, visitLongConstant, visitMethodHandleConstant, visitMethodrefConstant, visitMethodTypeConstant, visitModuleConstant, visitNameAndTypeConstant, visitPackageConstant, visitStringConstant, visitUtf8Constant
visitAnyPrimitiveArrayConstantElement
public void visitAnyClass(Clazz clazz)
ClassVisitor
visitAnyClass
in interface ClassVisitor
public void visitProgramClass(ProgramClass programClass)
visitProgramClass
in interface ClassVisitor
public void visitAnyAttribute(Clazz clazz, Attribute attribute)
AttributeVisitor
visitAnyAttribute
in interface AttributeVisitor
public void visitCodeAttribute(Clazz clazz, Method method, CodeAttribute codeAttribute)
visitCodeAttribute
in interface AttributeVisitor
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 visitAnyConstant(Clazz clazz, Constant constant)
ConstantVisitor
visitAnyConstant
in interface ConstantVisitor
public void visitPrimitiveArrayConstant(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant)
visitPrimitiveArrayConstant
in interface ConstantVisitor
public void visitBooleanArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, boolean value)
visitBooleanArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitByteArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, byte value)
visitByteArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitCharArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, char value)
visitCharArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitShortArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, short value)
visitShortArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitIntArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, int value)
visitIntArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitFloatArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, float value)
visitFloatArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitLongArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, long value)
visitLongArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor
public void visitDoubleArrayConstantElement(Clazz clazz, PrimitiveArrayConstant primitiveArrayConstant, int index, double value)
visitDoubleArrayConstantElement
in interface PrimitiveArrayConstantElementVisitor