org.jboss.beans.metadata.spi.factory
Class AbstractBeanFactory

java.lang.Object
  extended by org.jboss.beans.metadata.spi.factory.AbstractBeanFactory
All Implemented Interfaces:
BeanFactory
Direct Known Subclasses:
GenericBeanFactory

public abstract class AbstractBeanFactory
extends Object
implements BeanFactory

SPI contract of bean factory we can create from GenericBeanFactoryMetaData.

Author:
Ales Justin

Field Summary
protected  org.jboss.beans.info.spi.BeanAccessMode accessMode
          The access mode
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<String,ValueMetaData> properties
          The properties Map
protected  LifecycleMetaData start
          The start lifecycle method
 
Constructor Summary
protected AbstractBeanFactory(KernelConfigurator configurator)
           
 
Method Summary
 org.jboss.beans.info.spi.BeanAccessMode getAccessMode()
          Get the access mode.
 String getBean()
          Get the bean name
 ClassLoaderMetaData getClassLoader()
          Get the classLoader.
protected  KernelConfigurator getConfigurator()
          Get the configurator.
 ConstructorMetaData getConstructor()
          Get the constructor metadata
 LifecycleMetaData getCreate()
          Get the create.
 Map<String,ValueMetaData> getProperties()
          Get the properties
 LifecycleMetaData getStart()
          Get the start.
protected  void invokeLifecycle(String methodName, LifecycleMetaData lifecycle, org.jboss.beans.info.spi.BeanInfo info, ClassLoader cl, Object target)
          Invoke a lifecycle method
 void setAccessMode(org.jboss.beans.info.spi.BeanAccessMode accessMode)
          Set the access mode.
 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<String,ValueMetaData> 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
 
Methods inherited from interface org.jboss.beans.metadata.spi.factory.BeanFactory
createBean
 

Field Detail

configurator

protected KernelConfigurator configurator
The configurator


bean

protected String bean
The bean class name


accessMode

protected org.jboss.beans.info.spi.BeanAccessMode accessMode
The access mode


classLoader

protected ClassLoaderMetaData classLoader
The classloader


constructor

protected ConstructorMetaData constructor
The constructor metadata


properties

protected Map<String,ValueMetaData> properties
The properties Map


create

protected LifecycleMetaData create
The create lifecycle method


start

protected LifecycleMetaData start
The start lifecycle method

Constructor Detail

AbstractBeanFactory

protected AbstractBeanFactory(KernelConfigurator configurator)
Method Detail

getConfigurator

protected KernelConfigurator getConfigurator()
Get the configurator.

Returns:
the configurator

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

getAccessMode

public org.jboss.beans.info.spi.BeanAccessMode getAccessMode()
Get the access mode.

Returns:
the access mode

setAccessMode

public void setAccessMode(org.jboss.beans.info.spi.BeanAccessMode accessMode)
Set the access mode.

Parameters:
accessMode - the access mode.

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<String,ValueMetaData> getProperties()
Get the properties

Returns:
the properties Map

setProperties

public void setProperties(Map<String,ValueMetaData> 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,
                               org.jboss.beans.info.spi.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 © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.