📄 instructionlist.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:15 EST 2001 --><TITLE>bcel API: Class InstructionList</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/InstructionList.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/generic/InstructionHandle.html"><B>PREV CLASS</B></A> <A HREF="../../../../org/apache/bcel/generic/InvokeInstruction.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="InstructionList.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.generic</FONT><BR>Class InstructionList</H2><PRE>java.lang.Object | +--<B>org.apache.bcel.generic.InstructionList</B></PRE><DL><DT><B>All Implemented Interfaces:</B> <DD>java.io.Serializable</DD></DL><HR><DL><DT>public class <B>InstructionList</B><DT>extends java.lang.Object<DT>implements java.io.Serializable</DL><P>This class is a container for a list of <a href="Instruction.html">Instruction</a> objects. Instructions can be appended, inserted, moved, deleted, etc.. Instructions are being wrapped into <a href="InstructionHandle.html">InstructionHandles</a> objects that are returned upon append/insert operations. They give the user (read only) access to the list structure, such that it can be traversed and manipulated in a controlled way. A list is finally dumped to a byte code array with <a href="#getByteCode()">getByteCode</a>.<P><DL><DT><B>Version: </B><DD>$Id: InstructionList.java,v 1.1.1.1 2001/10/29 20:00:20 jvanzyl Exp $</DD><DT><B>Author: </B><DD><A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A></DD><DT><B>See Also: </B><DD><A HREF="../../../../org/apache/bcel/generic/Instruction.html"><CODE>Instruction</CODE></A>, <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html"><CODE>InstructionHandle</CODE></A>, <A HREF="../../../../org/apache/bcel/generic/BranchHandle.html"><CODE>BranchHandle</CODE></A>, <A HREF="../../../../serialized-form.html#org.apache.bcel.generic.InstructionList">Serialized Form</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/generic/InstructionList.html#InstructionList()">InstructionList</A></B>()</CODE><BR> Create (empty) instruction list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#InstructionList(org.apache.bcel.generic.BranchInstruction)">InstructionList</A></B>(<A HREF="../../../../org/apache/bcel/generic/BranchInstruction.html">BranchInstruction</A> i)</CODE><BR> Create instruction list containing one instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#InstructionList(byte[])">InstructionList</A></B>(byte[] code)</CODE><BR> Initialize instruction list from byte array.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#InstructionList(org.apache.bcel.generic.CompoundInstruction)">InstructionList</A></B>(<A HREF="../../../../org/apache/bcel/generic/CompoundInstruction.html">CompoundInstruction</A> c)</CODE><BR> Initialize list with (nonnull) compound instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#InstructionList(org.apache.bcel.generic.Instruction)">InstructionList</A></B>(<A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i)</CODE><BR> Create instruction list containing one instruction.</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/generic/InstructionList.html#addObserver(org.apache.bcel.generic.InstructionListObserver)">addObserver</A></B>(<A HREF="../../../../org/apache/bcel/generic/InstructionListObserver.html">InstructionListObserver</A> o)</CODE><BR> Add observer for this object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/BranchHandle.html">BranchHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.BranchInstruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/BranchInstruction.html">BranchInstruction</A> i)</CODE><BR> Append a branch instruction to the end of this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.CompoundInstruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/CompoundInstruction.html">CompoundInstruction</A> c)</CODE><BR> Append a compound instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.Instruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i)</CODE><BR> Append an instruction to the end of this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.Instruction, org.apache.bcel.generic.CompoundInstruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i, <A HREF="../../../../org/apache/bcel/generic/CompoundInstruction.html">CompoundInstruction</A> c)</CODE><BR> Append a compound instruction, after instruction i.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/BranchHandle.html">BranchHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.InstructionHandle, org.apache.bcel.generic.BranchInstruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A> ih, <A HREF="../../../../org/apache/bcel/generic/BranchInstruction.html">BranchInstruction</A> i)</CODE><BR> Append an instruction after instruction (handle) ih contained in this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.InstructionHandle, org.apache.bcel.generic.CompoundInstruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A> ih, <A HREF="../../../../org/apache/bcel/generic/CompoundInstruction.html">CompoundInstruction</A> c)</CODE><BR> Append a compound instruction.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.InstructionHandle, org.apache.bcel.generic.Instruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A> ih, <A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i)</CODE><BR> Append an instruction after instruction (handle) ih contained in this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.InstructionHandle, org.apache.bcel.generic.InstructionList)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A> ih, <A HREF="../../../../org/apache/bcel/generic/InstructionList.html">InstructionList</A> il)</CODE><BR> Append another list after instruction (handle) ih contained in this list.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.Instruction, org.apache.bcel.generic.Instruction)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i, <A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> j)</CODE><BR> Append a single instruction j after another instruction i, which must be in this list of course!</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> <A HREF="../../../../org/apache/bcel/generic/InstructionHandle.html">InstructionHandle</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/InstructionList.html#append(org.apache.bcel.generic.Instruction, org.apache.bcel.generic.InstructionList)">append</A></B>(<A HREF="../../../../org/apache/bcel/generic/Instruction.html">Instruction</A> i, <A HREF="../../../../org/apache/bcel/generic/InstructionList.html">InstructionList</A> il)</CODE><BR> Append another list after instruction i contained in this list.</TD></TR>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -