public class NilMethodBodyVisitor extends Object implements IMethodBodyVisitor
Constructor and Description |
---|
NilMethodBodyVisitor() |
Modifier and Type | Method and Description |
---|---|
void |
labelCurrent(Label l)
Bind a Label object (not to be confused with the AVM OP_label
instruction) to the last-visited ABC instruction in this method.
|
void |
labelNext(Label l)
Bind a Label object (not to be confused with the AVM OP_label
instruction) to the next ABC instruction that gets visited in this method
|
void |
visit()
Begin processing a method body.
|
void |
visitEnd()
Indicates that no further method calls will be made on this visitor
instance.
|
int |
visitException(Label from,
Label to,
Label target,
Name exception_type,
Name catch_var)
Visit an exception handler.
|
void |
visitInstruction(Instruction instruction)
Vist an instruction
|
void |
visitInstruction(int opcode)
Visit an instruction with no operands.
|
void |
visitInstruction(int opcode,
int immediate_operand)
Visit an instruction with an immediate operand.
|
void |
visitInstruction(int opcode,
Object single_operand)
Visit an instruction with a single operand (convenience method).
|
void |
visitInstruction(int opcode,
Object[] operands)
Visit an instruction.
|
void |
visitInstructionList(InstructionList new_list)
Reset the method body's instruction list en bloc.
|
ITraitsVisitor |
visitTraits()
Visit the method body's traits (local variables).
|
public ITraitsVisitor visitTraits()
IMethodBodyVisitor
visitTraits
in interface IMethodBodyVisitor
public void visitInstructionList(InstructionList new_list)
IMethodBodyVisitor
visitInstructionList
in interface IMethodBodyVisitor
public void visitInstruction(int opcode, Object single_operand)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
opcode
- - the instruction's opcode.single_operand
- - the instruction's operand.public void visitInstruction(Instruction instruction)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
instruction
- the Instruction to visitpublic void visitInstruction(int opcode, Object[] operands)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
opcode
- - the instruction's opcode.operands
- - the instruction's operands.public void visitInstruction(int opcode, int immediate_operand)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
opcode
- - the instruction's opcode.immediate_operand
- - the operand.public void visitInstruction(int opcode)
IMethodBodyVisitor
visitInstruction
in interface IMethodBodyVisitor
opcode
- - the instruction's opcode.public int visitException(Label from, Label to, Label target, Name exception_type, Name catch_var)
IMethodBodyVisitor
visitException
in interface IMethodBodyVisitor
from
- - the label that starts the "try" region.to
- - the label that ends the "try" region.target
- - the "catch" target.exception_type
- - the type of exception to be handled. "*" is valid
and handles any exception.catch_var
- - the name of the exception variable. May be null if no
exception variable is desired.public void visitEnd()
IVisitor
public void visit()
IMethodBodyVisitor
visit
in interface IMethodBodyVisitor
public void labelCurrent(Label l)
IMethodBodyVisitor
labelCurrent
in interface IMethodBodyVisitor
public void labelNext(Label l)
IMethodBodyVisitor
labelNext
in interface IMethodBodyVisitor
Copyright © 2016 The Apache Software Foundation. All rights reserved.