Skip to content

Package: MethodInfo

MethodInfo

nameinstructionbranchcomplexitylinemethod
MethodInfo(String, Class, Class[])
M: 12 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 5 C: 0
0%
M: 1 C: 0
0%
getName()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getParamTypes()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%
getReturnType()
M: 3 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 1 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * Copyright (c) 1997, 2019 Oracle and/or its affiliates and others.
3: * All rights reserved.
4: * Copyright 2004 The Apache Software Foundation
5: *
6: * Licensed under the Apache License, Version 2.0 (the "License");
7: * you may not use this file except in compliance with the License.
8: * You may obtain a copy of the License at
9: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: package jakarta.el;
20:
21: /**
22: * Holds information about a method that a {@link MethodExpression} evaluated to.
23: *
24: * @since Jakarta Server Pages 2.1
25: */
26: public class MethodInfo {
27:
28: private String name;
29: private Class<?> returnType;
30: private Class<?>[] paramTypes;
31:
32: /**
33: * Creates a new instance of <code>MethodInfo</code> with the given information.
34: *
35: * @param name The name of the method
36: * @param returnType The return type of the method
37: * @param paramTypes The types of each of the method's parameters
38: */
39: public MethodInfo(String name, Class<?> returnType, Class<?>[] paramTypes) {
40: this.name = name;
41: this.returnType = returnType;
42: this.paramTypes = paramTypes;
43: }
44:
45: /**
46: * Returns the name of the method
47: *
48: * @return the name of the method
49: */
50: public String getName() {
51: return name;
52: }
53:
54: /**
55: * Returns the return type of the method
56: *
57: * @return the return type of the method
58: */
59: public Class<?> getReturnType() {
60: return returnType;
61: }
62:
63: /**
64: * Returns the parameter types of the method
65: *
66: * @return the parameter types of the method
67: */
68: public Class<?>[] getParamTypes() {
69: return paramTypes;
70: }
71:
72: }