javassist.bytecode.stackmap
Class Tracer
java.lang.Object
javassist.bytecode.stackmap.Tracer
- All Implemented Interfaces:
- TypeTag
- Direct Known Subclasses:
- MapMaker
public abstract class Tracer
- extends java.lang.Object
- implements TypeTag
Method Summary |
protected static int |
copyFrom(int n,
TypeData[] srcTypes,
TypeData[] destTypes)
|
protected int |
doOpcode(int pos,
byte[] code)
Does abstract interpretation on the given bytecode instruction. |
protected void |
visitBranch(int pos,
byte[] code,
int offset)
|
protected void |
visitGoto(int pos,
byte[] code,
int offset)
|
protected void |
visitJSR(int pos,
byte[] code)
Invoked when the visited instruction is jsr. |
protected void |
visitLookupSwitch(int pos,
byte[] code,
int n,
int pairsPos,
int defaultOffset)
|
protected void |
visitRET(int pos,
byte[] code)
Invoked when the visited instruction is ret or wide ret. |
protected void |
visitReturn(int pos,
byte[] code)
|
protected void |
visitTableSwitch(int pos,
byte[] code,
int n,
int offsetPos,
int defaultOffset)
|
protected void |
visitThrow(int pos,
byte[] code)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
classPool
protected ClassPool classPool
cpool
protected ConstPool cpool
returnType
protected java.lang.String returnType
stackTop
protected int stackTop
stackTypes
protected TypeData[] stackTypes
localsTypes
protected TypeData[] localsTypes
Tracer
public Tracer(ClassPool classes,
ConstPool cp,
int maxStack,
int maxLocals,
java.lang.String retType)
Tracer
public Tracer(Tracer t,
boolean copyStack)
copyFrom
protected static int copyFrom(int n,
TypeData[] srcTypes,
TypeData[] destTypes)
doOpcode
protected int doOpcode(int pos,
byte[] code)
throws BadBytecode
- Does abstract interpretation on the given bytecode instruction.
It records whether or not a local variable (i.e. register) is accessed.
If the instruction requires that a local variable or
a stack element has a more specific type, this method updates the
type of it.
- Returns:
- the size of the instruction at POS.
- Throws:
BadBytecode
visitBranch
protected void visitBranch(int pos,
byte[] code,
int offset)
throws BadBytecode
- Throws:
BadBytecode
visitGoto
protected void visitGoto(int pos,
byte[] code,
int offset)
throws BadBytecode
- Throws:
BadBytecode
visitReturn
protected void visitReturn(int pos,
byte[] code)
throws BadBytecode
- Throws:
BadBytecode
visitThrow
protected void visitThrow(int pos,
byte[] code)
throws BadBytecode
- Throws:
BadBytecode
visitTableSwitch
protected void visitTableSwitch(int pos,
byte[] code,
int n,
int offsetPos,
int defaultOffset)
throws BadBytecode
- Parameters:
pos
- the position of TABLESWITCHcode
- bytecoden
- the number of case labelsoffsetPos
- the position of the branch-target table.defaultOffset
- the offset to the default branch target.
- Throws:
BadBytecode
visitLookupSwitch
protected void visitLookupSwitch(int pos,
byte[] code,
int n,
int pairsPos,
int defaultOffset)
throws BadBytecode
- Parameters:
pos
- the position of LOOKUPSWITCHcode
- bytecoden
- the number of case labelsoffsetPos
- the position of the table of pairs of a value and a branch target.defaultOffset
- the offset to the default branch target.
- Throws:
BadBytecode
visitJSR
protected void visitJSR(int pos,
byte[] code)
throws BadBytecode
- Invoked when the visited instruction is jsr.
- Throws:
BadBytecode
visitRET
protected void visitRET(int pos,
byte[] code)
throws BadBytecode
- Invoked when the visited instruction is ret or wide ret.
- Throws:
BadBytecode
Copyright © 2011. All Rights Reserved.