List of usage examples for org.springframework.core MethodParameter getAnnotatedElement
public AnnotatedElement getAnnotatedElement()
From source file:com.payu.ratel.client.ContextAnnotationAutowireCandidateResolver.java
protected boolean isLazy(DependencyDescriptor descriptor) { for (Annotation ann : descriptor.getAnnotations()) { Lazy lazy = AnnotationUtils.getAnnotation(ann, Lazy.class); if (lazy != null && lazy.value()) { return true; }/*ww w .j a v a2 s .c om*/ } MethodParameter methodParam = descriptor.getMethodParameter(); if (methodParam == null) { return false; } Method method = methodParam.getMethod(); if (method == null || void.class.equals(method.getReturnType())) { Lazy lazy = AnnotationUtils.getAnnotation(methodParam.getAnnotatedElement(), Lazy.class); if (lazy != null && lazy.value()) { return true; } } return false; }