org.springframework.web.bind.annotation.support
Class HandlerMethodResolver

java.lang.Object
  extended by org.springframework.web.bind.annotation.support.HandlerMethodResolver
Direct Known Subclasses:
AnnotationMethodHandlerAdapter.PortletHandlerMethodResolver, AnnotationMethodHandlerAdapter.ServletHandlerMethodResolver

public class HandlerMethodResolver
extends java.lang.Object

Support class for resolving web method annotations in a handler type. Processes @RequestMapping, @InitBinder, @ModelAttribute and @SessionAttributes.

Used by AnnotationMethodHandlerAdapter and AnnotationMethodHandlerAdapter.

Since:
2.5.2
Author:
Juergen Hoeller
See Also:
RequestMapping, InitBinder, ModelAttribute, SessionAttributes

Field Summary
private  java.util.Set<java.lang.String> actualSessionAttributeNames
           
private  java.util.Set<java.lang.reflect.Method> handlerMethods
           
private  java.util.Set<java.lang.reflect.Method> initBinderMethods
           
private  java.util.Set<java.lang.reflect.Method> modelAttributeMethods
           
private  java.util.Set<java.lang.String> sessionAttributeNames
           
private  boolean sessionAttributesFound
           
private  java.util.Set<java.lang.Class> sessionAttributeTypes
           
private  RequestMapping typeLevelMapping
           
 
Constructor Summary
HandlerMethodResolver()
           
 
Method Summary
 java.util.Set<java.lang.String> getActualSessionAttributeNames()
           
 java.util.Set<java.lang.reflect.Method> getHandlerMethods()
           
 java.util.Set<java.lang.reflect.Method> getInitBinderMethods()
           
 java.util.Set<java.lang.reflect.Method> getModelAttributeMethods()
           
 RequestMapping getTypeLevelMapping()
           
 boolean hasHandlerMethods()
           
 boolean hasSessionAttributes()
           
 boolean hasTypeLevelMapping()
           
 void init(java.lang.Class<?> handlerType)
          Initialize a new HandlerMethodResolver for the specified handler type.
protected  boolean isHandlerMethod(java.lang.reflect.Method method)
           
protected  boolean isInitBinderMethod(java.lang.reflect.Method method)
           
protected  boolean isModelAttributeMethod(java.lang.reflect.Method method)
           
 boolean isSessionAttribute(java.lang.String attrName, java.lang.Class attrType)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

handlerMethods

private final java.util.Set<java.lang.reflect.Method> handlerMethods

initBinderMethods

private final java.util.Set<java.lang.reflect.Method> initBinderMethods

modelAttributeMethods

private final java.util.Set<java.lang.reflect.Method> modelAttributeMethods

typeLevelMapping

private RequestMapping typeLevelMapping

sessionAttributesFound

private boolean sessionAttributesFound

sessionAttributeNames

private final java.util.Set<java.lang.String> sessionAttributeNames

sessionAttributeTypes

private final java.util.Set<java.lang.Class> sessionAttributeTypes

actualSessionAttributeNames

private final java.util.Set<java.lang.String> actualSessionAttributeNames
Constructor Detail

HandlerMethodResolver

public HandlerMethodResolver()
Method Detail

init

public void init(java.lang.Class<?> handlerType)
Initialize a new HandlerMethodResolver for the specified handler type.

Parameters:
handlerType - the handler class to introspect

isHandlerMethod

protected boolean isHandlerMethod(java.lang.reflect.Method method)

isInitBinderMethod

protected boolean isInitBinderMethod(java.lang.reflect.Method method)

isModelAttributeMethod

protected boolean isModelAttributeMethod(java.lang.reflect.Method method)

hasHandlerMethods

public final boolean hasHandlerMethods()

getHandlerMethods

public final java.util.Set<java.lang.reflect.Method> getHandlerMethods()

getInitBinderMethods

public final java.util.Set<java.lang.reflect.Method> getInitBinderMethods()

getModelAttributeMethods

public final java.util.Set<java.lang.reflect.Method> getModelAttributeMethods()

hasTypeLevelMapping

public boolean hasTypeLevelMapping()

getTypeLevelMapping

public RequestMapping getTypeLevelMapping()

hasSessionAttributes

public boolean hasSessionAttributes()

isSessionAttribute

public boolean isSessionAttribute(java.lang.String attrName,
                                  java.lang.Class attrType)

getActualSessionAttributeNames

public java.util.Set<java.lang.String> getActualSessionAttributeNames()