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.MethodSignature; 10 11 import java.lang.reflect.Method ; 12 13 18 public class MethodSignatureImpl implements MethodSignature { 19 private final Class m_declaringType; 20 21 private final Method m_method; 22 23 27 public MethodSignatureImpl(final Class declaringType, final Method method) { 28 m_declaringType = declaringType; 29 m_method = method; 30 } 31 32 37 public Method getMethod() { 38 return m_method; 39 } 40 41 46 public Class getDeclaringType() { 47 return m_declaringType; 48 } 49 50 59 public int getModifiers() { 60 return m_method.getModifiers(); 61 } 62 63 68 public String getName() { 69 return m_method.getName(); 70 } 71 72 77 public Class [] getExceptionTypes() { 78 return m_method.getExceptionTypes(); 79 } 80 81 86 public Class [] getParameterTypes() { 87 return m_method.getParameterTypes(); 88 } 89 90 95 public Class getReturnType() { 96 return m_method.getReturnType(); 97 } 98 99 105 public Annotation getAnnotation(final Class annotationClass) { 106 return Annotations.getAnnotation(annotationClass, m_method); 107 } 108 109 114 public Annotation[] getAnnotations() { 115 return Annotations.getAnnotations(m_method); 116 } 117 118 123 public String toString() { 124 return m_method.toString(); 125 } 126 } | Popular Tags |