1 16 package net.sf.cglib.reflect; 17 18 import java.lang.reflect.Member ; 19 20 abstract public class FastMember 21 { 22 protected FastClass fc; 23 protected Member member; 24 protected int index; 25 26 protected FastMember(FastClass fc, Member member, int index) { 27 this.fc = fc; 28 this.member = member; 29 this.index = index; 30 } 31 32 abstract public Class [] getParameterTypes(); 33 abstract public Class [] getExceptionTypes(); 34 35 public int getIndex() { 36 return index; 37 } 38 39 public String getName() { 40 return member.getName(); 41 } 42 43 public Class getDeclaringClass() { 44 return fc.getJavaClass(); 45 } 46 47 public int getModifiers() { 48 return member.getModifiers(); 49 } 50 51 public String toString() { 52 return member.toString(); 53 } 54 55 public int hashCode() { 56 return member.hashCode(); 57 } 58 59 public boolean equals(Object o) { 60 if (o == null || !(o instanceof FastMember)) { 61 return false; 62 } 63 return member.equals(((FastMember)o).member); 64 } 65 } 66 | Popular Tags |