dynclass
Class MethodDescription

java.lang.Object
  |
  +--dynclass.MethodDescription

public final class MethodDescription
extends Object

This class provides sufficient information to uniquely identify a method in a class (name and parameters), but not enough to fully describe a method (since it doesn't have return type or exceptions). For that, you need MethodDefinition.

Usually, MethodDescription instances are not created directly. Instead they are accessed through a MethodDefinition.


Constructor Summary
MethodDescription(String name, Class[] params)
          Create a description with the given name and parameter list.
 
Method Summary
 boolean equals(Object other)
           
 Method getMethodFromClass(Class cls)
          Inspect the given Class for a Method matching this description.
 String getName()
           
 Class[] getParameterTypes()
           
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodDescription

public MethodDescription(String name,
                         Class[] params)
Create a description with the given name and parameter list.
Parameters:
params - the parameter type list. null and 0-length arrays are equivalent.
Method Detail

getName

public String getName()

getParameterTypes

public Class[] getParameterTypes()

getMethodFromClass

public Method getMethodFromClass(Class cls)
                          throws NoSuchMethodException
Inspect the given Class for a Method matching this description. Throws NoSuchMethodException if not matching method is found.

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

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