net.sourceforge.hiveutils.service.impl
Class DefaultMethodMappingErrorHandler

java.lang.Object
  extended by net.sourceforge.hiveutils.service.impl.DefaultMethodMappingErrorHandler
All Implemented Interfaces:
MethodMappingErrorHandler

public class DefaultMethodMappingErrorHandler
extends java.lang.Object
implements MethodMappingErrorHandler

Default implmentation of MethodMappingErrorHandler, used by AdapterBuilderFactory to log warnings.

Author:
Jean-Francois Poilpret

Constructor Summary
DefaultMethodMappingErrorHandler(org.apache.commons.logging.Log logger)
           
 
Method Summary
 boolean handleIncompatibleMethods(java.lang.reflect.Method source, java.lang.reflect.Method target)
          Called back by MethodMappingBuilder when matching methods from source and target classes have incompatible return types.
 void handleNonExistingMethod(java.lang.reflect.Method source, java.lang.Class target)
          Called back by MethodMappingBuilder when one method from source class has no matching method in target class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultMethodMappingErrorHandler

public DefaultMethodMappingErrorHandler(org.apache.commons.logging.Log logger)
Method Detail

handleIncompatibleMethods

public boolean handleIncompatibleMethods(java.lang.reflect.Method source,
                                         java.lang.reflect.Method target)
Description copied from interface: MethodMappingErrorHandler
Called back by MethodMappingBuilder when matching methods from source and target classes have incompatible return types.

Specified by:
handleIncompatibleMethods in interface MethodMappingErrorHandler
Parameters:
source - method from source class
target - matching method from target class
Returns:
true if MethodMappingBuilder should still add this mapping as if no error occurred

handleNonExistingMethod

public void handleNonExistingMethod(java.lang.reflect.Method source,
                                    java.lang.Class target)
Description copied from interface: MethodMappingErrorHandler
Called back by MethodMappingBuilder when one method from source class has no matching method in target class.

Specified by:
handleNonExistingMethod in interface MethodMappingErrorHandler
Parameters:
source - method from source class
target - target class