org.apache.bcel.verifier.statics

Class Pass3aVerifier.InstOperandConstraintVisitor

private class Pass3aVerifier.InstOperandConstraintVisitor extends EmptyVisitor

This visitor class does the actual checking for the instruction operand's constraints.
Field Summary
ConstantPoolGencpg
The ConstantPoolGen instance this Visitor operates on.
Constructor Summary
InstOperandConstraintVisitor(ConstantPoolGen cpg)
The only Constructor.
Method Summary
voidconstraintViolated(Instruction i, String message)
A utility method to always raise an exeption.
voidindexValid(Instruction i, int idx)
A utility method to raise an exception if the index is not a valid constant pool index.
intmax_locals()
Utility method to return the max_locals value of the method verified by the surrounding Pass3aVerifier instance.
booleanobjarrayequals(Object[] o, Object[] p)
A utility method like equals(Object) for arrays.
voidvisitALOAD(ALOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitANEWARRAY(ANEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitASTORE(ASTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitCHECKCAST(CHECKCAST o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitDLOAD(DLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitDSTORE(DSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitFieldInstruction(FieldInstruction o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitFLOAD(FLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitFSTORE(FSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitGETSTATIC(GETSTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitIINC(IINC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitILOAD(ILOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitInvokeInstruction(InvokeInstruction o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitINSTANCEOF(INSTANCEOF o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitINVOKEINTERFACE(INVOKEINTERFACE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitINVOKESPECIAL(INVOKESPECIAL o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitINVOKESTATIC(INVOKESTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitINVOKEVIRTUAL(INVOKEVIRTUAL o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitISTORE(ISTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitLDC(LDC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitLDC2_W(LDC2_W o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitLLOAD(LLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitLoadClass(LoadClass o)
Assures the generic preconditions of a LoadClass instance.
voidvisitLOOKUPSWITCH(LOOKUPSWITCH o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitLSTORE(LSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitMULTIANEWARRAY(MULTIANEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitNEW(NEW o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitNEWARRAY(NEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitPUTSTATIC(PUTSTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitRET(RET o)
Checks if the constraints of operands of the said instruction(s) are satisfied.
voidvisitTABLESWITCH(TABLESWITCH o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

Field Detail

cpg

private ConstantPoolGen cpg
The ConstantPoolGen instance this Visitor operates on.

Constructor Detail

InstOperandConstraintVisitor

InstOperandConstraintVisitor(ConstantPoolGen cpg)
The only Constructor.

Method Detail

constraintViolated

private void constraintViolated(Instruction i, String message)
A utility method to always raise an exeption.

indexValid

private void indexValid(Instruction i, int idx)
A utility method to raise an exception if the index is not a valid constant pool index.

max_locals

private int max_locals()
Utility method to return the max_locals value of the method verified by the surrounding Pass3aVerifier instance.

objarrayequals

private boolean objarrayequals(Object[] o, Object[] p)
A utility method like equals(Object) for arrays. The equality of the elements is based on their equals(Object) method instead of their object identity.

visitALOAD

public void visitALOAD(ALOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitANEWARRAY

public void visitANEWARRAY(ANEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitASTORE

public void visitASTORE(ASTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitCHECKCAST

public void visitCHECKCAST(CHECKCAST o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitDLOAD

public void visitDLOAD(DLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitDSTORE

public void visitDSTORE(DSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitFieldInstruction

public void visitFieldInstruction(FieldInstruction o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitFLOAD

public void visitFLOAD(FLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitFSTORE

public void visitFSTORE(FSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitGETSTATIC

public void visitGETSTATIC(GETSTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitIINC

public void visitIINC(IINC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitILOAD

public void visitILOAD(ILOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitInvokeInstruction

public void visitInvokeInstruction(InvokeInstruction o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitINSTANCEOF

public void visitINSTANCEOF(INSTANCEOF o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitINVOKEINTERFACE

public void visitINVOKEINTERFACE(INVOKEINTERFACE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitINVOKESPECIAL

public void visitINVOKESPECIAL(INVOKESPECIAL o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitINVOKESTATIC

public void visitINVOKESTATIC(INVOKESTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitINVOKEVIRTUAL

public void visitINVOKEVIRTUAL(INVOKEVIRTUAL o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitISTORE

public void visitISTORE(ISTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitLDC

public void visitLDC(LDC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitLDC2_W

public void visitLDC2_W(LDC2_W o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitLLOAD

public void visitLLOAD(LLOAD o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitLoadClass

public void visitLoadClass(LoadClass o)
Assures the generic preconditions of a LoadClass instance. The referenced class is loaded and pass2-verified.

visitLOOKUPSWITCH

public void visitLOOKUPSWITCH(LOOKUPSWITCH o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitLSTORE

public void visitLSTORE(LSTORE o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitMULTIANEWARRAY

public void visitMULTIANEWARRAY(MULTIANEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitNEW

public void visitNEW(NEW o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitNEWARRAY

public void visitNEWARRAY(NEWARRAY o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitPUTSTATIC

public void visitPUTSTATIC(PUTSTATIC o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitRET

public void visitRET(RET o)
Checks if the constraints of operands of the said instruction(s) are satisfied.

visitTABLESWITCH

public void visitTABLESWITCH(TABLESWITCH o)
Checks if the constraints of operands of the said instruction(s) are satisfied.