biz.xsoftware.mock
Class MethodSignature
java.lang.Object
biz.xsoftware.mock.MethodSignature
public final class MethodSignature
- extends Object
This class represents class method and it's arguments
So, for example if you have the following method:
public void foo(String arg0, String arg1)
This object will contain the name, "foo" and the arguments in an array,
{String, String}
- Since:
- Aug 1, 2007
- Author:
- Brian Freeman
Constructor Summary |
MethodSignature(String name)
Creates a new instance using the given method name and creates an
empty array for the method's arguments |
MethodSignature(String name,
Class<?>... args)
Creates a new instance and clones the args given |
ANY_CLASS_TYPE
public static final Class<?> ANY_CLASS_TYPE
MethodSignature
public MethodSignature(String name)
- Creates a new instance using the given method name and creates an
empty array for the method's arguments
MethodSignature
public MethodSignature(String name,
Class<?>... args)
- Creates a new instance and clones the args given
- Parameters:
name
- The name of the methodargs
- The method's arguments, individual arguments are not allowed
to be null. However, a null array is allowed for backwards
compatibility by casting it MethodSignature("methodName",
(Class>[]) null);
getParamTypes
public Class<?>[] getParamTypes()
getName
public String getName()
toString
public String toString()
- Builds and returns a String representation of this obj
- Overrides:
toString
in class Object
- Returns:
- A String representation of this object