1 8 package org.codehaus.aspectwerkz.joinpoint.impl; 9 10 import org.codehaus.aspectwerkz.annotation.Annotation; 11 import org.codehaus.aspectwerkz.annotation.Annotations; 12 import org.codehaus.aspectwerkz.joinpoint.FieldSignature; 13 14 import java.lang.reflect.Field ; 15 import java.util.List ; 16 17 22 public class FieldSignatureImpl implements FieldSignature { 23 private final Class m_declaringType; 24 25 private final Field m_field; 26 27 31 public FieldSignatureImpl(final Class declaringType, final Field field) { 32 m_declaringType = declaringType; 33 m_field = field; 34 m_field.setAccessible(true); 35 } 36 37 42 public Class getDeclaringType() { 43 return m_declaringType; 44 } 45 46 55 public int getModifiers() { 56 return m_field.getModifiers(); 57 } 58 59 64 public String getName() { 65 return m_field.getName(); 66 } 67 68 73 public Field getField() { 74 return m_field; 75 } 76 77 82 public Class getFieldType() { 83 return m_field.getType(); 84 } 85 86 92 public Annotation getAnnotation(final String annotationName) { 93 return Annotations.getAnnotation(annotationName, m_field); 94 } 95 96 102 public List getAnnotations(final String annotationName) { 103 return Annotations.getAnnotations(annotationName, m_field); 104 } 105 106 112 public List getAnnotationInfos() { 113 return Annotations.getAnnotationInfos(m_field); 114 } 115 116 121 public String toString() { 122 return m_field.toString(); 123 } 124 } | Popular Tags |