The class may be created with a bean instance or with a bean name
(e.g. lazy-init bean, prototype bean). Use createWithResolvedBean()
to obtain a HandlerMethod instance with a bean instance resolved
through the associated BeanFactory.
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final BeanFactory | |
| private final Class | |
| public static final Log | defaultLogger
Public for wrapping with fallback logger. |
| protected Log | |
| private HandlerMethod |
| Access | Constructor and Description |
|---|---|
| public | |
| public | HandlerMethod(Object bean, String methodName, Class<?>... parameterTypes)
Create an instance from a bean instance, method name, and parameter types. |
| public | HandlerMethod(String beanName, BeanFactory beanFactory, Method method)
Create an instance from a bean name, a method, and a |
| protected | |
| private | HandlerMethod(HandlerMethod handlerMethod, Object handler)
Re-create HandlerMethod with the resolved handler. |
| Modifier and Type | Method and Description |
|---|---|
| protected void | assertTargetBean(Method method, Object targetBean, Object[] args)
Assert that the target bean class is an instance of the class where the given method is declared. |
| public HandlerMethod | createWithResolvedBean()
If the provided instance contains a bean name rather than an object instance,
the bean name is resolved before a |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides org. Indicates whether some other object is "equal to" this one. |
| protected String | |
| public Object | |
| public Class | |
| protected Class | getContainingClass()
Overrides org. Expose the containing class for method parameters. |
| public Log | |
| public HandlerMethod | getResolvedFromHandlerMethod()
Return the HandlerMethod from which this HandlerMethod instance was
resolved via |
| public String | |
| public int | hashCode()
Overrides org. Returns a hash code value for this object. |
| public void |
| bean | back to summary |
|---|---|
| private final Object bean | |
| beanFactory | back to summary |
|---|---|
| private final BeanFactory beanFactory
| |
| beanType | back to summary |
|---|---|
| private final Class<?> beanType | |
| defaultLogger | back to summary |
|---|---|
| public static final Log defaultLogger Public for wrapping with fallback logger. | |
| logger | back to summary |
|---|---|
| protected Log logger | |
| resolvedFromHandlerMethod | back to summary |
|---|---|
| private HandlerMethod resolvedFromHandlerMethod
| |
| HandlerMethod | back to summary |
|---|---|
| public HandlerMethod(Object bean, Method method) Create an instance from a bean instance and a method. | |
| HandlerMethod | back to summary |
|---|---|
| public HandlerMethod(Object bean, String methodName, Class<?>... parameterTypes) throws NoSuchMethodException Create an instance from a bean instance, method name, and parameter types.
| |
| HandlerMethod | back to summary |
|---|---|
| public HandlerMethod(String beanName, BeanFactory beanFactory, Method method) Create an instance from a bean name, a method, and a | |
| HandlerMethod | back to summary |
|---|---|
| protected HandlerMethod(HandlerMethod handlerMethod) Copy constructor for use in subclasses. | |
| HandlerMethod | back to summary |
|---|---|
| private HandlerMethod(HandlerMethod handlerMethod, Object handler) Re-create HandlerMethod with the resolved handler. | |
| assertTargetBean | back to summary |
|---|---|
| protected void assertTargetBean(Method method, Object targetBean, Object[] args) Assert that the target bean class is an instance of the class where the given method is declared. In some cases the actual endpoint instance at request- processing time may be a JDK dynamic proxy (lazy initialization, prototype beans, and others). Endpoint classes that require proxying should prefer class-based proxy mechanisms. | |
| createWithResolvedBean | back to summary |
|---|---|
| public HandlerMethod createWithResolvedBean() If the provided instance contains a bean name rather than an object instance,
the bean name is resolved before a | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides org. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| formatInvokeError | back to summary |
|---|---|
| protected String formatInvokeError(String text, Object[] args) | |
| getBean | back to summary |
|---|---|
| public Object getBean() Return the bean for this handler method. | |
| getBeanType | back to summary |
|---|---|
| public Class This method returns the type of the handler for this handler method. Note that if the bean type is a CGLIB-generated class, the original user-defined class is returned. | |
| getContainingClass | back to summary |
|---|---|
| protected Class Overrides org. Doc from org. Expose the containing class for method parameters.
| |
| getLogger | back to summary |
|---|---|
| public Log getLogger() Return the currently configured Logger.
| |
| getResolvedFromHandlerMethod | back to summary |
|---|---|
| public HandlerMethod getResolvedFromHandlerMethod() Return the HandlerMethod from which this HandlerMethod instance was
resolved via
| |
| getShortLogMessage | back to summary |
|---|---|
| public String getShortLogMessage() Return a short representation of this handler method for log message purposes. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides org. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| setLogger | back to summary |
|---|---|
| public void setLogger(Log logger) Set an alternative logger to use than the one based on the class name.
| |