📄 constantpoolgen.html
字号:
<BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupClass(java.lang.String)">lookupClass</A></B>(java.lang.String str)</CODE><BR> Look for ConstantClass in ConstantPool named `str'.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupDouble(double)">lookupDouble</A></B>(double n)</CODE><BR> Look for ConstantDouble in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupFieldref(java.lang.String, java.lang.String, java.lang.String)">lookupFieldref</A></B>(java.lang.String class_name, java.lang.String field_name, java.lang.String signature)</CODE><BR> Look for ConstantFieldref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupFloat(float)">lookupFloat</A></B>(float n)</CODE><BR> Look for ConstantFloat in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupInteger(int)">lookupInteger</A></B>(int n)</CODE><BR> Look for ConstantInteger in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupInterfaceMethodref(org.apache.bcel.generic.MethodGen)">lookupInterfaceMethodref</A></B>(<A HREF="../../../../org/apache/bcel/generic/MethodGen.html">MethodGen</A> method)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupInterfaceMethodref(java.lang.String, java.lang.String, java.lang.String)">lookupInterfaceMethodref</A></B>(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)</CODE><BR> Look for ConstantInterfaceMethodref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupLong(long)">lookupLong</A></B>(long n)</CODE><BR> Look for ConstantLong in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupMethodref(org.apache.bcel.generic.MethodGen)">lookupMethodref</A></B>(<A HREF="../../../../org/apache/bcel/generic/MethodGen.html">MethodGen</A> method)</CODE><BR> </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupMethodref(java.lang.String, java.lang.String, java.lang.String)">lookupMethodref</A></B>(java.lang.String class_name, java.lang.String method_name, java.lang.String signature)</CODE><BR> Look for ConstantMethodref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupNameAndType(java.lang.String, java.lang.String)">lookupNameAndType</A></B>(java.lang.String name, java.lang.String signature)</CODE><BR> Look for ConstantNameAndType in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupString(java.lang.String)">lookupString</A></B>(java.lang.String str)</CODE><BR> Look for ConstantString in ConstantPool containing String `str'.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupUtf8(java.lang.String)">lookupUtf8</A></B>(java.lang.String n)</CODE><BR> Look for ConstantUtf8 in ConstantPool.</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/ConstantPoolGen.html#setConstant(int, org.apache.bcel.classfile.Constant)">setConstant</A></B>(int i, <A HREF="../../../../org/apache/bcel/classfile/Constant.html">Constant</A> c)</CODE><BR> Use with care!</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE> java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#toString()">toString</A></B>()</CODE><BR> </TD></TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.Object</B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait</CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><A NAME="field_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Field Detail</B></FONT></TD></TR></TABLE><A NAME="size"><!-- --></A><H3>size</H3><PRE>protected int <B>size</B></PRE><DL></DL><HR><A NAME="constants"><!-- --></A><H3>constants</H3><PRE>protected <A HREF="../../../../org/apache/bcel/classfile/Constant.html">Constant</A>[] <B>constants</B></PRE><DL></DL><HR><A NAME="index"><!-- --></A><H3>index</H3><PRE>protected int <B>index</B></PRE><DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="ConstantPoolGen(org.apache.bcel.classfile.Constant[])"><!-- --></A><H3>ConstantPoolGen</H3><PRE>public <B>ConstantPoolGen</B>(<A HREF="../../../../org/apache/bcel/classfile/Constant.html">Constant</A>[] cs)</PRE><DL><DD>Initialize with given array of constants.<DD><DL><DT><B>Parameters:</B><DD><CODE>c</CODE> - array of given constants, new ones will be appended</DL></DD></DL><HR><A NAME="ConstantPoolGen(org.apache.bcel.classfile.ConstantPool)"><!-- --></A><H3>ConstantPoolGen</H3><PRE>public <B>ConstantPoolGen</B>(<A HREF="../../../../org/apache/bcel/classfile/ConstantPool.html">ConstantPool</A> cp)</PRE><DL><DD>Initialize with given constant pool.</DL><HR><A NAME="ConstantPoolGen()"><!-- --></A><H3>ConstantPoolGen</H3><PRE>public <B>ConstantPoolGen</B>()</PRE><DL><DD>Create empty constant pool.</DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="adjustSize()"><!-- --></A><H3>adjustSize</H3><PRE>protected void <B>adjustSize</B>()</PRE><DL><DD>Resize internal array of constants.</DL><HR><A NAME="lookupString(java.lang.String)"><!-- --></A><H3>lookupString</H3><PRE>public int <B>lookupString</B>(java.lang.String str)</PRE><DL><DD>Look for ConstantString in ConstantPool containing String `str'.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - String to search for<DT><B>Returns:</B><DD>index on success, -1 otherwise</DL></DD></DL><HR><A NAME="addString(java.lang.String)"><!-- --></A><H3>addString</H3><PRE>public int <B>addString</B>(java.lang.String str)</PRE><DL><DD>Add a new String constant to the ConstantPool, if it is not already in there.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - String to add<DT><B>Returns:</B><DD>index of entry</DL></DD></DL><HR><A NAME="lookupClass(java.lang.String)"><!-- --></A><H3>lookupClass</H3><PRE>public int <B>lookupClass</B>(java.lang.String str)</PRE><DL><DD>Look for ConstantClass in ConstantPool named `str'.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - String to search for<DT><B>Returns:</B><DD>index on success, -1 otherwise</DL></DD></DL><HR><A NAME="addClass(java.lang.String)"><!-- --></A><H3>addClass</H3><PRE>public int <B>addClass</B>(java.lang.String str)</PRE><DL><DD>Add a new Class reference to the ConstantPool, if it is not already in there.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - Class to add<DT><B>Returns:</B><DD>index of entry</DL></DD></DL><HR><A NAME="addClass(org.apache.bcel.generic.ObjectType)"><!-- --></A><H3>addClass</H3><PRE>public int <B>addClass</B>(<A HREF="../../../../org/apache/bcel/generic/ObjectType.html">ObjectType</A> type)</PRE><DL><DD>Add a new Class reference to the ConstantPool for a given type.<DD><DL><DT><B>Parameters:</B><DD><CODE>str</CODE> - Class to add<DT><B>Returns:</B><DD>index of entry</DL></DD></DL><HR><A NAME="addArrayClass(org.apache.bcel.generic.ArrayType)"><!-- --></A><H3>addArrayClass</H3><PRE>public int <B>addArrayClass</B>(<A HREF="../../../../org/apache/bcel/generic/ArrayType.html">ArrayType</A> type)</PRE><DL><DD>Add a reference to an array class (e.g. String[][]) as needed by MULTIANEWARRAY instruction, e.g. to the ConstantPool.<DD><DL><DT><B>Parameters:</B><DD><CODE>type</CODE> - type of array class<DT><B>Returns:</B><DD>index of entry</DL></DD></DL><HR><A NAME="lookupInteger(int)"><!-- --></A><H3>lookupInteger</H3><PRE>public int <B>lookupInteger</B>(int n)</PRE><DL><DD>Look for ConstantInteger in ConstantPool.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - integer number to look for<DT><B>Returns:</B><DD>index on success, -1 otherwise</DL></DD></DL><HR><A NAME="addInteger(int)"><!-- --></A><H3>addInteger</H3><PRE>public int <B>addInteger</B>(int n)</PRE><DL><DD>Add a new Integer constant to the ConstantPool, if it is not already in there.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - integer number to add<DT><B>Returns:</B><DD>index of entry</DL></DD></DL><HR><A NAME="lookupFloat(float)"><!-- --></A><H3>lookupFloat</H3><PRE>public int <B>lookupFloat</B>(float n)</PRE><DL><DD>Look for ConstantFloat in ConstantPool.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - Float number to look for<DT><B>Returns:</B><DD>index on success, -1 otherwise</DL></DD></DL><HR><A NAME="addFloat(float)"><!-- --></A><H3>addFloat</H3><PRE>public int <B>addFloat</B>(float n)</PRE><DL>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -