01: /*
02: * Copyright (C) The MX4J Contributors.
03: * All rights reserved.
04: *
05: * This software is distributed under the terms of the MX4J License version 1.0.
06: * See the terms of the MX4J License in the documentation provided with this software.
07: */
08:
09: package test.javax.management.compliance.signature.support;
10:
11: /**
12: * @version $Revision: 1.4 $
13: */
14: public interface ObjectMethod {
15: public int getModifiers();
16:
17: public Class getReturnType();
18:
19: public String getName();
20:
21: public Class[] getParameterTypes();
22:
23: public Class[] getExceptionTypes();
24:
25: public static class Constructor implements ObjectMethod {
26: private java.lang.reflect.Constructor constructor;
27:
28: public Constructor(java.lang.reflect.Constructor ctor) {
29: this .constructor = ctor;
30: }
31:
32: public int getModifiers() {
33: return constructor.getModifiers();
34: }
35:
36: public Class getReturnType() {
37: return constructor.getDeclaringClass();
38: }
39:
40: public String getName() {
41: return constructor.getName();
42: }
43:
44: public Class[] getParameterTypes() {
45: return constructor.getParameterTypes();
46: }
47:
48: public Class[] getExceptionTypes() {
49: return constructor.getExceptionTypes();
50: }
51: }
52:
53: public static class Method implements ObjectMethod {
54: private java.lang.reflect.Method method;
55:
56: public Method(java.lang.reflect.Method method) {
57: this .method = method;
58: }
59:
60: public int getModifiers() {
61: return method.getModifiers();
62: }
63:
64: public Class getReturnType() {
65: return method.getReturnType();
66: }
67:
68: public String getName() {
69: return method.getName();
70: }
71:
72: public Class[] getParameterTypes() {
73: return method.getParameterTypes();
74: }
75:
76: public Class[] getExceptionTypes() {
77: return method.getExceptionTypes();
78: }
79: }
80: }
|