1 32 33 package com.jeantessier.classreader; 34 35 import java.io.*; 36 37 public class FieldRef_info extends FeatureRef_info { 38 public FieldRef_info(ConstantPool constantPool, DataInputStream in) throws IOException { 39 super(constantPool, in); 40 } 41 42 public String getNameAndType() { 43 StringBuffer result = new StringBuffer (); 44 45 NameAndType_info nat = getRawNameAndType(); 46 47 result.append(nat.getType()).append(" ").append(nat.getName()); 48 49 return result.toString(); 50 } 51 52 public String getName() { 53 return getRawNameAndType().getName(); 54 } 55 56 public String getSignature() { 57 return getRawNameAndType().getName(); 58 } 59 60 public String toString() { 61 StringBuffer result = new StringBuffer (); 62 63 Class_info c = getRawClass(); 64 NameAndType_info nat = getRawNameAndType(); 65 66 result.append(nat.getType()).append(" ").append(c).append(".").append(nat.getName()); 67 68 return result.toString(); 69 } 70 71 public void accept(Visitor visitor) { 72 visitor.visitFieldRef_info(this); 73 } 74 } 75 | Popular Tags |