Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.bcel.util
Class BCELFactory  view BCELFactory download BCELFactory.java

java.lang.Object
  extended byorg.apache.bcel.generic.EmptyVisitor
      extended byorg.apache.bcel.util.BCELFactory
All Implemented Interfaces:
org.apache.bcel.generic.Visitor

class BCELFactory
extends org.apache.bcel.generic.EmptyVisitor

Factory creates il.append() statements, and sets instruction targets. A helper class for BCELifier.

Version:
$Id: BCELFactory.java 410087 2006-05-29 12:12:19Z tcurdt $

Field Summary
private  org.apache.bcel.generic.ConstantPoolGen _cp
           
private  org.apache.bcel.generic.MethodGen _mg
           
private  java.io.PrintWriter _out
           
private  java.util.Map branch_map
           
private  java.util.List branches
           
 
Constructor Summary
(package private) BCELFactory(org.apache.bcel.generic.MethodGen mg, java.io.PrintWriter out)
           
 
Method Summary
private  void createConstant(java.lang.Object value)
           
 void start()
           
private  void updateBranchTargets()
           
private  void updateExceptionHandlers()
           
 void visitAllocationInstruction(org.apache.bcel.generic.AllocationInstruction i)
           
 void visitArrayInstruction(org.apache.bcel.generic.ArrayInstruction i)
           
 void visitBranchInstruction(org.apache.bcel.generic.BranchInstruction bi)
           
 void visitCHECKCAST(org.apache.bcel.generic.CHECKCAST i)
           
 void visitConstantPushInstruction(org.apache.bcel.generic.ConstantPushInstruction i)
           
 void visitFieldInstruction(org.apache.bcel.generic.FieldInstruction i)
           
 void visitINSTANCEOF(org.apache.bcel.generic.INSTANCEOF i)
           
private  boolean visitInstruction(org.apache.bcel.generic.Instruction i)
           
 void visitInvokeInstruction(org.apache.bcel.generic.InvokeInstruction i)
           
 void visitLDC(org.apache.bcel.generic.LDC i)
           
 void visitLDC2_W(org.apache.bcel.generic.LDC2_W i)
           
 void visitLocalVariableInstruction(org.apache.bcel.generic.LocalVariableInstruction i)
           
 void visitRET(org.apache.bcel.generic.RET i)
           
 void visitReturnInstruction(org.apache.bcel.generic.ReturnInstruction i)
           
 
