Example usage for org.springframework.core MethodParameter getClass

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

Introduction

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

Prototype

@HotSpotIntrinsicCandidate
public final native Class<?> getClass();

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.impalaframework.extension.mvc.annotation.WebAnnotationUtils.java

public static Annotation[] getAnnotations(MethodParameter methodParameter, String methodName) {
    try {/*from www . j  ava 2s . co  m*/
        return (Annotation[]) ReflectionUtils
                .invokeMethod(methodParameter.getClass().getMethod(methodName, new Class[0]), methodParameter);
    } catch (NoSuchMethodException e) {
        throw new IllegalArgumentException("No method found: " + methodName, e);
    }
}

From source file:com.github.jguaneri.notifications.web.support.AtmosphereArgumentResolver.java

@Override
public boolean supportsParameter(MethodParameter parameter) {
    boolean isSupported = AtmosphereResource.class.isAssignableFrom(parameter.getParameterType());
    if (LOGGER.isDebugEnabled()) {
        LOGGER.debug("Supports parameter: {}", isSupported);
        LOGGER.debug("Parameter Class: {}", parameter.getClass());
    }/*  ww  w  .  j  av  a  2 s. com*/
    return isSupported;
}