toolbox.services
Class BaseResolver

Package class diagram package BaseResolver
java.lang.Object
  extended by toolbox.services.BaseResolver
Direct Known Subclasses:
FactoryResolver, PojoResolver, ServiceResolver

public class BaseResolver
extends java.lang.Object

Convenience base class that may be extended when implementing the DependencyResolver


Constructor Summary
protected BaseResolver()
          Protected Constructor.
 
Method Summary
protected  void invokeServiceMethod(java.lang.Object svcInstance, java.lang.ClassLoader loader, java.lang.String svcMethodName, java.lang.Object depInstance, java.lang.String depClassName)
          Inject the given depInstance into the given svcInstance using the provided class and method information.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseResolver

protected BaseResolver()
Protected Constructor.

Method Detail

invokeServiceMethod

protected void invokeServiceMethod(java.lang.Object svcInstance,
                                   java.lang.ClassLoader loader,
                                   java.lang.String svcMethodName,
                                   java.lang.Object depInstance,
                                   java.lang.String depClassName)
                            throws ServiceException
Inject the given depInstance into the given svcInstance using the provided class and method information.

Parameters:
svcInstance - Service instance.
loader - Use this class loader to load the dependency class. May be null.
svcMethodName - Name of the service method where the dependency must be injected.
depInstance - The dependency instance.
depClassName - The name of the class that denotes the dependency type.
Throws:
ServiceException - if the service method cannot be invoked.