![JAR search and dependency download from the Maven repository](/logo.png)
org.objectweb.fractal.koch.membrane.ParametricPrimitiveTemplate Maven / Gradle / Ivy
The newest version!
/*
* Generated by org.objectweb.fractal.koch.mc.MembraneCompiler on: Sat Dec 29 18:02:40 CET 2007
*/
package org.objectweb.fractal.koch.membrane;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.api.type.ComponentType;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.util.Fractal;
import org.objectweb.fractal.api.NoSuchInterfaceException;
/**
* Implementation of the ParametricPrimitiveTemplate membrane factory component.
*
* @author Lionel Seinturier
* @since 2.5
*/
public class ParametricPrimitiveTemplate implements org.objectweb.fractal.api.factory.Factory, org.objectweb.fractal.api.control.BindingController {
public Object getFcContentDesc() {
throw new java.lang.UnsupportedOperationException();
}
public Object getFcControllerDesc() {
throw new java.lang.UnsupportedOperationException();
}
public Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException {
try {
// --------------------------------------------------
InterfaceType IT0 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", false, false, false);
ComponentType CT0 = typeFactory.createFcType(new InterfaceType [] { IT0 });
Component C0 = genericFactory.newFcInstance(CT0, "mPrimitive", "'component-impl");
try { Fractal.getNameController(C0).setFcName("Comp"); } catch (NoSuchInterfaceException ignored) { }
Fractal.getLifeCycleController(C0).startFc();
InterfaceType IT1 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", true, false, false);
InterfaceType IT2 = typeFactory.createFcItfType("///cloneable-attribute-controller", "org.objectweb.fractal.julia.control.attribute.CloneableAttributeController", false, false, false);
ComponentType CT1 = typeFactory.createFcType(new InterfaceType [] { IT1, IT2 });
Component C1 = genericFactory.newFcInstance(CT1, "mPrimitive", "((org.objectweb.fractal.julia.asm.AttributeControllerClassGenerator ('attributeControllerInterface)))");
try { Fractal.getNameController(C1).setFcName("AC"); } catch (NoSuchInterfaceException ignored) { }
InterfaceType IT3 = typeFactory.createFcItfType("//name-controller", "org.objectweb.fractal.api.control.NameController", false, false, false);
ComponentType CT2 = typeFactory.createFcType(new InterfaceType [] { IT3 });
Component C2 = genericFactory.newFcInstance(CT2, "mPrimitive", "'name-controller-impl");
try { Fractal.getNameController(C2).setFcName("NC"); } catch (NoSuchInterfaceException ignored) { }
Fractal.getLifeCycleController(C2).startFc();
InterfaceType IT4 = typeFactory.createFcItfType("//super-controller", "org.objectweb.fractal.julia.control.content.SuperControllerNotifier", true, false, false);
InterfaceType IT5 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", true, false, false);
InterfaceType IT6 = typeFactory.createFcItfType("//binding-controller", "org.objectweb.fractal.api.control.BindingController", false, false, false);
ComponentType CT3 = typeFactory.createFcType(new InterfaceType [] { IT4, IT5, IT6 });
Component C3 = genericFactory.newFcInstance(CT3, "mPrimitive", "'primitive-binding-controller-impl");
try { Fractal.getNameController(C3).setFcName("BC"); } catch (NoSuchInterfaceException ignored) { }
InterfaceType IT7 = typeFactory.createFcItfType("//super-controller", "org.objectweb.fractal.julia.control.content.SuperControllerNotifier", false, false, false);
ComponentType CT4 = typeFactory.createFcType(new InterfaceType [] { IT7 });
Component C4 = genericFactory.newFcInstance(CT4, "mPrimitive", "'super-controller-impl");
try { Fractal.getNameController(C4).setFcName("SC"); } catch (NoSuchInterfaceException ignored) { }
Fractal.getLifeCycleController(C4).startFc();
InterfaceType IT8 = typeFactory.createFcItfType("///cloneable-attribute-controller", "org.objectweb.fractal.julia.control.attribute.CloneableAttributeController", true, true, false);
InterfaceType IT9 = typeFactory.createFcItfType("//name-controller", "org.objectweb.fractal.api.control.NameController", true, false, false);
InterfaceType IT10 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", true, false, false);
InterfaceType IT11 = typeFactory.createFcItfType("//factory", "org.objectweb.fractal.julia.factory.Template", false, false, false);
InterfaceType IT12 = typeFactory.createFcItfType("///template", "org.objectweb.fractal.julia.factory.Template", false, false, false);
ComponentType CT5 = typeFactory.createFcType(new InterfaceType [] { IT8, IT9, IT10, IT11, IT12 });
Component C5 = genericFactory.newFcInstance(CT5, "mPrimitive", "'factory-impl");
try { Fractal.getNameController(C5).setFcName("FC"); } catch (NoSuchInterfaceException ignored) { }
InterfaceType IT13 = typeFactory.createFcItfType("///membrane-controller", "org.objectweb.fractal.koch.control.membrane.MembraneController", false, false, false);
ComponentType CT6 = typeFactory.createFcType(new InterfaceType [] { IT13 });
Component C6 = genericFactory.newFcInstance(CT6, "mPrimitive", "'membrane-controller-impl");
try { Fractal.getNameController(C6).setFcName("MC"); } catch (NoSuchInterfaceException ignored) { }
Fractal.getLifeCycleController(C6).startFc();
InterfaceType IT14 = typeFactory.createFcItfType("///membrane-controller", "org.objectweb.fractal.koch.control.membrane.MembraneController", false, false, false);
InterfaceType IT15 = typeFactory.createFcItfType("//super-controller", "org.objectweb.fractal.julia.control.content.SuperControllerNotifier", false, false, false);
InterfaceType IT16 = typeFactory.createFcItfType("//name-controller", "org.objectweb.fractal.api.control.NameController", false, false, false);
InterfaceType IT17 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", false, false, false);
InterfaceType IT18 = typeFactory.createFcItfType("//binding-controller", "org.objectweb.fractal.api.control.BindingController", false, false, false);
InterfaceType IT19 = typeFactory.createFcItfType("//factory", "org.objectweb.fractal.julia.factory.Template", false, false, false);
InterfaceType IT20 = typeFactory.createFcItfType("///template", "org.objectweb.fractal.julia.factory.Template", false, false, false);
InterfaceType IT21 = typeFactory.createFcItfType("///cloneable-attribute-controller", "org.objectweb.fractal.julia.control.attribute.CloneableAttributeController", false, false, false);
ComponentType CT7 = typeFactory.createFcType(new InterfaceType [] { IT14, IT15, IT16, IT17, IT18, IT19, IT20, IT21 });
Component C7 = genericFactory.newFcInstance(CT7, "mComposite", null);
try { Fractal.getNameController(C7).setFcName("org.objectweb.fractal.koch.membrane.ParametricPrimitiveTemplate"); } catch (NoSuchInterfaceException ignored) { }
Fractal.getContentController(C7).addFcSubComponent(C0);
Fractal.getContentController(C7).addFcSubComponent(C1);
Fractal.getContentController(C7).addFcSubComponent(C2);
Fractal.getContentController(C7).addFcSubComponent(C3);
Fractal.getContentController(C7).addFcSubComponent(C4);
Fractal.getContentController(C7).addFcSubComponent(C5);
Fractal.getContentController(C7).addFcSubComponent(C6);
Fractal.getBindingController(C7).bindFc("//component", C0.getFcInterface("//component"));
Fractal.getBindingController(C7).bindFc("///cloneable-attribute-controller", C1.getFcInterface("///cloneable-attribute-controller"));
Fractal.getBindingController(C7).bindFc("//name-controller", C2.getFcInterface("//name-controller"));
Fractal.getBindingController(C7).bindFc("//binding-controller", C3.getFcInterface("//binding-controller"));
Fractal.getBindingController(C7).bindFc("//super-controller", C4.getFcInterface("//super-controller"));
Fractal.getBindingController(C7).bindFc("//factory", C5.getFcInterface("//factory"));
Fractal.getBindingController(C7).bindFc("///template", C5.getFcInterface("///template"));
Fractal.getBindingController(C1).bindFc("//component", C0.getFcInterface("//component"));
Fractal.getBindingController(C3).bindFc("//component", C0.getFcInterface("//component"));
Fractal.getBindingController(C3).bindFc("//super-controller", C4.getFcInterface("//super-controller"));
Fractal.getBindingController(C5).bindFc("//component", C0.getFcInterface("//component"));
Fractal.getBindingController(C5).bindFc("//name-controller", C2.getFcInterface("//name-controller"));
Fractal.getBindingController(C5).bindFc("///cloneable-attribute-controller", C1.getFcInterface("///cloneable-attribute-controller"));
Fractal.getBindingController(C7).bindFc("///membrane-controller", C6.getFcInterface("///membrane-controller"));
Fractal.getLifeCycleController(C1).startFc();
Fractal.getLifeCycleController(C3).startFc();
Fractal.getLifeCycleController(C5).startFc();
Fractal.getLifeCycleController(C7).startFc();
// --------------------------------------------------
return C7;
}
catch( Exception e ) {
e.printStackTrace();
throw new org.objectweb.fractal.api.factory.InstantiationException(e.getMessage());
}
}
public org.objectweb.fractal.api.Type getFcInstanceType() {
try {
// --------------------------------------------------
InterfaceType IT22 = typeFactory.createFcItfType("///membrane-controller", "org.objectweb.fractal.koch.control.membrane.MembraneController", false, false, false);
InterfaceType IT23 = typeFactory.createFcItfType("//super-controller", "org.objectweb.fractal.julia.control.content.SuperControllerNotifier", false, false, false);
InterfaceType IT24 = typeFactory.createFcItfType("//name-controller", "org.objectweb.fractal.api.control.NameController", false, false, false);
InterfaceType IT25 = typeFactory.createFcItfType("//component", "org.objectweb.fractal.api.Component", false, false, false);
InterfaceType IT26 = typeFactory.createFcItfType("//binding-controller", "org.objectweb.fractal.api.control.BindingController", false, false, false);
InterfaceType IT27 = typeFactory.createFcItfType("//factory", "org.objectweb.fractal.julia.factory.Template", false, false, false);
InterfaceType IT28 = typeFactory.createFcItfType("///template", "org.objectweb.fractal.julia.factory.Template", false, false, false);
InterfaceType IT29 = typeFactory.createFcItfType("///cloneable-attribute-controller", "org.objectweb.fractal.julia.control.attribute.CloneableAttributeController", false, false, false);
ComponentType CT8 = typeFactory.createFcType(new InterfaceType [] { IT22, IT23, IT24, IT25, IT26, IT27, IT28, IT29 });
// --------------------------------------------------
return CT8;
}
catch( Exception e ) {
e.printStackTrace();
throw new RuntimeException(e.getMessage());
}
}
private org.objectweb.fractal.api.type.TypeFactory typeFactory;
private org.objectweb.fractal.api.factory.GenericFactory genericFactory;
public String[] listFc() {
return new String[]{"type-factory","generic-factory"};
}
public void bindFc( String clientItfName, Object serverItf ) {
if( clientItfName.equals("type-factory") ) {
typeFactory = (org.objectweb.fractal.api.type.TypeFactory) serverItf;
}
if( clientItfName.equals("generic-factory") ) {
genericFactory = (org.objectweb.fractal.api.factory.GenericFactory) serverItf;
}
}
public Object lookupFc( String clientItfName ) {
if( clientItfName.equals("type-factory") ) {
return typeFactory;
}
if( clientItfName.equals("generic-factory") ) {
return genericFactory;
}
return null;
}
public void unbindFc( String clientItfName ) {
if( clientItfName.equals("type-factory") ) {
typeFactory = null;
}
if( clientItfName.equals("generic-factory") ) {
genericFactory = null;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy