org.springframework.integration.util
Class DefaultMethodResolver

java.lang.Object
  extended by org.springframework.integration.util.DefaultMethodResolver
All Implemented Interfaces:
MethodResolver

public class DefaultMethodResolver
extends java.lang.Object
implements MethodResolver

Default MethodResolver implementation. It first checks for a single Method with the specified annotation (if not null), and then falls back to a single public Method if available.

Author:
Mark Fisher

Constructor Summary
DefaultMethodResolver()
           
DefaultMethodResolver(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
           
 
Method Summary
 java.lang.reflect.Method findMethod(java.lang.Class<?> clazz)
          Find a single Method on the given Class that matches this resolver's criteria.
 java.lang.reflect.Method findMethod(java.lang.Object candidate)
          Find a single Method on the provided Object that matches this resolver's criteria.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMethodResolver

public DefaultMethodResolver()

DefaultMethodResolver

public DefaultMethodResolver(java.lang.Class<? extends java.lang.annotation.Annotation> annotationType)
Method Detail

findMethod

public java.lang.reflect.Method findMethod(java.lang.Object candidate)
Description copied from interface: MethodResolver
Find a single Method on the provided Object that matches this resolver's criteria.

Specified by:
findMethod in interface MethodResolver
Parameters:
candidate - the candidate Object whose Class should be searched for a Method
Returns:
a single Method or null if no Method matching this resolver's criteria can be found.

findMethod

public java.lang.reflect.Method findMethod(java.lang.Class<?> clazz)
Description copied from interface: MethodResolver
Find a single Method on the given Class that matches this resolver's criteria.

Specified by:
findMethod in interface MethodResolver
Parameters:
clazz - the Class instance on which to search for a Method
Returns:
a single Method or null if no Method matching this resolver's criteria can be found.