List of usage examples for org.springframework.core MethodParameter hasMethodAnnotation
public <A extends Annotation> boolean hasMethodAnnotation(Class<A> annotationType)
From source file:org.springframework.messaging.simp.annotation.support.SubscriptionMethodReturnValueHandler.java
@Override public boolean supportsReturnType(MethodParameter returnType) { return (returnType.hasMethodAnnotation(SubscribeMapping.class) && !returnType.hasMethodAnnotation(SendTo.class) && !returnType.hasMethodAnnotation(SendToUser.class)); }
From source file:org.springframework.web.method.annotation.ModelAttributeMethodProcessor.java
/** * Return {@code true} if there is a method-level {@code @ModelAttribute} * or, in default resolution mode, for any return value type that is not * a simple type./* w ww . j a va 2s . com*/ */ @Override public boolean supportsReturnType(MethodParameter returnType) { return (returnType.hasMethodAnnotation(ModelAttribute.class) || (this.annotationNotRequired && !BeanUtils.isSimpleProperty(returnType.getParameterType()))); }