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.
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.
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