Package com.strobel.decompiler.languages
Class BytecodeLanguage.InstructionPrinter
- java.lang.Object
-
- com.strobel.decompiler.languages.BytecodeLanguage.InstructionPrinter
-
- All Implemented Interfaces:
InstructionVisitor
- Enclosing class:
- BytecodeLanguage
private static final class BytecodeLanguage.InstructionPrinter extends java.lang.Object implements InstructionVisitor
-
-
Field Summary
Fields Modifier and Type Field Description private MethodBody
_body
private int
_currentOffset
private int[]
_lineNumbers
private ITextOutput
_output
private DecompilerSettings
_settings
private static java.lang.String
LINE_NUMBER_CODE
private static int
MAX_OPCODE_LENGTH
private static java.lang.String[]
OPCODE_NAMES
-
Fields inherited from interface com.strobel.assembler.ir.InstructionVisitor
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description private
InstructionPrinter(ITextOutput output, MethodDefinition method, DecompilerSettings settings, int[] lineNumbers)
-
Method Summary
-
-
-
Field Detail
-
MAX_OPCODE_LENGTH
private static final int MAX_OPCODE_LENGTH
-
OPCODE_NAMES
private static final java.lang.String[] OPCODE_NAMES
-
LINE_NUMBER_CODE
private static final java.lang.String LINE_NUMBER_CODE
- See Also:
- Constant Field Values
-
_settings
private final DecompilerSettings _settings
-
_output
private final ITextOutput _output
-
_body
private final MethodBody _body
-
_lineNumbers
private final int[] _lineNumbers
-
_currentOffset
private int _currentOffset
-
-
Constructor Detail
-
InstructionPrinter
private InstructionPrinter(ITextOutput output, MethodDefinition method, DecompilerSettings settings, int[] lineNumbers)
-
-
Method Detail
-
printOpCode
private void printOpCode(OpCode opCode)
-
visit
public void visit(Instruction instruction)
- Specified by:
visit
in interfaceInstructionVisitor
-
visit
public void visit(OpCode op)
- Specified by:
visit
in interfaceInstructionVisitor
-
findVariable
private VariableDefinition findVariable(OpCode op, int slot, int offset)
-
visitConstant
public void visitConstant(OpCode op, TypeReference value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, MethodHandle value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, int value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, long value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, float value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, double value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, java.lang.String value)
- Specified by:
visitConstant
in interfaceInstructionVisitor
-
visitBranch
public void visitBranch(OpCode op, Instruction target)
- Specified by:
visitBranch
in interfaceInstructionVisitor
-
visitVariable
public void visitVariable(OpCode op, VariableReference variable)
- Specified by:
visitVariable
in interfaceInstructionVisitor
-
visitVariable
public void visitVariable(OpCode op, VariableReference variable, int operand)
- Specified by:
visitVariable
in interfaceInstructionVisitor
-
visitType
public void visitType(OpCode op, TypeReference type)
- Specified by:
visitType
in interfaceInstructionVisitor
-
visitMethod
public void visitMethod(OpCode op, MethodReference method)
- Specified by:
visitMethod
in interfaceInstructionVisitor
-
visitDynamicCallSite
public void visitDynamicCallSite(OpCode op, DynamicCallSite callSite)
- Specified by:
visitDynamicCallSite
in interfaceInstructionVisitor
-
visitField
public void visitField(OpCode op, FieldReference field)
- Specified by:
visitField
in interfaceInstructionVisitor
-
visitLabel
public void visitLabel(Label label)
- Specified by:
visitLabel
in interfaceInstructionVisitor
-
visitSwitch
public void visitSwitch(OpCode op, SwitchInfo switchInfo)
- Specified by:
visitSwitch
in interfaceInstructionVisitor
-
visitEnd
public void visitEnd()
- Specified by:
visitEnd
in interfaceInstructionVisitor
-
-