Example usage for org.springframework.core MethodParameter getParameterAnnotation

List of usage examples for org.springframework.core MethodParameter getParameterAnnotation

Introduction

In this page you can find the example usage for org.springframework.core MethodParameter getParameterAnnotation.

Prototype

@SuppressWarnings("unchecked")
@Nullable
public <A extends Annotation> A getParameterAnnotation(Class<A> annotationType) 

Source Link

Document

Return the parameter annotation of the given type, if available.

Usage

From source file:springfox.documentation.swagger.readers.parameter.ParameterAnnotationReader.java

public static Optional<ApiParam> apiParam(MethodParameter methodParameter) {
    return fromNullable(methodParameter.getParameterAnnotation(ApiParam.class))
            .or(fromHierarchy(methodParameter, ApiParam.class));
}

From source file:com.nec.harvest.resolver.RequestArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterAnnotation(RequestAttribute.class) != null;
}

From source file:com.nec.harvest.resolver.SessionArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterAnnotation(SessionAttribute.class) != null;
}

From source file:spring.travel.site.request.RequestInfoResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterAnnotation(RequestInfo.class) != null;
}

From source file:capital.scalable.restdocs.request.PathParametersSnippet.java

protected PathVariable getAnnotation(MethodParameter param) {
    return param.getParameterAnnotation(PathVariable.class);
}

From source file:capital.scalable.restdocs.request.RequestParametersSnippet.java

protected RequestParam getAnnotation(MethodParameter param) {
    return param.getParameterAnnotation(RequestParam.class);
}

From source file:com.mtech.easyexchange.resolver.CurrentUserResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterAnnotation(ActiveUser.class) != null
            && parameter.getParameterType().equals(User.class);
}

From source file:com.naveen.demo.saml.CurrentUserHandlerMethodArgumentResolver.java

public boolean supportsParameter(MethodParameter methodParameter) {
    return methodParameter.getParameterAnnotation(CurrentUser.class) != null
            && methodParameter.getParameterType().equals(User.class);
}

From source file:com.vdenotaris.spring.boot.security.saml.web.core.CurrentUserHandlerMethodArgumentResolver.java

public boolean supportsParameter(MethodParameter methodParameter) {
    return methodParameter.getParameterAnnotation(CurrentUser.class) != null
            && methodParameter.getParameterType().equals(JWTAuthenticatedUser.class);
}

From source file:com.zhucode.web.quick.argresolver.ParaHandlerMethodArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterAnnotation(Para.class) != null;
}