From aaea8645bb71bc537e75a1f259eb0f1e7c523c3d Mon Sep 17 00:00:00 2001 From: adrian Date: Wed, 22 Feb 2006 14:47:59 +0000 Subject: [PATCH] Remove the ability to change methodref signatures. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@253 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/ConstPool.java | 57 ---------------------- 1 file changed, 57 deletions(-) diff --git a/src/main/javassist/bytecode/ConstPool.java b/src/main/javassist/bytecode/ConstPool.java index 59612e98..ed4974d5 100644 --- a/src/main/javassist/bytecode/ConstPool.java +++ b/src/main/javassist/bytecode/ConstPool.java @@ -361,28 +361,6 @@ public final class ConstPool { } } - /** - * Changed the Utf8Info of the name_index field of the - * CONSTANT_NameAndType_info structure - * indirectly specified by the given index. - * - * @param index an index to a CONSTANT_Methodref_info. - * @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 class_index field of the * CONSTANT_InterfaceMethodref_info structure @@ -465,29 +443,6 @@ public final class ConstPool { return getUtf8Info(n.typeDescriptor); } } - - /** - * Changed the Utf8Info of the name_index field of the - * CONSTANT_NameAndType_info structure - * indirectly specified by the given index. - * - * @param index an index to a CONSTANT_Methodref_info. - * @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 CONSTANT_Integer_info, _Float_info, * _Long_info, _Double_info, or @@ -582,18 +537,6 @@ public final class ConstPool { return utf.string; } - /** - * Sets CONSTANT_utf8_info 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 CONSTANT_Methodref_info * structure at the given index represents the constructor -- 2.39.5