diff options
author | Rich Bolen <rich.bolen@icg360.com> | 2019-08-27 07:45:10 -0400 |
---|---|---|
committer | Rich Bolen <rich.bolen@icg360.com> | 2019-08-27 07:45:10 -0400 |
commit | 699b301badf2f6746d091df3094d99444fa3fdd8 (patch) | |
tree | f4c43bc392877b0b259a70292b5aa8ea4df4b8a9 /src/main/javassist/bytecode | |
parent | c08c21ebd2b636d6bc9e3543aaf980f9e4733a04 (diff) | |
download | javassist-699b301badf2f6746d091df3094d99444fa3fdd8.tar.gz javassist-699b301badf2f6746d091df3094d99444fa3fdd8.zip |
Incorporate feedback from the PR
Diffstat (limited to 'src/main/javassist/bytecode')
-rw-r--r-- | src/main/javassist/bytecode/Bytecode.java | 19 | ||||
-rw-r--r-- | src/main/javassist/bytecode/ClassFileWriter.java | 18 | ||||
-rw-r--r-- | src/main/javassist/bytecode/ConstPool.java | 2 |
3 files changed, 1 insertions, 38 deletions
diff --git a/src/main/javassist/bytecode/Bytecode.java b/src/main/javassist/bytecode/Bytecode.java index 193e3f8a..37a6d127 100644 --- a/src/main/javassist/bytecode/Bytecode.java +++ b/src/main/javassist/bytecode/Bytecode.java @@ -1241,25 +1241,6 @@ public class Bytecode extends ByteVector implements Cloneable, Opcode { } /** - * Appends DYNAMIC. - * - * @param bootstrap an index into the <code>bootstrap_methods</code> array - * of the bootstrap method table. - * @param name the method name. - * @param desc the method descriptor. - * @see Descriptor#ofMethod(CtClass,CtClass[]) - * @since 3.17 - */ - public void addDynamic(int bootstrap, String name, String desc) { - int nt = constPool.addNameAndTypeInfo(name, desc); - int dyn = constPool.addDynamicInfo(bootstrap, nt); - add(INVOKEDYNAMIC); - addIndex(dyn); - add(0, 0); - growStack(Descriptor.dataSize(desc)); // assume ConstPool#REF_invokeStatic - } - - /** * Appends LDC or LDC_W. The pushed item is a <code>String</code> * object. * diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index 03650b75..966767af 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -701,24 +701,6 @@ public class ClassFileWriter { } /** - * Adds a new <code>CONSTANT_InvokeDynamic_info</code> - * structure. - * - * @param bootstrap <code>bootstrap_method_attr_index</code>. - * @param nameAndTypeInfo <code>name_and_type_index</code>. - * @return the index of the added entry. - * - * @since 3.17.1 - */ - public int addDynamicInfo(int bootstrap, - int nameAndTypeInfo) { - output.write(DynamicInfo.tag); - output.writeShort(bootstrap); - output.writeShort(nameAndTypeInfo); - return num++; - } - - /** * Adds a new <code>CONSTANT_String_info</code> * structure. * diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java index 08985089..bd521001 100644 --- a/src/main/javassist/bytecode/ConstPool.java +++ b/src/main/javassist/bytecode/ConstPool.java @@ -1242,7 +1242,7 @@ public final class ConstPool } /** - * Adds a new <code>CONSTANT_InvokeDynamic_info</code> structure. + * Adds a new <code>CONSTANT_Dynamic_info</code> structure. * * @param bootstrap <code>bootstrap_method_attr_index</code>. * @param nameAndType <code>name_and_type_index</code>. |