/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/*
* This file is available under and governed by the GNU General Public
* License version 2 only, as published by the Free Software Foundation.
* However, the following notice accompanied the original version of this
* file:
*
* ASM: a very small and fast Java bytecode manipulation framework
* Copyright (c) 2000-2007 INRIA, France Telecom
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* 3. Neither the name of the copyright holders nor the names of its
* contributors may be used to endorse or promote products derived from
* this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
* THE POSSIBILITY OF SUCH DAMAGE.
*/
/**
* A {@link ClassVisitor} that generates classes in bytecode form. More
* precisely this visitor generates a byte array conforming to the Java class
* file format. It can be used alone, to generate a Java class "from scratch",
* or with one or more {@link ClassReader ClassReader} and adapter class visitor
* to generate a modified class from one or more existing Java classes.
*
* @author Eric Bruneton
*/
/**
* Flag to automatically compute the maximum stack size and the maximum
* number of local variables of methods. If this flag is set, then the
* arguments of the {@link MethodVisitor#visitMaxs visitMaxs} method of the
* {@link MethodVisitor} returned by the {@link #visitMethod visitMethod}
* method will be ignored, and computed automatically from the signature and
* the bytecode of each method.
*
* @see #ClassWriter(int)
*/
/**
* Flag to automatically compute the stack map frames of methods from
* scratch. If this flag is set, then the calls to the
* {@link MethodVisitor#visitFrame} method are ignored, and the stack map
* frames are recomputed from the methods bytecode. The arguments of the
* {@link MethodVisitor#visitMaxs visitMaxs} method are also ignored and
* recomputed from the bytecode. In other words, computeFrames implies
* computeMaxs.
*
* @see #ClassWriter(int)
*/
/**
* The type of instructions without any argument.
*/
/**
* The type of instructions with an signed byte argument.
*/
/**
* The type of instructions with an signed short argument.
*/
/**
* The type of instructions with a local variable index argument.
*/
/**
* The type of instructions with an implicit local variable index argument.
*/
/**
* The type of instructions with a type descriptor argument.
*/
/**
* The type of field and method invocations instructions.
*/
/**
* The type of the INVOKEINTERFACE instruction.
*/
/**
* The type of instructions with a 2 bytes bytecode offset label.
*/
/**
* The type of instructions with a 4 bytes bytecode offset label.
*/
/**
* The type of the LDC instruction.
*/
/**
* The type of the LDC_W and LDC2_W instructions.
*/
/**
* The type of the IINC instruction.
*/
/**
* The type of the TABLESWITCH instruction.
*/
/**
* The type of the LOOKUPSWITCH instruction.
*/
/**
* The type of the MULTIANEWARRAY instruction.
*/
/**
* The type of the WIDE instruction.
*/
/**
* The instruction types of all JVM opcodes.
*/
static final byte[] TYPE;
/**
* The type of CONSTANT_Class constant pool items.
*/
/**
* The type of CONSTANT_Fieldref constant pool items.
*/
/**
* The type of CONSTANT_Methodref constant pool items.
*/
/**
* The type of CONSTANT_InterfaceMethodref constant pool items.
*/
/**
* The type of CONSTANT_String constant pool items.
*/
/**
* The type of CONSTANT_Integer constant pool items.
*/
/**
* The type of CONSTANT_Float constant pool items.
*/
/**
* The type of CONSTANT_Long constant pool items.
*/
/**
* The type of CONSTANT_Double constant pool items.
*/
/**
* The type of CONSTANT_NameAndType constant pool items.
*/
/**
* The type of CONSTANT_Utf8 constant pool items.
*/
/**
* Normal type Item stored in the ClassWriter {@link ClassWriter#typeTable},
* instead of the constant pool, in order to avoid clashes with normal
* constant pool items in the ClassWriter constant pool's hash table.
*/
/**
* Uninitialized type Item stored in the ClassWriter
* {@link ClassWriter#typeTable}, instead of the constant pool, in order to
* avoid clashes with normal constant pool items in the ClassWriter constant
* pool's hash table.
*/
/**
* Merged type Item stored in the ClassWriter {@link ClassWriter#typeTable},
* instead of the constant pool, in order to avoid clashes with normal
* constant pool items in the ClassWriter constant pool's hash table.
*/
/**
* The class reader from which this class writer was constructed, if any.
*/
/**
* Minor and major version numbers of the class to be generated.
*/
int version;
/**
* Index of the next item to be added in the constant pool.
*/
int index;
/**
* The constant pool of this class.
*/
/**
* The constant pool's hash table data.
*/
/**
* The threshold of the constant pool's hash table.
*/
int threshold;
/**
* A reusable key used to look for items in the {@link #items} hash table.
*/
/**
* A reusable key used to look for items in the {@link #items} hash table.
*/
/**
* A reusable key used to look for items in the {@link #items} hash table.
*/
/**
* A type table used to temporarily store internal names that will not
* necessarily be stored in the constant pool. This type table is used by
* the control flow and data flow analysis algorithm used to compute stack
* map frames from scratch. This array associates to each index <tt>i</tt>
* the Item whose index is <tt>i</tt>. All Item objects stored in this
* array are also stored in the {@link #items} hash table. These two arrays
* allow to retrieve an Item from its index or, conversely, to get the index
* of an Item from its value. Each Item stores an internal name in its
* {@link Item#strVal1} field.
*/
/**
* Number of elements in the {@link #typeTable} array.
*/
private short typeCount;
/**
* The access flags of this class.
*/
private int access;
/**
* The constant pool item that contains the internal name of this class.
*/
private int name;
/**
* The internal name of this class.
*/
/**
* The constant pool item that contains the signature of this class.
*/
private int signature;
/**
* The constant pool item that contains the internal name of the super class
* of this class.
*/
private int superName;
/**
* Number of interfaces implemented or extended by this class or interface.
*/
private int interfaceCount;
/**
* The interfaces implemented or extended by this class or interface. More
* precisely, this array contains the indexes of the constant pool items
* that contain the internal names of these interfaces.
*/
private int[] interfaces;
/**
* The index of the constant pool item that contains the name of the source
* file from which this class was compiled.
*/
private int sourceFile;
/**
* The SourceDebug attribute of this class.
*/
/**
* The constant pool item that contains the name of the enclosing class of
* this class.
*/
private int enclosingMethodOwner;
/**
* The constant pool item that contains the name and descriptor of the
* enclosing method of this class.
*/
private int enclosingMethod;
/**
* The runtime visible annotations of this class.
*/
/**
* The runtime invisible annotations of this class.
*/
/**
* The non standard attributes of this class.
*/
/**
* The number of entries in the InnerClasses attribute.
*/
private int innerClassesCount;
/**
* The InnerClasses attribute.
*/
/**
* The fields of this class. These fields are stored in a linked list of
* {@link FieldWriter} objects, linked to each other by their
* {@link FieldWriter#next} field. This field stores the first element of
* this list.
*/
/**
* The fields of this class. These fields are stored in a linked list of
* {@link FieldWriter} objects, linked to each other by their
* {@link FieldWriter#next} field. This field stores the last element of
* this list.
*/
/**
* The methods of this class. These methods are stored in a linked list of
* {@link MethodWriter} objects, linked to each other by their
* {@link MethodWriter#next} field. This field stores the first element of
* this list.
*/
/**
* The methods of this class. These methods are stored in a linked list of
* {@link MethodWriter} objects, linked to each other by their
* {@link MethodWriter#next} field. This field stores the last element of
* this list.
*/
/**
* <tt>true</tt> if the maximum stack size and number of local variables
* must be automatically computed.
*/
private final boolean computeMaxs;
/**
* <tt>true</tt> if the stack map frames must be recomputed from scratch.
*/
private final boolean computeFrames;
/**
* <tt>true</tt> if the stack map tables of this class are invalid. The
* {@link MethodWriter#resizeInstructions} method cannot transform existing
* stack map tables, and so produces potentially invalid classes when it is
* executed. In this case the class is reread and rewritten with the
* {@link #COMPUTE_FRAMES} option (the resizeInstructions method can resize
* stack map tables when this option is used).
*/
boolean invalidFrames;
// ------------------------------------------------------------------------
// Static initializer
// ------------------------------------------------------------------------
/**
* Computes the instruction types of JVM opcodes.
*/
static {
int i;
byte[] b = new byte[220];
String s = "AAAAAAAAAAAAAAAABCKLLDDDDDEEEEEEEEEEEEEEEEEEEEAAAAAAAADD"
+ "DDDEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAMAAAAAAAAAAAAAAAAAAAAIIIIIIIIIIIIIIIIDNOAA"
+ "AAAAGGGGGGGHAFBFAAFFAAQPIIJJIIIIIIIIIIIIIIIIII";
for (i = 0; i < b.length; ++i) {
b[i] = (byte) (s.charAt(i) - 'A');
}
TYPE = b;
// code to generate the above string
//
// // SBYTE_INSN instructions
// b[Constants.NEWARRAY] = SBYTE_INSN;
// b[Constants.BIPUSH] = SBYTE_INSN;
//
// // SHORT_INSN instructions
// b[Constants.SIPUSH] = SHORT_INSN;
//
// // (IMPL)VAR_INSN instructions
// b[Constants.RET] = VAR_INSN;
// for (i = Constants.ILOAD; i <= Constants.ALOAD; ++i) {
// b[i] = VAR_INSN;
// }
// for (i = Constants.ISTORE; i <= Constants.ASTORE; ++i) {
// b[i] = VAR_INSN;
// }
// for (i = 26; i <= 45; ++i) { // ILOAD_0 to ALOAD_3
// b[i] = IMPLVAR_INSN;
// }
// for (i = 59; i <= 78; ++i) { // ISTORE_0 to ASTORE_3
// b[i] = IMPLVAR_INSN;
// }
//
// // TYPE_INSN instructions
// b[Constants.NEW] = TYPE_INSN;
// b[Constants.ANEWARRAY] = TYPE_INSN;
// b[Constants.CHECKCAST] = TYPE_INSN;
// b[Constants.INSTANCEOF] = TYPE_INSN;
//
// // (Set)FIELDORMETH_INSN instructions
// for (i = Constants.GETSTATIC; i <= Constants.INVOKESTATIC; ++i) {
// b[i] = FIELDORMETH_INSN;
// }
// b[Constants.INVOKEINTERFACE] = ITFMETH_INSN;
//
// // LABEL(W)_INSN instructions
// for (i = Constants.IFEQ; i <= Constants.JSR; ++i) {
// b[i] = LABEL_INSN;
// }
// b[Constants.IFNULL] = LABEL_INSN;
// b[Constants.IFNONNULL] = LABEL_INSN;
// b[200] = LABELW_INSN; // GOTO_W
// b[201] = LABELW_INSN; // JSR_W
// // temporary opcodes used internally by ASM - see Label and
// MethodWriter
// for (i = 202; i < 220; ++i) {
// b[i] = LABEL_INSN;
// }
//
// // LDC(_W) instructions
// b[Constants.LDC] = LDC_INSN;
// b[19] = LDCW_INSN; // LDC_W
// b[20] = LDCW_INSN; // LDC2_W
//
// // special instructions
// b[Constants.IINC] = IINC_INSN;
// b[Constants.TABLESWITCH] = TABL_INSN;
// b[Constants.LOOKUPSWITCH] = LOOK_INSN;
// b[Constants.MULTIANEWARRAY] = MANA_INSN;
// b[196] = WIDE_INSN; // WIDE
//
// for (i = 0; i < b.length; ++i) {
// System.err.print((char)('A' + b[i]));
// }
// System.err.println();
}
// ------------------------------------------------------------------------
// Constructor
// ------------------------------------------------------------------------
/**
* Constructs a new {@link ClassWriter} object.
*
* @param flags option flags that can be used to modify the default behavior
* of this class. See {@link #COMPUTE_MAXS}, {@link #COMPUTE_FRAMES}.
*/
index = 1;
pool = new ByteVector();
}
/**
* Constructs a new {@link ClassWriter} object and enables optimizations for
* "mostly add" bytecode transformations. These optimizations are the
* following:
*
* <ul> <li>The constant pool from the original class is copied as is in
* the new class, which saves time. New constant pool entries will be added
* at the end if necessary, but unused constant pool entries <i>won't be
* removed</i>.</li> <li>Methods that are not transformed are copied as
* is in the new class, directly from the original class bytecode (i.e.
* without emitting visit events for all the method instructions), which
* saves a <i>lot</i> of time. Untransformed methods are detected by the
* fact that the {@link ClassReader} receives {@link MethodVisitor} objects
* that come from a {@link ClassWriter} (and not from a custom
* {@link ClassAdapter} or any other {@link ClassVisitor} instance).</li>
* </ul>
*
* @param classReader the {@link ClassReader} used to read the original
* class. It will be used to copy the entire constant pool from the
* original class and also to copy other fragments of original
* bytecode where applicable.
* @param flags option flags that can be used to modify the default behavior
* of this class. See {@link #COMPUTE_MAXS}, {@link #COMPUTE_FRAMES}.
*/
this(flags);
classReader.copyPool(this);
this.cr = classReader;
}
// ------------------------------------------------------------------------
// Implementation of the ClassVisitor interface
// ------------------------------------------------------------------------
public void visit(
final int version,
final int access,
final String[] interfaces)
{
}
this.interfaces = new int[interfaceCount];
for (int i = 0; i < interfaceCount; ++i) {
}
}
}
}
}
}
public void visitOuterClass(
{
}
}
final boolean visible)
{
if (!ClassReader.ANNOTATIONS) {
return null;
}
// write type, and reserve space for values count
if (visible) {
} else {
}
return aw;
}
}
public void visitInnerClass(
final int access)
{
if (innerClasses == null) {
innerClasses = new ByteVector();
}
}
final int access,
{
}
final int access,
final String[] exceptions)
{
return new MethodWriter(this,
name,
desc,
}
public void visitEnd() {
}
// ------------------------------------------------------------------------
// Other public methods
// ------------------------------------------------------------------------
/**
* Returns the bytecode of the class that was build with this class writer.
*
* @return the bytecode of the class that was build with this class writer.
*/
public byte[] toByteArray() {
// computes the real size of the bytecode of this class
int nbFields = 0;
++nbFields;
}
int nbMethods = 0;
++nbMethods;
}
int attributeCount = 0;
size += 8;
newUTF8("Signature");
}
if (sourceFile != 0) {
size += 8;
newUTF8("SourceFile");
}
if (sourceDebug != null) {
newUTF8("SourceDebugExtension");
}
if (enclosingMethodOwner != 0) {
size += 10;
newUTF8("EnclosingMethod");
}
size += 6;
newUTF8("Deprecated");
}
{
size += 6;
newUTF8("Synthetic");
}
if (innerClasses != null) {
newUTF8("InnerClasses");
}
newUTF8("RuntimeVisibleAnnotations");
}
newUTF8("RuntimeInvisibleAnnotations");
}
}
// allocates a byte vector of this size, in order to avoid unnecessary
// arraycopy operations in the ByteVector.enlarge() method
for (int i = 0; i < interfaceCount; ++i) {
}
fb = firstField;
}
mb = firstMethod;
}
}
if (sourceFile != 0) {
}
if (sourceDebug != null) {
}
if (enclosingMethodOwner != 0) {
}
}
{
}
if (innerClasses != null) {
}
}
}
}
if (invalidFrames) {
return cw.toByteArray();
}
}
// ------------------------------------------------------------------------
// Utility methods: constant pool management
// ------------------------------------------------------------------------
/**
* Adds a number or string constant to the constant pool of the class being
* build. Does nothing if the constant pool already contains a similar item.
*
* @param cst the value of the constant to be added to the constant pool.
* This parameter must be an {@link Integer}, a {@link Float}, a
* {@link Long}, a {@link Double}, a {@link String} or a
* {@link Type}.
* @return a new or already existing constant item with the given value.
*/
return newInteger(val);
return newInteger(val);
return newInteger(val);
return newInteger(val);
return newInteger(val);
? t.getInternalName()
: t.getDescriptor());
} else {
}
}
/**
* Adds a number or string constant to the constant pool of the class being
* build. Does nothing if the constant pool already contains a similar item.
* <i>This method is intended for {@link Attribute} sub classes, and is
* normally not needed by class generators or adapters.</i>
*
* @param cst the value of the constant to be added to the constant pool.
* This parameter must be an {@link Integer}, a {@link Float}, a
* {@link Long}, a {@link Double} or a {@link String}.
* @return the index of a new or already existing constant item with the
* given value.
*/
}
/**
* Adds an UTF8 string to the constant pool of the class being build. Does
* nothing if the constant pool already contains a similar item. <i>This
* method is intended for {@link Attribute} sub classes, and is normally not
* needed by class generators or adapters.</i>
*
* @param value the String value.
* @return the index of a new or already existing UTF8 item.
*/
}
}
/**
* Adds a class reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
* <i>This method is intended for {@link Attribute} sub classes, and is
* normally not needed by class generators or adapters.</i>
*
* @param value the internal name of the class.
* @return a new or already existing class reference item.
*/
}
return result;
}
/**
* Adds a class reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
* <i>This method is intended for {@link Attribute} sub classes, and is
* normally not needed by class generators or adapters.</i>
*
* @param value the internal name of the class.
* @return the index of a new or already existing class reference item.
*/
}
/**
* Adds a field reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
*
* @param owner the internal name of the field's owner class.
* @param name the field's name.
* @param desc the field's descriptor.
* @return a new or already existing field reference item.
*/
{
}
return result;
}
/**
* Adds a field reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
* <i>This method is intended for {@link Attribute} sub classes, and is
* normally not needed by class generators or adapters.</i>
*
* @param owner the internal name of the field's owner class.
* @param name the field's name.
* @param desc the field's descriptor.
* @return the index of a new or already existing field reference item.
*/
{
}
/**
* Adds a method reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
*
* @param owner the internal name of the method's owner class.
* @param name the method's name.
* @param desc the method's descriptor.
* @param itf <tt>true</tt> if <tt>owner</tt> is an interface.
* @return a new or already existing method reference item.
*/
final boolean itf)
{
}
return result;
}
/**
* Adds a method reference to the constant pool of the class being build.
* Does nothing if the constant pool already contains a similar item.
* <i>This method is intended for {@link Attribute} sub classes, and is
* normally not needed by class generators or adapters.</i>
*
* @param owner the internal name of the method's owner class.
* @param name the method's name.
* @param desc the method's descriptor.
* @param itf <tt>true</tt> if <tt>owner</tt> is an interface.
* @return the index of a new or already existing method reference item.
*/
public int newMethod(
final boolean itf)
{
}
/**
* Adds an integer to the constant pool of the class being build. Does
* nothing if the constant pool already contains a similar item.
*
* @param value the int value.
* @return a new or already existing int item.
*/
}
return result;
}
/**
* Adds a float to the constant pool of the class being build. Does nothing
* if the constant pool already contains a similar item.
*
* @param value the float value.
* @return a new or already existing float item.
*/
}
return result;
}
/**
* Adds a long to the constant pool of the class being build. Does nothing
* if the constant pool already contains a similar item.
*
* @param value the long value.
* @return a new or already existing long item.
*/
index += 2;
}
return result;
}
/**
* Adds a double to the constant pool of the class being build. Does nothing
* if the constant pool already contains a similar item.
*
* @param value the double value.
* @return a new or already existing double item.
*/
index += 2;
}
return result;
}
/**
* Adds a string to the constant pool of the class being build. Does nothing
* if the constant pool already contains a similar item.
*
* @param value the String value.
* @return a new or already existing string item.
*/
}
return result;
}
/**
* Adds a name and type to the constant pool of the class being build. Does
* nothing if the constant pool already contains a similar item. <i>This
* method is intended for {@link Attribute} sub classes, and is normally not
* needed by class generators or adapters.</i>
*
* @param name a name.
* @param desc a type descriptor.
* @return the index of a new or already existing name and type item.
*/
}
}
/**
* Adds the given internal name to {@link #typeTable} and returns its index.
* Does nothing if the type table already contains this internal name.
*
* @param type the internal name to be added to the type table.
* @return the index of this internal name in the type table.
*/
}
}
/**
* Adds the given "uninitialized" type to {@link #typeTable} and returns its
* index. This method is used for UNINITIALIZED types, made of an internal
* name and a bytecode offset.
*
* @param type the internal name to be added to the type table.
* @param offset the bytecode offset of the NEW instruction that created
* this UNINITIALIZED type value.
* @return the index of this internal name in the type table.
*/
}
}
/**
* Adds the given Item to {@link #typeTable}.
*
* @param item the value to be added to the type table.
* @return the added Item, which a new Item instance with the same value as
* the given Item.
*/
++typeCount;
}
}
return result;
}
/**
* Returns the index of the common super type of the two given types. This
* method calls {@link #getCommonSuperClass} and caches the result in the
* {@link #items} hash table to speedup future calls with the same
* parameters.
*
* @param type1 index of an internal name in {@link #typeTable}.
* @param type2 index of an internal name in {@link #typeTable}.
* @return the index of the common super type of the two given types.
*/
}
}
/**
* Returns the common super type of the two given types. The default
* implementation of this method <i>loads<i> the two given classes and uses
* the java.lang.Class methods to find the common super class. It can be
* overridden to compute this common super type in other ways, in particular
* without actually loading any class, or to take into account the class
* that is currently being generated by this ClassWriter, which can of
* course not be loaded since it is under construction.
*
* @param type1 the internal name of a class.
* @param type2 the internal name of another class.
* @return the internal name of the common super class of the two given
* classes.
*/
{
Class c, d;
try {
} catch (Exception e) {
throw new RuntimeException(e.toString());
}
if (c.isAssignableFrom(d)) {
return type1;
}
if (d.isAssignableFrom(c)) {
return type2;
}
if (c.isInterface() || d.isInterface()) {
} else {
do {
c = c.getSuperclass();
} while (!c.isAssignableFrom(d));
}
}
/**
* Returns the constant pool's hash table item which is equal to the given
* item.
*
* @param key a constant pool item.
* @return the constant pool's hash table item which is equal to the given
* item, or <tt>null</tt> if there is no such item.
*/
i = i.next;
}
return i;
}
/**
* Puts the given item in the constant pool's hash table. The hash table
* <i>must</i> not already contains this item.
*
* @param i the item to be added to the constant pool's hash table.
*/
while (j != null) {
j = k;
}
}
}
}
/**
* Puts one byte and two shorts into the constant pool.
*
* @param b a byte.
* @param s1 a short.
* @param s2 another short.
*/
}
}