org.objectweb.fractal.juliak.factory
Class BasicGenericFactoryImpl
java.lang.Object
org.objectweb.fractal.juliak.factory.AbstractGenericFactoryImpl
org.objectweb.fractal.juliak.factory.AbstractJuliaEnabledGenericFactoryImpl
org.objectweb.fractal.juliak.factory.BasicGenericFactoryImpl
- All Implemented Interfaces:
- GenericFactory
public class BasicGenericFactoryImpl
- extends AbstractJuliaEnabledGenericFactoryImpl
- implements GenericFactory
A generic factory which instanciates components with a component-based
membrane.
- Since:
- 2.5
- Author:
- Lionel Seinturier
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicGenericFactoryImpl
public BasicGenericFactoryImpl()
newFcMembrane
protected Component newFcMembrane(Type type,
Object controllerDesc,
Object contentDesc,
Object content)
throws InstantiationException
- Create a new control membrane.
- Specified by:
newFcMembrane
in class AbstractGenericFactoryImpl
- Parameters:
type
- the type of the component associated to this membranecontrollerDesc
- the controller description of this membrane
(typically a String such as "primitive" or any of the other
registered membrane identifier)contentDesc
- the content description of the component associated
to this membrane (e.g. the fully qualified name of the class
implementing a primitive component)content
- the instance implementing the component associated
to this membrane
- Returns:
- the fcinterface for the component interface
exported by the given control membrane
- Throws:
InstantiationException
bindFcMembrane
protected Component bindFcMembrane(Type type,
Object contentDesc,
Object content,
Component membrane)
throws InstantiationException
- Bind a control membrane to the component defined by the given type,
content description and content.
- Specified by:
bindFcMembrane
in class AbstractGenericFactoryImpl
- Parameters:
type
- the type of the component associated to this membranecontentDesc
- the content description of the component associated
to this membrane (e.g. the fully qualified name of the class
implementing a primitive component)content
- the instance implementing the component associated
to this membranemembrane
- the control membrane
- Returns:
- the fcinterface for the component interface
exported by the given control membrane
- Throws:
InstantiationException
loadFcContentClass
protected Class loadFcContentClass(Object controllerDesc,
String contentDescStr)
throws InstantiationException
- Load the specified content class.
First, try to load the class from the classpath.
If that fails, assume that the specified contentDesc corresponds to an
alias defined in the julia.cfg configuration file. This is case for
control component where the content class is dynamically generated by
the ASM mixin class generator.
- Overrides:
loadFcContentClass
in class AbstractGenericFactoryImpl
- Parameters:
controllerDesc
- the controller descriptor of the component for which the content
class is requestedcontentDescStr
- the content descriptor. May be a fully-qualified class name or the
stringified representation of a Tree
to be loaded by a Julia
Loader
.
- Throws:
InstantiationException