1 4 package com.tc.aspectwerkz.joinpoint.impl; 5 6 import com.tc.backport175.Annotation; 7 import com.tc.backport175.Annotations; 8 9 import com.tc.aspectwerkz.joinpoint.FieldSignature; 10 11 import java.lang.reflect.Field ; 12 13 18 public class FieldSignatureImpl implements FieldSignature { 19 private final Class m_declaringType; 20 21 private final Field m_field; 22 23 27 public FieldSignatureImpl(final Class declaringType, final Field field) { 28 m_declaringType = declaringType; 29 m_field = field; 30 m_field.setAccessible(true); 31 } 32 33 38 public Class getDeclaringType() { 39 return m_declaringType; 40 } 41 42 51 public int getModifiers() { 52 return m_field.getModifiers(); 53 } 54 55 60 public String getName() { 61 return m_field.getName(); 62 } 63 64 69 public Field getField() { 70 return m_field; 71 } 72 73 78 public Class getFieldType() { 79 return m_field.getType(); 80 } 81 82 88 public Annotation getAnnotation(final Class annotationClass) { 89 return Annotations.getAnnotation(annotationClass, m_field); 90 } 91 92 97 public Annotation[] getAnnotations() { 98 return Annotations.getAnnotations(m_field); 99 } 100 101 106 public String toString() { 107 return m_field.toString(); 108 } 109 } | Popular Tags |