01: /*
02: * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
03: */
04: package com.tc.object.bytecode.aspectwerkz;
05:
06: import com.tc.aspectwerkz.reflect.ClassInfo;
07: import com.tc.aspectwerkz.reflect.MethodInfo;
08: import com.tc.backport175.bytecode.AnnotationElement.Annotation;
09: import com.tc.exception.ImplementMe;
10:
11: public class SimpleMethodInfo implements MethodInfo {
12:
13: private String methodName;
14: private ClassInfo declaringType;
15: private ClassInfo returnType;
16: private int modifiers;
17: private ClassInfo[] parameterTypes;
18: private ClassInfo[] exceptionTypes;
19:
20: public SimpleMethodInfo(ClassInfo declaringType, String methodName,
21: int modifiers, ClassInfo returnType,
22: ClassInfo[] parameterTypes, ClassInfo[] exceptionTypes) {
23: setAll(declaringType, methodName, modifiers, returnType,
24: parameterTypes, exceptionTypes);
25: }
26:
27: private void setAll(ClassInfo declaringType, String methodName,
28: int modifiers, ClassInfo returnType,
29: ClassInfo[] parameterTypes, ClassInfo[] exceptionTypes) {
30: this .declaringType = declaringType;
31: this .methodName = methodName;
32: this .modifiers = modifiers;
33: this .returnType = returnType;
34: this .parameterTypes = parameterTypes;
35: this .exceptionTypes = exceptionTypes;
36:
37: }
38:
39: public ClassInfo getReturnType() {
40: return this .returnType;
41: }
42:
43: public ClassInfo[] getParameterTypes() {
44: return this .parameterTypes;
45: }
46:
47: public String[] getParameterNames() {
48: return new String[0]; //To change body of implemented methods use File | Settings | File Templates.
49: }
50:
51: public ClassInfo[] getExceptionTypes() {
52: return this .exceptionTypes;
53: }
54:
55: public ClassInfo getDeclaringType() {
56: return this .declaringType;
57: }
58:
59: public String getName() {
60: return this .methodName;
61: }
62:
63: public String getSignature() {
64: return null; //To change body of implemented methods use File | Settings | File Templates.
65: }
66:
67: public String getGenericsSignature() {
68: return null;
69: }
70:
71: public int getModifiers() {
72: return this .modifiers;
73: }
74:
75: public Annotation[] getAnnotations() {
76: throw new ImplementMe();
77: }
78: }
|