Package proguard.evaluation
Class Processor
- java.lang.Object
-
- proguard.evaluation.Processor
-
- All Implemented Interfaces:
InstructionVisitor
public class Processor extends java.lang.Object implements InstructionVisitor
ThisInstructionVisitor
executes the instructions that it visits on a given local variable frame and stack.
-
-
Constructor Summary
Constructors Constructor Description Processor(Variables variables, Stack stack, ValueFactory valueFactory, BranchUnit branchUnit, InvocationUnit invocationUnit, boolean alwaysCast)
Creates a new processor that operates on the given environment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)
void
visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
void
visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)
void
visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
void
visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)
void
visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface proguard.classfile.instruction.visitor.InstructionVisitor
visitAnyInstruction, visitAnySwitchInstruction
-
-
-
-
Constructor Detail
-
Processor
public Processor(Variables variables, Stack stack, ValueFactory valueFactory, BranchUnit branchUnit, InvocationUnit invocationUnit, boolean alwaysCast)
Creates a new processor that operates on the given environment.- Parameters:
variables
- the local variable frame.stack
- the local stack.valueFactory
- the value factory that will create all values during the evaluation.branchUnit
- the class that can affect the program counter.invocationUnit
- the class that can access other program members.alwaysCast
- a flag that specifies whether downcasts or casts of null values should always be performed.
-
-
Method Detail
-
visitSimpleInstruction
public void visitSimpleInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, SimpleInstruction simpleInstruction)
- Specified by:
visitSimpleInstruction
in interfaceInstructionVisitor
-
visitConstantInstruction
public void visitConstantInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, ConstantInstruction constantInstruction)
- Specified by:
visitConstantInstruction
in interfaceInstructionVisitor
-
visitVariableInstruction
public void visitVariableInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, VariableInstruction variableInstruction)
- Specified by:
visitVariableInstruction
in interfaceInstructionVisitor
-
visitBranchInstruction
public void visitBranchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, BranchInstruction branchInstruction)
- Specified by:
visitBranchInstruction
in interfaceInstructionVisitor
-
visitTableSwitchInstruction
public void visitTableSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, TableSwitchInstruction tableSwitchInstruction)
- Specified by:
visitTableSwitchInstruction
in interfaceInstructionVisitor
-
visitLookUpSwitchInstruction
public void visitLookUpSwitchInstruction(Clazz clazz, Method method, CodeAttribute codeAttribute, int offset, LookUpSwitchInstruction lookUpSwitchInstruction)
- Specified by:
visitLookUpSwitchInstruction
in interfaceInstructionVisitor
-
-