edu.umd.cs.findbugs.visitclass

Class DismantleBytecode

public abstract class DismantleBytecode extends AnnotationVisitor

Field Summary
protected byte[]codeBytes
protected LineNumberTablelineNumberTable
static byteM_BR
static byteM_CP
static byteM_INT
Meaning of bytecode operands
static byteM_PAD
static byteM_R
static byteM_UINT
Method Summary
voidafterOpcode(int seen)
booleanatCatchBlock()
voidbeforeOpcode(int seen)
intgetBranchFallThrough()
intgetBranchOffset()
intgetBranchTarget()
StringgetClassConstantOperand()
intgetCodeByte(int offset)
ConstantgetConstantRefOperand()
intgetDefaultSwitchOffset()
StringgetDottedClassConstantOperand()
If the current opcode has a class operand, get the associated class constant, dot-formatted
intgetIntConstant()
intgetMaxPC()
StringgetNameConstantOperand()
If the current opcode has a reference constant operand, get its name
intgetNextPC()
intgetOpcode()
intgetPC()
intgetPrevOpcode(int offset)
return previous opcode;
StringgetRefConstantOperand()
If the current opcode has a reference constant operand, get its string representation
booleangetRefFieldIsStatic()
intgetRegisterOperand()
StringgetSigConstantOperand()
If the current opcode has a reference constant operand, get its signature, slash-formatted
StringgetStringConstantOperand()
If the current opcode has a string constant operand, get its name
static booleanisBranch(int opcode)
Return whether or not given opcode is a branch instruction.
booleanisRegisterLoad()
booleanisRegisterStore()
static booleanisSwitch(int opcode)
Return whether or not given opcode is a switch instruction.
voidprintOpCode(int seen)
voidsawBranchTo(int seen)
voidsawClass()
voidsawDouble(double seen)
voidsawField()
voidsawFloat(float seen)
voidsawIMethod()
voidsawInt(int seen)
voidsawLong(long seen)
voidsawMethod()
voidsawOffset(int seen)
voidsawOpcode(int seen)
voidsawRegister(int r)
voidsawString(String seen)

Field Detail

codeBytes

protected byte[] codeBytes

lineNumberTable

protected LineNumberTable lineNumberTable

M_BR

public static final byte M_BR

M_CP

public static final byte M_CP

M_INT

public static final byte M_INT
Meaning of bytecode operands

M_PAD

public static final byte M_PAD

M_R

public static final byte M_R

M_UINT

public static final byte M_UINT

Method Detail

afterOpcode

public void afterOpcode(int seen)

atCatchBlock

public boolean atCatchBlock()

beforeOpcode

public void beforeOpcode(int seen)

getBranchFallThrough

public int getBranchFallThrough()

getBranchOffset

public int getBranchOffset()

getBranchTarget

public int getBranchTarget()

getClassConstantOperand

public String getClassConstantOperand()

getCodeByte

public int getCodeByte(int offset)

getConstantRefOperand

public Constant getConstantRefOperand()

getDefaultSwitchOffset

public int getDefaultSwitchOffset()

getDottedClassConstantOperand

public String getDottedClassConstantOperand()
If the current opcode has a class operand, get the associated class constant, dot-formatted

getIntConstant

public int getIntConstant()

getMaxPC

public int getMaxPC()

getNameConstantOperand

public String getNameConstantOperand()
If the current opcode has a reference constant operand, get its name

getNextPC

public int getNextPC()

Returns: Returns the nextPC.

getOpcode

public int getOpcode()

getPC

public int getPC()

getPrevOpcode

public int getPrevOpcode(int offset)
return previous opcode;

Parameters: offset 0 for current opcode, 1 for one before that, etc.

getRefConstantOperand

public String getRefConstantOperand()
If the current opcode has a reference constant operand, get its string representation

getRefFieldIsStatic

public boolean getRefFieldIsStatic()

getRegisterOperand

public int getRegisterOperand()

getSigConstantOperand

public String getSigConstantOperand()
If the current opcode has a reference constant operand, get its signature, slash-formatted

getStringConstantOperand

public String getStringConstantOperand()
If the current opcode has a string constant operand, get its name

isBranch

public static boolean isBranch(int opcode)
Return whether or not given opcode is a branch instruction.

Parameters: opcode the opcode

Returns: true if instruction is a branch, false if not

isRegisterLoad

public boolean isRegisterLoad()

isRegisterStore

public boolean isRegisterStore()

isSwitch

public static boolean isSwitch(int opcode)
Return whether or not given opcode is a switch instruction.

Parameters: opcode the opcode

Returns: true if instruction is a switch, false if not

printOpCode

public void printOpCode(int seen)

sawBranchTo

public void sawBranchTo(int seen)

sawClass

public void sawClass()

sawDouble

public void sawDouble(double seen)

sawField

public void sawField()

sawFloat

public void sawFloat(float seen)

sawIMethod

public void sawIMethod()

sawInt

public void sawInt(int seen)

sawLong

public void sawLong(long seen)

sawMethod

public void sawMethod()

sawOffset

public void sawOffset(int seen)

sawOpcode

public void sawOpcode(int seen)

sawRegister

public void sawRegister(int r)

sawString

public void sawString(String seen)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.