org.jboss.beans.metadata.plugins.factory
Class GenericBeanFactory

java.lang.Object
  extended by org.jboss.beans.metadata.plugins.factory.GenericBeanFactory

public class GenericBeanFactory
extends Object

Collection metadata.

Version:
$Revision: 1.9 $
Author:
Adrian Brock

Field Summary
protected  String bean
          The bean class name
protected  ClassLoaderMetaData classLoader
          The classloader
protected  KernelConfigurator configurator
          The configurator
protected  ConstructorMetaData constructor
          The constructor metadata
protected  LifecycleMetaData create
          The create lifecycle method
protected  Map properties
          The properties Map
protected  LifecycleMetaData start
          The start lifecycle method
 
Constructor Summary
GenericBeanFactory(KernelConfigurator configurator)
          Create a new generic bean factory
 
Method Summary
 Object createBean()
          Create a new bean
 String getBean()
          Get the bean name
 ClassLoaderMetaData getClassLoader()
          Get the classLoader.
 ConstructorMetaData getConstructor()
          Get the constructor metadata
 LifecycleMetaData getCreate()
          Get the create.
 Map getProperties()
          Get the properties
 LifecycleMetaData getStart()
          Get the start.
protected  void invokeLifecycle(String methodName, LifecycleMetaData lifecycle, BeanInfo info, ClassLoader cl, Object target)
          Invoke a lifecycle method
 void setBean(String bean)
          Set the bean name
 void setClassLoader(ClassLoaderMetaData classLoader)
          Set the classLoader.
 void setConstructor(ConstructorMetaData constructor)
          Set the constructor metadata
 void setCreate(LifecycleMetaData create)
          Set the create.
 void setProperties(Map properties)
          Set the properties
 void setStart(LifecycleMetaData start)
          Set the start.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configurator

protected KernelConfigurator configurator
The configurator


bean

protected String bean
The bean class name


classLoader

protected ClassLoaderMetaData classLoader
The classloader


constructor

protected ConstructorMetaData constructor
The constructor metadata


properties

protected Map properties
The properties Map


create

protected LifecycleMetaData create
The create lifecycle method


start

protected LifecycleMetaData start
The start lifecycle method

Constructor Detail

GenericBeanFactory

public GenericBeanFactory(KernelConfigurator configurator)
Create a new generic bean factory

Parameters:
configurator - the configurator
Method Detail

createBean

public Object createBean()
                  throws Throwable
Create a new bean

Returns:
the bean
Throws:
Throwable - for any error

getBean

public String getBean()
Get the bean name

Returns:
the bean

setBean

public void setBean(String bean)
Set the bean name

Parameters:
bean - the bean name

getClassLoader

public ClassLoaderMetaData getClassLoader()
Get the classLoader.

Returns:
the classLoader.

setClassLoader

public void setClassLoader(ClassLoaderMetaData classLoader)
Set the classLoader.

Parameters:
classLoader - the classLoader.

getConstructor

public ConstructorMetaData getConstructor()
Get the constructor metadata

Returns:
the contructor metadata

setConstructor

public void setConstructor(ConstructorMetaData constructor)
Set the constructor metadata

Parameters:
constructor - the constructor metadata

getProperties

public Map getProperties()
Get the properties

Returns:
the properties Map

setProperties

public void setProperties(Map properties)
Set the properties

Parameters:
properties - the properties Map

getCreate

public LifecycleMetaData getCreate()
Get the create.

Returns:
the create.

setCreate

public void setCreate(LifecycleMetaData create)
Set the create.

Parameters:
create - the create.

getStart

public LifecycleMetaData getStart()
Get the start.

Returns:
the start.

setStart

public void setStart(LifecycleMetaData start)
Set the start.

Parameters:
start - the start.

invokeLifecycle

protected void invokeLifecycle(String methodName,
                               LifecycleMetaData lifecycle,
                               BeanInfo info,
                               ClassLoader cl,
                               Object target)
                        throws Throwable
Invoke a lifecycle method

Parameters:
methodName - the default method name
lifecycle - the lifecycle
info - the bean info
cl - the classloader
target - the target
Throws:
Throwable - for any error


Copyright © 2004 JBoss Inc. All Rights Reserved.