From c3525364584fdc9fca3ab7e1cd6ae2acf2aaa9d9 Mon Sep 17 00:00:00 2001 From: jochen Date: Sat, 20 Mar 1999 00:22:35 +0000 Subject: [PATCH] getConstantType/Int/String removed. getConstant is sufficient git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@444 379699f6-c40d-0410-875b-85095c16579e --- jode/jode/bytecode/ConstantPool.java | 37 ---------------------------- 1 file changed, 37 deletions(-) diff --git a/jode/jode/bytecode/ConstantPool.java b/jode/jode/bytecode/ConstantPool.java index af4ced9..a4b053e 100644 --- a/jode/jode/bytecode/ConstantPool.java +++ b/jode/jode/bytecode/ConstantPool.java @@ -128,22 +128,6 @@ public class ConstantPool { }; } - public Type getConstantType(int i) throws ClassFormatException - { - if (i == 0) - throw new ClassFormatException("null constant"); - switch(tags[i]) { - case INTEGER: return Type.tInt; - case FLOAT : return Type.tFloat ; - case LONG : return Type.tLong ; - case DOUBLE : return Type.tDouble; - case STRING : return Type.tString; - default: - throw new ClassFormatException - ("invalid constant tag: " + tags[i]); - } - } - public Object getConstant(int i) throws ClassFormatException { if (i == 0) throw new ClassFormatException("null constant"); @@ -159,27 +143,6 @@ public class ConstantPool { throw new ClassFormatException("unknown constant tag: "+tags[i]); } - public int getConstantInt(int i) throws ClassFormatException { - if (i == 0 || tags[i] != ConstantPool.INTEGER) - throw new ClassFormatException("not an integer "+tags[i]); - return ((Integer)constants[i]).intValue(); - } - - public String getConstantString(int i) throws ClassFormatException { - if (i == 0) - throw new ClassFormatException("null constant"); - switch (tags[i]) { - case ConstantPool.INTEGER: - case ConstantPool.FLOAT: - case ConstantPool.LONG: - case ConstantPool.DOUBLE: - return constants[i].toString(); - case ConstantPool.STRING: - return getUTF8(indices1[i]); - } - throw new ClassFormatException("unknown constant tag: "+tags[i]); - } - public String getClassName(int i) throws ClassFormatException { if (i == 0) return null;