biz.xsoftware.mock
Class MethodSignature

java.lang.Object
  extended by 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

Field Summary
static Class<?> ANY_CLASS_TYPE
           
 
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
 
Method Summary
 String getName()
           
 Class<?>[] getParamTypes()
           
 String toString()
          Builds and returns a String representation of this obj
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ANY_CLASS_TYPE

public static final Class<?> ANY_CLASS_TYPE
Constructor Detail

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 method
args - 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);
Method Detail

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