org.apache.aries.unittest.mocks
Class DefaultMethodCallHandlers

java.lang.Object
  extended by org.apache.aries.unittest.mocks.DefaultMethodCallHandlers

public class DefaultMethodCallHandlers
extends Object

This class contains method call handlers for some default method handling.

This class provides handlers for the toString, equals and hashCode methods. They reproduce the default Object implementations for dynamic mock objects, these can be overridden.


Field Summary
static MethodCallHandler EQUALS_HANDLER
          The Default MethodCallHandler for the equals method, performs an == check.
static MethodCallHandler HASHCODE_HANDLER
          The Default MethodCallHandler for the hashCode method, returns the identity hashCode.
static MethodCallHandler TOSTRING_HANDLER
          The Default MethodCallHandler for the toString method, reproduces @
 
Constructor Summary
DefaultMethodCallHandlers()
           
 
Method Summary
static boolean isDefaultMethodCall(MethodCall call)
          This method returns true if and only if the specified call represents a default method call.
static void registerDefaultHandlers(Skeleton s)
          This method registers the DefaultMethodCall Handlers with the specified skeleton.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EQUALS_HANDLER

public static final MethodCallHandler EQUALS_HANDLER
The Default MethodCallHandler for the equals method, performs an == check.


TOSTRING_HANDLER

public static final MethodCallHandler TOSTRING_HANDLER
The Default MethodCallHandler for the toString method, reproduces @


HASHCODE_HANDLER

public static final MethodCallHandler HASHCODE_HANDLER
The Default MethodCallHandler for the hashCode method, returns the identity hashCode.

Constructor Detail

DefaultMethodCallHandlers

public DefaultMethodCallHandlers()
Method Detail

registerDefaultHandlers

public static void registerDefaultHandlers(Skeleton s)
This method registers the DefaultMethodCall Handlers with the specified skeleton.

Parameters:
s - a skeleton

isDefaultMethodCall

public static boolean isDefaultMethodCall(MethodCall call)
This method returns true if and only if the specified call represents a default method call.

Parameters:
call - the call
Returns:
see above.


Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.