org.apache.beehive.controls.spi.bean
Class JavaControlFactory

Object
  extended by JavaControlFactory
All Implemented Interfaces:
ControlFactory

public class JavaControlFactory
extends Object
implements ControlFactory

The SimpleControlFactory class is a default implementation of the org.apache.beehive.controls.api.bean.ControlFactory interface. It uses Java reflection to create new control instances.

See Also:
Controls.instantiate(java.lang.ClassLoader, java.lang.String, org.apache.beehive.controls.api.properties.PropertyMap), ControlFactory

Constructor Summary
JavaControlFactory()
           
 
Method Summary
<T extends ControlBean>
T
instantiate(Class<T> beanClass, PropertyMap props, ControlBeanContext context, String id)
          Instantiates a new ControlBean of the requested class, using mechanisms provided by a provider-specific JavaBeans framework.
 
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JavaControlFactory

public JavaControlFactory()
Method Detail

instantiate

public <T extends ControlBean> T instantiate(Class<T> beanClass,
                                             PropertyMap props,
                                             ControlBeanContext context,
                                             String id)
Instantiates a new ControlBean of the requested class, using mechanisms provided by a provider-specific JavaBeans framework.

Specified by:
instantiate in interface ControlFactory
Parameters:
beanClass - the ControlBean class to instantiate
props - an initial set of client-specified properties to associate with the bean instance. May be null.
context - the containing ControlBeanContext for the bean, if nested inside of a container or other control. May be null to use the current active execution context.
id - the bean control ID. Must be unique within the containing context. If null, a unique identifier will be auto-generated.
Returns:
a new ControlBean instance of the requested class.