org.java.plugin.standard
Class StandardObjectFactory

java.lang.Object
  extended by org.java.plugin.ObjectFactory
      extended by org.java.plugin.standard.StandardObjectFactory
Direct Known Subclasses:
GuicyObjectFactory

public class StandardObjectFactory
extends ObjectFactory

Standard object factory implementation.

Version:
$Id$

Field Summary
protected  ExtendedProperties config
           
protected  org.apache.commons.logging.Log log
           
static java.lang.String PACKAGE_NAME
           
 
Constructor Summary
StandardObjectFactory()
           
 
Method Summary
 void configure(ExtendedProperties configuration)
          Configures this factory instance.
protected  java.lang.Object createClassInstance(java.lang.String className)
           
protected  PluginLifecycleHandler createLifecycleHandler()
          Creates new instance of plug-in life cycle handler implementation class using standard discovery algorithm to determine which handler implementation class should be instantiated.
 PluginManager createManager(PluginRegistry registry, PathResolver pathResolver)
          Creates new instance of plug-in manager.
 PathResolver createPathResolver()
          Creates new instance of path resolver implementation class using standard discovery algorithm to determine which resolver implementation class should be instantiated.
 PluginRegistry createRegistry()
          Creates new instance of plug-in registry implementation class using standard discovery algorithm to determine which registry implementation class should be instantiated.
protected  java.lang.String getImplClassName(java.lang.Class<?> cls)
           
 
Methods inherited from class org.java.plugin.ObjectFactory
createManager, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PACKAGE_NAME

public static final java.lang.String PACKAGE_NAME
See Also:
Constant Field Values

log

protected org.apache.commons.logging.Log log

config

protected ExtendedProperties config
Constructor Detail

StandardObjectFactory

public StandardObjectFactory()
Method Detail

configure

public void configure(ExtendedProperties configuration)
Description copied from class: ObjectFactory
Configures this factory instance. This method is called from ObjectFactory.newInstance(ExtendedProperties).

Specified by:
configure in class ObjectFactory
Parameters:
configuration - factory configuration data, may be null
See Also:
ObjectFactory.configure(ExtendedProperties)

getImplClassName

protected java.lang.String getImplClassName(java.lang.Class<?> cls)

createClassInstance

protected java.lang.Object createClassInstance(java.lang.String className)
                                        throws java.lang.InstantiationException,
                                               java.lang.IllegalAccessException,
                                               java.lang.ClassNotFoundException
Throws:
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.ClassNotFoundException

createRegistry

public PluginRegistry createRegistry()
Description copied from class: ObjectFactory
Creates new instance of plug-in registry implementation class using standard discovery algorithm to determine which registry implementation class should be instantiated.

Specified by:
createRegistry in class ObjectFactory
Returns:
new registry instance
See Also:
ObjectFactory.createRegistry()

createPathResolver

public PathResolver createPathResolver()
Description copied from class: ObjectFactory
Creates new instance of path resolver implementation class using standard discovery algorithm to determine which resolver implementation class should be instantiated.

Specified by:
createPathResolver in class ObjectFactory
Returns:
new path resolver instance
See Also:
ObjectFactory.createPathResolver()

createLifecycleHandler

protected PluginLifecycleHandler createLifecycleHandler()
Creates new instance of plug-in life cycle handler implementation class using standard discovery algorithm to determine which handler implementation class should be instantiated.

Returns:
new plug-in life cycle handler instance

createManager

public PluginManager createManager(PluginRegistry registry,
                                   PathResolver pathResolver)
Description copied from class: ObjectFactory
Creates new instance of plug-in manager.

Specified by:
createManager in class ObjectFactory
Returns:
new plug-in manager instance
See Also:
ObjectFactory.createManager( org.java.plugin.registry.PluginRegistry, org.java.plugin.PathResolver)


Copyright © 2010. All Rights Reserved.