Example usage for org.springframework.core MethodParameter getParameterType

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

Introduction

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

Prototype

public Class<?> getParameterType() 

Source Link

Document

Return the type of the method/constructor parameter.

Usage

From source file:org.kmnet.com.fw.web.logging.TraceLoggingInterceptor.java

/**
 * convert parameter names of the method into a String value<br>
 * <br>/*from   w  w w .  j a  v a2s  . c  o m*/
 * @param handlerMethod Target methods of interceptor
 * @return String parameter string
 */
protected static String buildMethodParams(HandlerMethod handlerMethod) {
    MethodParameter[] params = handlerMethod.getMethodParameters();
    List<String> lst = new ArrayList<String>(params.length);
    for (MethodParameter p : params) {
        lst.add(p.getParameterType().getSimpleName());
    }
    return StringUtils.collectionToCommaDelimitedString(lst);
}

From source file:org.test.skeleton.core.security.CsrfTokenArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterType().isAssignableFrom(CsrfToken.class);
}

From source file:com.yunkouan.lpid.atmosphere.config.resolvers.MeteorArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterType().isAssignableFrom(Meteor.class);
}

From source file:ru.mystamps.web.support.spring.security.CurrentUserArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    return parameter.getParameterType().isAssignableFrom(Integer.class)
            && parameter.hasParameterAnnotation(CurrentUser.class);
}

From source file:com.lucho.atmosphere.MeteorArgumentResolver.java

/**
 * {@inheritDoc}// w ww .j  a  v a2 s  . co  m
 */
@Override
public boolean supportsParameter(final MethodParameter parameter) {
    return parameter.getParameterType().isAssignableFrom(Meteor.class);
}

From source file:net.kaczmarzyk.spring.data.jpa.web.AndSpecificationResolver.java

@Override
public boolean supportsParameter(MethodParameter param) {
    return param.getParameterType() == Specification.class && param.hasParameterAnnotation(And.class);
}

From source file:net.kaczmarzyk.spring.data.jpa.web.OrSpecificationResolver.java

@Override
public boolean supportsParameter(MethodParameter param) {
    return param.getParameterType() == Specification.class && param.hasParameterAnnotation(Or.class);
}

From source file:ch.rasc.wampspring.method.WampSessionMethodArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    Class<?> paramType = parameter.getParameterType();
    return WampSession.class.isAssignableFrom(paramType);
}

From source file:am.ik.woothee.spring.WootheeMethodArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    Class<?> paramType = parameter.getParameterType();
    return Woothee.class.isAssignableFrom(paramType);
}

From source file:ch.rasc.wampspring.method.PrincipalMethodArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    Class<?> paramType = parameter.getParameterType();
    return Principal.class.isAssignableFrom(paramType);
}