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.MethodSignature; 13 14 import java.lang.reflect.Method ; 15 import java.util.List ; 16 17 22 public class MethodSignatureImpl implements MethodSignature { 23 private final Class m_declaringType; 24 25 private final Method m_method; 26 27 31 public MethodSignatureImpl(final Class declaringType, final Method method) { 32 m_declaringType = declaringType; 33 m_method = method; 34 } 35 36 41 public Method getMethod() { 42 return m_method; 43 } 44 45 50 public Class getDeclaringType() { 51 return m_declaringType; 52 } 53 54 63 public int getModifiers() { 64 return m_method.getModifiers(); 65 } 66 67 72 public String getName() { 73 return m_method.getName(); 74 } 75 76 81 public Class [] getExceptionTypes() { 82 return m_method.getExceptionTypes(); 83 } 84 85 90 public Class [] getParameterTypes() { 91 return m_method.getParameterTypes(); 92 } 93 94 99 public Class getReturnType() { 100 return m_method.getReturnType(); 101 } 102 103 109 public Annotation getAnnotation(final String annotationName) { 110 return Annotations.getAnnotation(annotationName, m_method); 111 } 112 113 119 public List getAnnotations(final String annotationName) { 120 return Annotations.getAnnotations(annotationName, m_method); 121 } 122 123 129 public List getAnnotationInfos() { 130 return Annotations.getAnnotationInfos(m_method); 131 } 132 133 138 public String toString() { 139 return m_method.toString(); 140 } 141 } | Popular Tags |