* annotation.
*/
public <A extends Annotation> List<Annotation> getMultiValueConstraints(A annotation) {
List<Annotation> annotationList = new ArrayList<Annotation>();
try {
final GetMethod getMethod = GetMethod.action( annotation.getClass(), "value" );
final Method method;
if ( System.getSecurityManager() != null ) {
method = AccessController.doPrivileged( getMethod );
}
else {
method = getMethod.run();
}
if (method != null) {
Class returnType = method.getReturnType();
if ( returnType.isArray() && returnType.getComponentType().isAnnotation() ) {
Annotation[] annotations = ( Annotation[] ) method.invoke( annotation );