1 4 package gnu.bytecode; 5 6 7 8 public class Location { 9 protected String name; 10 protected Type type; 11 int name_index; 12 int signature_index; 13 14 public final String getName () 15 { 16 return name; 17 } 18 19 public final void setName (String name) 20 { 21 this.name = name; 22 } 23 24 public final void setName(int name_index, ConstantPool constants) 25 { 26 if (name_index <= 0) 27 name = null; 28 else 29 { 30 CpoolUtf8 nameConstant = (CpoolUtf8) 31 constants.getForced(name_index, ConstantPool.UTF8); 32 name = nameConstant.string; 33 } 34 this.name_index = name_index; 35 } 36 37 public final Type getType() 38 { 39 return type; 40 } 41 42 public final void setType(Type type) 43 { 44 this.type = type; 45 } 46 47 public final String getSignature () { return type.getSignature (); } 48 49 public void setSignature (int signature_index, ConstantPool constants) 50 { 51 CpoolUtf8 sigConstant = (CpoolUtf8) 52 constants.getForced(signature_index, ConstantPool.UTF8); 53 this.signature_index = signature_index; 54 type = Type.signatureToType(sigConstant.string); 55 } 56 } 57 | Popular Tags |