File tree Expand file tree Collapse file tree 2 files changed +3
-9
lines changed
spring-beans/src/main/java/org/springframework/beans/factory/support
spring-context/src/test/java/org/springframework/context/annotation Expand file tree Collapse file tree 2 files changed +3
-9
lines changed Original file line number Diff line number Diff line change @@ -69,28 +69,22 @@ public void addTypeIdentifier(String identifier) {
69
69
this .typeIdentifiers .add (identifier );
70
70
}
71
71
72
-
73
72
@ Override
74
73
public boolean matches (Method method ) {
75
- // TODO could cache result for efficiency
76
74
if (!method .getName ().equals (getMethodName ())) {
77
- // It can't match.
78
75
return false ;
79
76
}
80
-
81
77
if (!isOverloaded ()) {
82
- // No overloaded: don't worry about arg type matching.
78
+ // Not overloaded: don't worry about arg type matching.. .
83
79
return true ;
84
80
}
85
-
86
- // If we get to here, we need to insist on precise argument matching.
81
+ // If we get here, we need to insist on precise argument matching...
87
82
if (this .typeIdentifiers .size () != method .getParameterTypes ().length ) {
88
83
return false ;
89
84
}
90
85
for (int i = 0 ; i < this .typeIdentifiers .size (); i ++) {
91
86
String identifier = this .typeIdentifiers .get (i );
92
87
if (!method .getParameterTypes ()[i ].getName ().contains (identifier )) {
93
- // This parameter cannot match.
94
88
return false ;
95
89
}
96
90
}
Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ String aString() {
250
250
return "regular" ;
251
251
}
252
252
253
- @ Bean
253
+ @ Bean @ Lazy
254
254
String aString (Integer dependency ) {
255
255
return "overloaded" + dependency ;
256
256
}
You can’t perform that action at this time.
0 commit comments