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_bodyprivate int_currentOffsetprivate int[]_lineNumbersprivate ITextOutput_outputprivate DecompilerSettings_settingsprivate static java.lang.StringLINE_NUMBER_CODEprivate static intMAX_OPCODE_LENGTHprivate static java.lang.String[]OPCODE_NAMES-
Fields inherited from interface com.strobel.assembler.ir.InstructionVisitor
EMPTY
-
-
Constructor Summary
Constructors Modifier Constructor Description privateInstructionPrinter(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:
visitin interfaceInstructionVisitor
-
visit
public void visit(OpCode op)
- Specified by:
visitin interfaceInstructionVisitor
-
findVariable
private VariableDefinition findVariable(OpCode op, int slot, int offset)
-
visitConstant
public void visitConstant(OpCode op, TypeReference value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, MethodHandle value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, int value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, long value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, float value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, double value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitConstant
public void visitConstant(OpCode op, java.lang.String value)
- Specified by:
visitConstantin interfaceInstructionVisitor
-
visitBranch
public void visitBranch(OpCode op, Instruction target)
- Specified by:
visitBranchin interfaceInstructionVisitor
-
visitVariable
public void visitVariable(OpCode op, VariableReference variable)
- Specified by:
visitVariablein interfaceInstructionVisitor
-
visitVariable
public void visitVariable(OpCode op, VariableReference variable, int operand)
- Specified by:
visitVariablein interfaceInstructionVisitor
-
visitType
public void visitType(OpCode op, TypeReference type)
- Specified by:
visitTypein interfaceInstructionVisitor
-
visitMethod
public void visitMethod(OpCode op, MethodReference method)
- Specified by:
visitMethodin interfaceInstructionVisitor
-
visitDynamicCallSite
public void visitDynamicCallSite(OpCode op, DynamicCallSite callSite)
- Specified by:
visitDynamicCallSitein interfaceInstructionVisitor
-
visitField
public void visitField(OpCode op, FieldReference field)
- Specified by:
visitFieldin interfaceInstructionVisitor
-
visitLabel
public void visitLabel(Label label)
- Specified by:
visitLabelin interfaceInstructionVisitor
-
visitSwitch
public void visitSwitch(OpCode op, SwitchInfo switchInfo)
- Specified by:
visitSwitchin interfaceInstructionVisitor
-
visitEnd
public void visitEnd()
- Specified by:
visitEndin interfaceInstructionVisitor
-
-