⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 constantpoolgen.html

📁 一个用于对.class文件进行插桩的开源工具
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;str)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupDouble(double)">lookupDouble</A></B>(double&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantDouble in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;class_name,               java.lang.String&nbsp;field_name,               java.lang.String&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantFieldref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupFloat(float)">lookupFloat</A></B>(float&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantFloat in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupInteger(int)">lookupInteger</A></B>(int&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantInteger in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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>&nbsp;method)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;class_name,                         java.lang.String&nbsp;method_name,                         java.lang.String&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantInterfaceMethodref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;int</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#lookupLong(long)">lookupLong</A></B>(long&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantLong in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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>&nbsp;method)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;class_name,                java.lang.String&nbsp;method_name,                java.lang.String&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantMethodref in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;name,                  java.lang.String&nbsp;signature)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantNameAndType in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;str)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;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>&nbsp;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&nbsp;n)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Look for ConstantUtf8 in ConstantPool.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;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&nbsp;i,            <A HREF="../../../../org/apache/bcel/classfile/Constant.html">Constant</A>&nbsp;c)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Use with care!</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/apache/bcel/generic/ConstantPoolGen.html#toString()">toString</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<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>&nbsp;<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>[]&nbsp;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>&nbsp;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&nbsp;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&nbsp;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&nbsp;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&nbsp;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>&nbsp;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>&nbsp;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&nbsp;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&nbsp;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&nbsp;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&nbsp;n)</PRE><DL>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -