renamed Type.fromDescriptor() to Type.instance()
[org.ibex.classgen.git] / src / org / ibex / classgen / MethodGen.java
index 2d3a0fc..2fde5d3 100644 (file)
@@ -55,7 +55,7 @@ public class MethodGen implements CGConst {
         name = cp.getUtf8ByIndex(in.readShort());
         String descriptor = cp.getUtf8ByIndex(in.readShort());
         String ret = descriptor.substring(descriptor.indexOf(')')+1);
-        this.ret = Type.fromDescriptor(ret);
+        this.ret = Type.instance(ret);
         //String args = descriptor.substring(1, descriptor.indexOf(')'));
         args = new Type[0]; // FIXME
         codeAttrs = null;
@@ -110,7 +110,7 @@ public class MethodGen implements CGConst {
         @param handler The instruction of the excepton handler
         @param type The type of exception that is to be handled (MUST inherit from Throwable)
     */
-    public final void addExceptionHandler(int start, int end, int handler, Type.Object type) {
+    public final void addExceptionHandler(int start, int end, int handler, Type.Class type) {
         exnTable.put(type, new ExnTableEnt(start, end, handler, cp.add(type)));
     }
     
@@ -118,7 +118,7 @@ public class MethodGen implements CGConst {
         NOTE: This isn't enforced by the JVM. This is for reference only. A method can throw exceptions not declared to be thrown 
         @param type The type of exception that can be thrown 
     */
-    public final void addThrow(Type.Object type) {
+    public final void addThrow(Type.Class type) {
         thrownExceptions.put(type, cp.add(type));
     }