01: /*
02: * The contents of this file are subject to the terms
03: * of the Common Development and Distribution License
04: * (the "License"). You may not use this file except
05: * in compliance with the License.
06: *
07: * You can obtain a copy of the license at
08: * glassfish/bootstrap/legal/CDDLv1.0.txt or
09: * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10: * See the License for the specific language governing
11: * permissions and limitations under the License.
12: *
13: * When distributing Covered Code, include this CDDL
14: * HEADER in each file and include the License file at
15: * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16: * add the following below this CDDL HEADER, with the
17: * fields enclosed by brackets "[]" replaced with your
18: * own identifying information: Portions Copyright [yyyy]
19: * [name of copyright owner]
20: *
21: * Copyright 2005 Sun Microsystems, Inc. All rights reserved.
22: */
23:
24: package javax.el;
25:
26: /**
27: * Holds information about a method that a {@link MethodExpression}
28: * evaluated to.
29: *
30: * @since JSP 2.1
31: */
32: public class MethodInfo {
33:
34: /**
35: * Creates a new instance of <code>MethodInfo</code> with the given
36: * information.
37: *
38: * @param name The name of the method
39: * @param returnType The return type of the method
40: * @param paramTypes The types of each of the method's parameters
41: */
42: public MethodInfo(String name, Class<?> returnType,
43: Class<?>[] paramTypes) {
44: this .name = name;
45: this .returnType = returnType;
46: this .paramTypes = paramTypes;
47: }
48:
49: /**
50: * Returns the name of the method
51: *
52: * @return the name of the method
53: */
54: public String getName() {
55: return this .name;
56: }
57:
58: /**
59: * Returns the return type of the method
60: *
61: * @return the return type of the method
62: */
63: public Class<?> getReturnType() {
64: return this .returnType;
65: }
66:
67: /**
68: * Returns the parameter types of the method
69: *
70: * @return the parameter types of the method
71: */
72: public Class<?>[] getParamTypes() {
73: return this .paramTypes;
74: }
75:
76: private String name;
77: private Class<?> returnType;
78: private Class<?>[] paramTypes;
79: }
|