📄 executionvisitor.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"><!--NewPage--><HTML><HEAD><!-- Generated by javadoc on Sat Dec 15 07:40:18 EST 2001 --><TITLE>bcel API: Class ExecutionVisitor</TITLE><LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"></HEAD><BODY BGCOLOR="white"><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_top"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_top_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/ExecutionVisitor.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../org/apache/bcel/verifier/structurals/ExceptionHandlers.html"><B>PREV CLASS</B></A> <A HREF="../../../../../org/apache/bcel/verifier/structurals/Frame.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../../../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="ExecutionVisitor.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><!-- ======== START OF CLASS DATA ======== --><H2><FONT SIZE="-1">org.apache.bcel.verifier.structurals</FONT><BR>Class ExecutionVisitor</H2><PRE>java.lang.Object | +--<A HREF="../../../../../org/apache/bcel/generic/EmptyVisitor.html">org.apache.bcel.generic.EmptyVisitor</A> | +--<B>org.apache.bcel.verifier.structurals.ExecutionVisitor</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD><A HREF="../../../../../org/apache/bcel/generic/Visitor.html">Visitor</A></DD></DL><HR><DL><DT>public class <B>ExecutionVisitor</B><DT>extends <A HREF="../../../../../org/apache/bcel/generic/EmptyVisitor.html">EmptyVisitor</A><DT>implements <A HREF="../../../../../org/apache/bcel/generic/Visitor.html">Visitor</A></DL><P>This Visitor class may be used for a type-based Java Virtual Machine simulation. It does not check for correct types on the OperandStack or in the LocalVariables; nor does it check their sizes are sufficiently big. Thus, to use this Visitor for bytecode verifying, you have to make sure externally that the type constraints of the Java Virtual Machine instructions are satisfied. An InstConstraintVisitor may be used for this. Anyway, this Visitor does not mandate it. For example, when you visitIADD(IADD o), then there are two stack slots popped and one stack slot containing a Type.INT is pushed (where you could also pop only one slot if you know there are two Type.INT on top of the stack). Monitor-specific behaviour is not simulated. </P><B>Conventions:</B> Type.VOID will never be pushed onto the stack. Type.DOUBLE and Type.LONG that would normally take up two stack slots (like Double_HIGH and Double_LOW) are represented by a simple single Type.DOUBLE or Type.LONG object on the stack here. If a two-slot type is stored into a local variable, the next variable is given the type Type.UNKNOWN.<P><DL><DT><B>Version: </B><DD>$Id: ExecutionVisitor.java,v 1.1.1.1 2001/10/29 20:00:39 jvanzyl Exp $</DD><DT><B>Author: </B><DD><A HREF="http://www.inf.fu-berlin.de/~ehaase"/>Enver Haase</A></DD><DT><B>See Also: </B><DD><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitDSTORE(org.apache.bcel.generic.DSTORE)"><CODE>visitDSTORE(DSTORE o)</CODE></A>, <A HREF="../../../../../org/apache/bcel/verifier/structurals/InstConstraintVisitor.html"><CODE>InstConstraintVisitor</CODE></A></DL><HR><P><!-- ======== INNER CLASS SUMMARY ======== --><!-- =========== FIELD SUMMARY =========== --><!-- ======== CONSTRUCTOR SUMMARY ======== --><A NAME="constructor_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Constructor Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#ExecutionVisitor()">ExecutionVisitor</A></B>()</CODE><BR> Constructor.</TD></TR></TABLE> <!-- ========== METHOD SUMMARY =========== --><A NAME="method_summary"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#setConstantPoolGen(org.apache.bcel.generic.ConstantPoolGen)">setConstantPoolGen</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ConstantPoolGen.html">ConstantPoolGen</A> cpg)</CODE><BR> Sets the ConstantPoolGen needed for symbolic execution.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#setFrame(org.apache.bcel.verifier.structurals.Frame)">setFrame</A></B>(<A HREF="../../../../../org/apache/bcel/verifier/structurals/Frame.html">Frame</A> f)</CODE><BR> The only method granting access to the single instance of the ExecutionVisitor class.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitAALOAD(org.apache.bcel.generic.AALOAD)">visitAALOAD</A></B>(<A HREF="../../../../../org/apache/bcel/generic/AALOAD.html">AALOAD</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitAASTORE(org.apache.bcel.generic.AASTORE)">visitAASTORE</A></B>(<A HREF="../../../../../org/apache/bcel/generic/AASTORE.html">AASTORE</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitACONST_NULL(org.apache.bcel.generic.ACONST_NULL)">visitACONST_NULL</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ACONST_NULL.html">ACONST_NULL</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitALOAD(org.apache.bcel.generic.ALOAD)">visitALOAD</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ALOAD.html">ALOAD</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitANEWARRAY(org.apache.bcel.generic.ANEWARRAY)">visitANEWARRAY</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ANEWARRAY.html">ANEWARRAY</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitARETURN(org.apache.bcel.generic.ARETURN)">visitARETURN</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ARETURN.html">ARETURN</A> o)</CODE><BR> Symbolically executes the corresponding Java Virtual Machine instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../../org/apache/bcel/verifier/structurals/ExecutionVisitor.html#visitARRAYLENGTH(org.apache.bcel.generic.ARRAYLENGTH)">visitARRAYLENGTH</A></B>(<A HREF="../../../../../org/apache/bcel/generic/ARRAYLENGTH.html">ARRAYLENGTH</A> o)</CODE>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -