]> source.dussan.org Git - javassist.git/commitdiff
Remove the ability to change methodref signatures.
authoradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 22 Feb 2006 14:47:59 +0000 (14:47 +0000)
committeradrian <adrian@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Wed, 22 Feb 2006 14:47:59 +0000 (14:47 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@253 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/ConstPool.java

index 59612e988381e737552c72586d4371a1ba994d29..ed4974d5a74fb840862a2049ca13fea98f51b92f 100644 (file)
@@ -361,28 +361,6 @@ public final class ConstPool {
         }
     }
 
-    /**
-     * Changed the Utf8Info of the <code>name_index</code> field of the
-     * <code>CONSTANT_NameAndType_info</code> structure
-     * indirectly specified by the given index.
-     *
-     * @param index     an index to a <code>CONSTANT_Methodref_info</code>.
-     * @param string    the new Utf8 string
-     */
-    public void setMethodrefType(int index, String string) {
-        MethodrefInfo minfo = (MethodrefInfo)getItem(index);
-        if (minfo == null)
-            throw new IllegalArgumentException("Not a Methodref_info " + index);
-        else {
-            NameAndTypeInfo n
-                = (NameAndTypeInfo)getItem(minfo.nameAndTypeIndex);
-            if(n == null)
-                throw new IllegalStateException("Unable to find NameAndTypeInfo " + index);
-            else
-                setUtf8Info(n.typeDescriptor, string);
-        }
-    }
-
     /**
      * Reads the <code>class_index</code> field of the
      * <code>CONSTANT_InterfaceMethodref_info</code> structure
@@ -465,29 +443,6 @@ public final class ConstPool {
                 return getUtf8Info(n.typeDescriptor);
         }
     }
-    
-    /**
-     * Changed the Utf8Info of the <code>name_index</code> field of the
-     * <code>CONSTANT_NameAndType_info</code> structure
-     * indirectly specified by the given index.
-     *
-     * @param index     an index to a <code>CONSTANT_Methodref_info</code>.
-     * @param string    the new Utf8 string
-     */
-    public void setInterfaceMethodrefType(int index, String string) {
-        InterfaceMethodrefInfo minfo = (InterfaceMethodrefInfo)getItem(index);
-        if (minfo == null)
-            throw new IllegalArgumentException("Not an InterfaceMethodref_info " + index);
-        else {
-            NameAndTypeInfo n
-                = (NameAndTypeInfo)getItem(minfo.nameAndTypeIndex);
-            if(n == null)
-                throw new IllegalStateException("Unable to find NameAndTypeInfo " + index);
-            else
-                setUtf8Info(n.typeDescriptor, string);
-        }
-    }
-
     /**
      * Reads <code>CONSTANT_Integer_info</code>, <code>_Float_info</code>,
      * <code>_Long_info</code>, <code>_Double_info</code>, or
@@ -582,18 +537,6 @@ public final class ConstPool {
         return utf.string;
     }
 
-    /**
-     * Sets <code>CONSTANT_utf8_info</code> structure
-     * at the given index.
-     *
-     * @param index the index
-     * @param string the string specified by this entry.
-     */
-    private void setUtf8Info(int index, String string) {
-        Utf8Info utf = (Utf8Info)getItem(index);
-        utf.string = string;
-    }
-
     /**
      * Determines whether <code>CONSTANT_Methodref_info</code>
      * structure at the given index represents the constructor