1 4 package com.tc.aspectwerkz.reflect.impl.java; 5 6 7 import java.lang.reflect.Member ; 8 import java.util.List ; 9 10 import com.tc.aspectwerkz.reflect.ClassInfo; 11 import com.tc.aspectwerkz.reflect.MemberInfo; 12 13 16 public abstract class JavaMemberInfo implements MemberInfo { 17 20 protected final Member m_member; 21 22 25 protected final ClassInfo m_declaringType; 26 27 30 protected List m_annotations = null; 31 32 35 protected final JavaClassInfoRepository m_classInfoRepository; 36 37 43 JavaMemberInfo(final Member member, final JavaClassInfo declaringType) { 44 if (member == null) { 45 throw new IllegalArgumentException ("member can not be null"); 46 } 47 if (declaringType == null) { 48 throw new IllegalArgumentException ("declaring type can not be null"); 49 } 50 m_member = member; 51 m_declaringType = declaringType; 52 m_classInfoRepository = JavaClassInfoRepository.getRepository(member.getDeclaringClass().getClassLoader()); 53 } 54 55 60 public String getName() { 61 return m_member.getName(); 62 } 63 64 69 public int getModifiers() { 70 return m_member.getModifiers(); 71 } 72 73 78 public ClassInfo getDeclaringType() { 79 return m_declaringType; 80 } 81 } | Popular Tags |