Methods inherited from class org.apache.bcel.generic.EmptyVisitor
visitAALOAD, visitAASTORE, visitACONST_NULL, visitALOAD, visitANEWARRAY, visitARETURN, visitArithmeticInstruction, visitARRAYLENGTH, visitASTORE, visitATHROW, visitBALOAD, visitBASTORE, visitBIPUSH, visitBREAKPOINT, visitCALOAD, visitCASTORE, visitConversionInstruction, visitCPInstruction, visitD2F, visitD2I, visitD2L, visitDADD, visitDALOAD, visitDASTORE, visitDCMPG, visitDCMPL, visitDCONST, visitDDIV, visitDLOAD, visitDMUL, visitDNEG, visitDREM, visitDRETURN, visitDSTORE, visitDSUB, visitDUP_X1, visitDUP_X2, visitDUP, visitDUP2_X1, visitDUP2_X2, visitDUP2, visitExceptionThrower, visitF2D, visitF2I, visitF2L, visitFADD, visitFALOAD, visitFASTORE, visitFCMPG, visitFCMPL, visitFCONST, visitFDIV, visitFieldOrMethod, visitFLOAD, visitFMUL, visitFNEG, visitFREM, visitFRETURN, visitFSTORE, visitFSUB, visitGETFIELD, visitGETSTATIC, visitGOTO_W, visitGOTO, visitGotoInstruction, visitI2B, visitI2C, visitI2D, visitI2F, visitI2L, visitI2S, visitIADD, visitIALOAD, visitIAND, visitIASTORE, visitICONST, visitIDIV, visitIF_ACMPEQ, visitIF_ACMPNE, visitIF_ICMPEQ, visitIF_ICMPGE, visitIF_ICMPGT, visitIF_ICMPLE, visitIF_ICMPLT, visitIF_ICMPNE, visitIFEQ, visitIFGE, visitIFGT, visitIfInstruction, visitIFLE, visitIFLT, visitIFNE, visitIFNONNULL, visitIFNULL, visitIINC, visitILOAD, visitIMPDEP1, visitIMPDEP2, visitIMUL, visitINEG, visitINVOKEINTERFACE, visitINVOKESPECIAL, visitINVOKESTATIC, visitINVOKEVIRTUAL, visitIOR, visitIREM, visitIRETURN, visitISHL, visitISHR, visitISTORE, visitISUB, visitIUSHR, visitIXOR, visitJSR_W, visitJSR, visitJsrInstruction, visitL2D, visitL2F, visitL2I, visitLADD, visitLALOAD, visitLAND, visitLASTORE, visitLCMP, visitLCONST, visitLDIV, visitLLOAD, visitLMUL, visitLNEG, visitLoadClass, visitLoadInstruction, visitLOOKUPSWITCH, visitLOR, visitLREM, visitLRETURN, visitLSHL, visitLSHR, visitLSTORE, visitLSUB, visitLUSHR, visitLXOR, visitMONITORENTER, visitMONITOREXIT, visitMULTIANEWARRAY, visitNEW, visitNEWARRAY, visitNOP, visitPOP, visitPOP2, visitPopInstruction, visitPushInstruction, visitPUTFIELD, visitPUTSTATIC, visitRETURN, visitSALOAD, visitSASTORE, visitSelect, visitSIPUSH, visitStackConsumer, visitStackInstruction, visitStackProducer, visitStoreInstruction, visitSWAP, visitTABLESWITCH, visitTypedInstruction, visitUnconditionalBranch, visitVariableLengthInstruction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_mg

private org.apache.bcel.generic.MethodGen _mg

_out

private java.io.PrintWriter _out

_cp

private org.apache.bcel.generic.ConstantPoolGen _cp

branch_map

private java.util.Map branch_map

branches

private java.util.List branches
Constructor Detail

BCELFactory

BCELFactory(org.apache.bcel.generic.MethodGen mg,
            java.io.PrintWriter out)
Method Detail

start

public void start()

visitInstruction

private boolean visitInstruction(org.apache.bcel.generic.Instruction i)

visitLocalVariableInstruction

public void visitLocalVariableInstruction(org.apache.bcel.generic.LocalVariableInstruction i)

visitArrayInstruction

public void visitArrayInstruction(org.apache.bcel.generic.ArrayInstruction i)

visitFieldInstruction

public void visitFieldInstruction(org.apache.bcel.generic.FieldInstruction i)

visitInvokeInstruction

public void visitInvokeInstruction(org.apache.bcel.generic.InvokeInstruction i)

visitAllocationInstruction

public void visitAllocationInstruction(org.apache.bcel.generic.AllocationInstruction i)

createConstant

private void createConstant(java.lang.Object value)

visitLDC

public void visitLDC(org.apache.bcel.generic.LDC i)

visitLDC2_W

public void visitLDC2_W(org.apache.bcel.generic.LDC2_W i)

visitConstantPushInstruction

public void visitConstantPushInstruction(org.apache.bcel.generic.ConstantPushInstruction i)

visitINSTANCEOF

public void visitINSTANCEOF(org.apache.bcel.generic.INSTANCEOF i)

visitCHECKCAST

public void visitCHECKCAST(org.apache.bcel.generic.CHECKCAST i)

visitReturnInstruction

public void visitReturnInstruction(org.apache.bcel.generic.ReturnInstruction i)

visitBranchInstruction

public void visitBranchInstruction(org.apache.bcel.generic.BranchInstruction bi)

visitRET

public void visitRET(org.apache.bcel.generic.RET i)

updateBranchTargets

private void updateBranchTargets()

updateExceptionHandlers

private void updateExceptionHandlers()