@Value values may use ${...} placeholders (driven by PropertyPlaceholderConfigurer); @Autowired uses field/parameter name as fallback qualifier value (SPR-5152)

This commit is contained in:
Juergen Hoeller
2009-03-31 20:27:42 +00:00
parent 2524ca33d5
commit b85d45725d
10 changed files with 184 additions and 30 deletions

View File

@@ -148,6 +148,13 @@ public class MethodParameter {
return this.constructor;
}
/**
* Return the class that declares the underlying Method or Constructor.
*/
public Class getDeclaringClass() {
return (this.method != null ? this.method.getDeclaringClass() : this.constructor.getDeclaringClass());
}
/**
* Return the index of the method/constructor parameter.
* @return the parameter index (never negative)