1 30 31 35 36 package jbet; 37 import java.util.Vector ; 38 39 public class MethodSignature 40 { 41 public int accessFlags; 42 public String classname; 43 public String name; 44 public Descriptor descriptor; 45 public Vector exceptions; 46 public Object dags; 47 48 public Object classrep() { return classname; } 49 50 public MethodSignature () { } 51 52 public MethodSignature (String c, String n, Descriptor s) 53 { 54 classname = c; 55 name = n; 56 descriptor = s; 57 exceptions = new Vector (); 58 } 59 60 public MethodInfo resolve () throws ClassFileException, ElementNotFoundException 61 { 62 if (this instanceof MethodInfo) 63 return (MethodInfo) this; 64 return Jbet.loader.getMethod (classname, name, descriptor); 65 } 66 67 68 69 public MethodInfo resolveAny () throws ClassFileException, ElementNotFoundException 70 { 71 if (this instanceof MethodInfo) 72 return (MethodInfo) this; 73 74 try { 75 return Jbet.loader.getMethod (classname, name, descriptor); 76 } catch (ElementNotFoundException e) 77 { 78 ClassInfo thisc = Jbet.loader.getClass (classname); 79 return new MethodSignature (thisc.getSuperName(), name, descriptor).resolve(); 80 } 81 } 82 } 83 | Popular Tags |