1 /*
2 * Copyright 2002-2004 The Apache Software Foundation
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.apache.commons.clazz.reflect.common;
17
18 import java.lang.reflect.Method;
19
20 /**
21 * Container for the results of method parsing: propertyName
22 * and two types. The types are used differently depending on
23 * how the corresponding AccessorMethodParser uses them.
24 *
25 * @author <a href="mailto:dmitri@apache.org">Dmitri Plotnikov</a>
26 * @version $Id: AccessorMethodParseResults.java 155436 2005-02-26 13:17:48Z dirkv $
27 */
28 public class AccessorMethodParseResults {
29
30 private Method method;
31 private String propertyName;
32 private Class type;
33 private Class parameterType;
34
35 public AccessorMethodParseResults(Method method,
36 String propertyName, Class type, Class parameterType)
37 {
38 this.method = method;
39 this.propertyName = propertyName;
40 this.type = type;
41 this.parameterType = parameterType;
42 }
43
44 /**
45 * Returns the method.
46 * @return Method
47 */
48 public Method getMethod() {
49 return method;
50 }
51
52 /**
53 * Returns the propertyName.
54 * @return String
55 */
56 public String getPropertyName() {
57 return propertyName;
58 }
59
60 /**
61 * Returns the type.
62 * @return Class
63 */
64 public Class getType() {
65 return type;
66 }
67
68 /**
69 * Returns the parameterType.
70 * @return Class
71 */
72 public Class getParameterType() {
73 return parameterType;
74 }
75 }