|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.objectweb.fractal.juliak.factory.AbstractGenericFactoryImpl
public abstract class AbstractGenericFactoryImpl
Abstract super class for generic factories. This factory does not make any assumption on the way control membranes are implemented. This concern is deferred to subclasses.
Constructor Summary | |
---|---|
AbstractGenericFactoryImpl()
|
Method Summary | |
---|---|
protected abstract Component |
bindFcMembrane(Type type,
Object contentDesc,
Object content,
Component membrane)
Bind a control membrane to the component defined by the given type, content description and content. |
protected void |
checkFcContentClassforBC(Type type,
Class contentClass)
Check that the content class implements the BindingController interface if at least one client interface is defined in its type. |
protected void |
checkFcContentClassImplementsServerInterfaces(Type type,
Class contentClass)
Check that the content class implements the server interfaces defined in the type. |
protected void |
checkFcContentDesc(Type type,
Object controllerDesc,
Object contentDesc)
Check that the value given for the content description is legal. |
protected void |
checkFcControllerDesc(Object controllerDesc)
Check that the given value is a legal controller description. |
protected void |
checkFcType(Type type,
Object controllerDesc)
Check that the value given for the type is legal. |
protected boolean |
isFcContentToBeCheckedForBC(Object controllerDesc)
Return true if the content class associated to the given controller description must implement the BindingController interface when its type defines at least one client interface. |
protected Class |
loadFcContentClass(Object controllerDesc,
String contentDescStr)
Load the specified content class. |
protected Object |
newFcContent(Type type,
Object controllerDesc,
Object contentDesc)
Instantiate the content part of a component. |
Component |
newFcInstance(Type type,
Object controllerDesc,
Object contentDesc)
Create a new component. |
protected abstract Component |
newFcMembrane(Type type,
Object controllerDesc,
Object contentDesc,
Object content)
Create a new control membrane. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractGenericFactoryImpl()
Method Detail |
---|
public Component newFcInstance(Type type, Object controllerDesc, Object contentDesc) throws InstantiationException
newFcInstance
in interface GenericFactory
type
- the component typecontrollerDesc
- the description of the control membrane associated
to the componentcontentDesc
- the description of the content of the component
InstantiationException
protected abstract Component newFcMembrane(Type type, Object controllerDesc, Object contentDesc, Object content) throws InstantiationException
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
InstantiationException
protected abstract Component bindFcMembrane(Type type, Object contentDesc, Object content, Component membrane) throws InstantiationException
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
InstantiationException
protected Object newFcContent(Type type, Object controllerDesc, Object contentDesc) throws InstantiationException
InstantiationException
protected Class loadFcContentClass(Object controllerDesc, String contentDescStr) throws InstantiationException
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
.
InstantiationException
protected void checkFcType(Type type, Object controllerDesc) throws InstantiationException
InstantiationException
protected void checkFcControllerDesc(Object controllerDesc) throws InstantiationException
InstantiationException
protected void checkFcContentDesc(Type type, Object controllerDesc, Object contentDesc) throws InstantiationException
InstantiationException
protected void checkFcContentClassImplementsServerInterfaces(Type type, Class contentClass) throws InstantiationException
InstantiationException
protected boolean isFcContentToBeCheckedForBC(Object controllerDesc)
protected void checkFcContentClassforBC(Type type, Class contentClass) throws InstantiationException
InstantiationException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |