qualifier annotations and @Value can be used at method level as well (applying to all parameters);

fixed EL evaluation of prepared constructor arguments for repeated prototype creation
This commit is contained in:
Juergen Hoeller
2009-03-23 14:13:41 +00:00
parent 4708446d4a
commit 4344832a47
5 changed files with 204 additions and 95 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2008 the original author or authors.
* Copyright 2002-2009 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,8 +19,8 @@ package org.springframework.core;
import java.lang.annotation.Annotation;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import java.lang.reflect.TypeVariable;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.HashMap;
import java.util.Map;
@@ -177,7 +177,14 @@ public class MethodParameter {
}
/**
* Return the annotations associated with the method/constructor parameter.
* Return the annotations associated with the target method/constructor itself.
*/
public Annotation[] getAnnotations() {
return (this.method != null ? this.method.getAnnotations() : this.constructor.getAnnotations());
}
/**
* Return the annotations associated with the specific method/constructor parameter.
*/
public Annotation[] getParameterAnnotations() {
if (this.parameterAnnotations == null) {