com.fatwire.gst.foundation.controller.action.support
Class ClassBasedFactory

java.lang.Object
  extended by com.fatwire.gst.foundation.controller.action.support.BaseFactory
      extended by com.fatwire.gst.foundation.controller.action.support.ClassBasedFactory
All Implemented Interfaces:
Factory

public class ClassBasedFactory
extends BaseFactory

Factory that reads the producer methods of the passed in class names.

Author:
Dolf Dijkstra

Field Summary
 
Fields inherited from class com.fatwire.gst.foundation.controller.action.support.BaseFactory
ics, LOG
 
Constructor Summary
ClassBasedFactory(COM.FutureTense.Interfaces.ICS ics, Factory parent, ClassLoader classLoader, String... classnames)
           
ClassBasedFactory(COM.FutureTense.Interfaces.ICS ics, Factory parent, String... classnames)
           
 
Method Summary
protected  Class<?>[] factoryClasses(COM.FutureTense.Interfaces.ICS ics)
          Method to find classes to use for the producer methods.
 
Methods inherited from class com.fatwire.gst.foundation.controller.action.support.BaseFactory
createFromMethod, createICS, ctorStrategy, getObject, invokeCreateMethod, locate, namedAnnotationStrategy, reflectionStrategy, shouldCache, throwRuntimeException, toString, unnamedAnnotationStrategy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassBasedFactory

public ClassBasedFactory(COM.FutureTense.Interfaces.ICS ics,
                         Factory parent,
                         String... classnames)
Parameters:
ics -
parent - the parent factory
classnames - the names of the classes that hold the factory methods

ClassBasedFactory

public ClassBasedFactory(COM.FutureTense.Interfaces.ICS ics,
                         Factory parent,
                         ClassLoader classLoader,
                         String... classnames)
Parameters:
ics -
parent - the parent factory
classLoader - the classloader to load the classes of
classnames - the names of the classes that hold the factory methods
Method Detail

factoryClasses

protected Class<?>[] factoryClasses(COM.FutureTense.Interfaces.ICS ics)
Description copied from class: BaseFactory
Method to find classes to use for the producer methods. This implementation returns Object.getClass().

Subclasses can return and are encouraged to return other classes.

Overrides:
factoryClasses in class BaseFactory
Returns:
array of classes to use for reflection


Copyright © 2010-2013 Oracle Corporation. All Rights Reserved.