1 4 package com.puppycrawl.tools.checkstyle.bcel.generic; 5 6 import org.apache.bcel.generic.ConstantPoolGen; 7 import org.apache.bcel.generic.FieldOrMethod; 8 import org.apache.bcel.generic.ObjectType; 9 10 15 public class FieldOrMethodReference 16 { 17 protected FieldOrMethod mInstruction; 18 19 protected ConstantPoolGen mPoolGen; 20 21 protected FieldOrMethodReference( 22 FieldOrMethod aInstruction, 23 ConstantPoolGen aPoolGen) 24 { 25 mInstruction = aInstruction; 26 mPoolGen = aPoolGen; 27 } 28 29 32 public FieldOrMethod getInstruction() 33 { 34 return mInstruction; 35 } 36 37 public String getClassName() 38 { 39 return mInstruction.getClassName(mPoolGen); 40 } 41 42 public ObjectType getClassType() 43 { 44 return mInstruction.getClassType(mPoolGen); 45 } 46 47 public ObjectType getLoadClassType() 48 { 49 return mInstruction.getLoadClassType(mPoolGen); 50 } 51 52 public String getName() 53 { 54 return mInstruction.getName(mPoolGen); 55 } 56 57 public String toString() 58 { 59 return mInstruction.toString(mPoolGen.getConstantPool()); 60 } 61 } 62 | Popular Tags |