Example usage for org.springframework.web.servlet HandlerMapping getClass

List of usage examples for org.springframework.web.servlet HandlerMapping getClass

Introduction

In this page you can find the example usage for org.springframework.web.servlet HandlerMapping getClass.

Prototype

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

Source Link

Document

Returns the runtime class of this Object .

Usage

From source file:org.appcomponents.platform.mvc.PlatformRequestMappingHandlerMapping.java

protected HandlerExecutionChain handle(HttpServletRequest request, Component component) throws Exception {
    ApplicationContext applicationContext = component.getApplicationContext();
    if (this.applicationContext.equals(applicationContext)) {
        return null;
    } else {/*from  w ww  .ja  v a  2  s  .c o  m*/
        Map<String, HandlerMapping> handlerMappingMap = applicationContext.getBeansOfType(HandlerMapping.class);
        for (HandlerMapping hm : handlerMappingMap.values()) {
            if (hm.getClass().equals(getClass())) {
                continue;
            }
            if (logger.isTraceEnabled()) {
                logger.trace("Testing handler map [" + hm + "] in PlatformRequestMappingHandlerMapping");
            }
            HandlerExecutionChain handler = hm.getHandler(request);
            if (handler != null) {
                return handler;
            }
        }
        return null;
    }
}