KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > tc > object > bytecode > aspectwerkz > SimpleMethodInfo


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.tc.object.bytecode.aspectwerkz;
5
6 import com.tc.aspectwerkz.reflect.ClassInfo;
7 import com.tc.aspectwerkz.reflect.MethodInfo;
8 import com.tc.backport175.bytecode.AnnotationElement.Annotation;
9 import com.tc.exception.ImplementMe;
10
11 public class SimpleMethodInfo implements MethodInfo {
12
13   private String JavaDoc 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 JavaDoc methodName, int modifiers, ClassInfo returnType,
21                           ClassInfo[] parameterTypes, ClassInfo[] exceptionTypes) {
22     setAll(declaringType, methodName, modifiers, returnType, parameterTypes, exceptionTypes);
23   }
24
25   private void setAll(ClassInfo declaringType, String JavaDoc methodName, int modifiers, ClassInfo returnType,
26                       ClassInfo[] parameterTypes, ClassInfo[] exceptionTypes) {
27     this.declaringType = declaringType;
28     this.methodName = methodName;
29     this.modifiers = modifiers;
30     this.returnType = returnType;
31     this.parameterTypes = parameterTypes;
32     this.exceptionTypes = exceptionTypes;
33
34   }
35
36   public ClassInfo getReturnType() {
37     return this.returnType;
38   }
39
40   public ClassInfo[] getParameterTypes() {
41     return this.parameterTypes;
42   }
43
44   public String JavaDoc[] getParameterNames() {
45     return new String JavaDoc[0]; //To change body of implemented methods use File | Settings | File Templates.
46
}
47
48   public ClassInfo[] getExceptionTypes() {
49     return this.exceptionTypes;
50   }
51
52   public ClassInfo getDeclaringType() {
53     return this.declaringType;
54   }
55
56   public String JavaDoc getName() {
57     return this.methodName;
58   }
59
60   public String JavaDoc getSignature() {
61     return null; //To change body of implemented methods use File | Settings | File Templates.
62
}
63   
64   public String JavaDoc getGenericsSignature() {
65     return null;
66   }
67
68   public int getModifiers() {
69     return this.modifiers;
70   }
71
72   public Annotation[] getAnnotations() {
73     throw new ImplementMe();
74   }
75 }
Popular Tags