17
17
package org .springframework .core .annotation ;
18
18
19
19
import java .lang .annotation .Annotation ;
20
+ import java .lang .reflect .Constructor ;
20
21
import java .lang .reflect .Method ;
21
22
22
23
import org .springframework .core .MethodParameter ;
34
35
public class SynthesizingMethodParameter extends MethodParameter {
35
36
36
37
/**
37
- * Create a new {@code SynthesizingMethodParameter} for the given method.
38
+ * Create a new {@code SynthesizingMethodParameter} for the given method,
39
+ * with nesting level 1.
38
40
* @param method the Method to specify a parameter for
39
41
* @param parameterIndex the index of the parameter: -1 for the method
40
42
* return type; 0 for the first method parameter; 1 for the second method
@@ -44,6 +46,47 @@ public SynthesizingMethodParameter(Method method, int parameterIndex) {
44
46
super (method , parameterIndex );
45
47
}
46
48
49
+ /**
50
+ * Create a new {@code SynthesizingMethodParameter} for the given method.
51
+ * @param method the Method to specify a parameter for
52
+ * @param parameterIndex the index of the parameter: -1 for the method
53
+ * return type; 0 for the first method parameter; 1 for the second method
54
+ * parameter, etc.
55
+ * @param nestingLevel the nesting level of the target type
56
+ * (typically 1; e.g. in case of a List of Lists, 1 would indicate the
57
+ * nested List, whereas 2 would indicate the element of the nested List)
58
+ */
59
+ public SynthesizingMethodParameter (Method method , int parameterIndex , int nestingLevel ) {
60
+ super (method , parameterIndex , nestingLevel );
61
+ }
62
+
63
+ /**
64
+ * Create a new {@code SynthesizingMethodParameter} for the given constructor,
65
+ * with nesting level 1.
66
+ * @param constructor the Constructor to specify a parameter for
67
+ * @param parameterIndex the index of the parameter
68
+ */
69
+ public SynthesizingMethodParameter (Constructor <?> constructor , int parameterIndex ) {
70
+ super (constructor , parameterIndex );
71
+ }
72
+
73
+ /**
74
+ * Create a new {@code SynthesizingMethodParameter} for the given constructor.
75
+ * @param constructor the Constructor to specify a parameter for
76
+ * @param parameterIndex the index of the parameter
77
+ * @param nestingLevel the nesting level of the target type
78
+ * (typically 1; e.g. in case of a List of Lists, 1 would indicate the
79
+ * nested List, whereas 2 would indicate the element of the nested List)
80
+ */
81
+ public SynthesizingMethodParameter (Constructor <?> constructor , int parameterIndex , int nestingLevel ) {
82
+ super (constructor , parameterIndex , nestingLevel );
83
+ }
84
+
85
+ /**
86
+ * Copy constructor, resulting in an independent {@code SynthesizingMethodParameter}
87
+ * based on the same metadata and cache state that the original object was in.
88
+ * @param original the original SynthesizingMethodParameter object to copy from
89
+ */
47
90
protected SynthesizingMethodParameter (SynthesizingMethodParameter original ) {
48
91
super (original );
49
92
}
0 commit comments