org.springframework.binding.method
Class MethodKey

java.lang.Object
  extended by org.springframework.binding.method.MethodKey
All Implemented Interfaces:
Serializable

public class MethodKey
extends Object
implements Serializable

A helper for resolving and caching a Java method by reflection.

Author:
Keith Donald
See Also:
Serialized Form

Constructor Summary
MethodKey(Class declaredType, String methodName, Class[] parameterTypes)
          Create a new method key.
 
Method Summary
 boolean equals(Object obj)
           
 Class getDeclaredType()
          Return the class the method is a member of.
 Method getMethod()
          Returns the keyed method, resolving it if necessary via reflection.
 String getMethodName()
          Returns the method name.
 Class[] getParameterTypes()
          Returns the method parameter types.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MethodKey

public MethodKey(Class declaredType,
                 String methodName,
                 Class[] parameterTypes)
Create a new method key.

Parameters:
declaredType - the class the method is a member of
methodName - the method name
parameterTypes - the method's parameter types, or null if the method has no parameters
Method Detail

getDeclaredType

public Class getDeclaredType()
Return the class the method is a member of.


getMethodName

public String getMethodName()
Returns the method name.


getParameterTypes

public Class[] getParameterTypes()
Returns the method parameter types. Could contain null values if no type was specified for the corresponding parameter.


getMethod

public Method getMethod()
                 throws InvalidMethodKeyException
Returns the keyed method, resolving it if necessary via reflection.

Throws:
InvalidMethodKeyException

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object

toString

public String toString()
Overrides:
toString in class Object