
org.objectweb.fractal.bf.connectors.BasicServiceImplFCprimitiveFCa34ec92d Maven / Gradle / Ivy
/*
* Generated by: org.objectweb.fractal.juliac.opt.oo.InitializerOOCtrlClassGenerator
* on: Thu Jun 18 16:47:41 CEST 2009
*/
package org.objectweb.fractal.bf.connectors;
public class BasicServiceImplFCprimitiveFCa34ec92d
implements org.objectweb.fractal.juliac.runtime.Factory {
public org.objectweb.fractal.api.Type getFcInstanceType() {
try {
return new org.objectweb.fractal.julia.type.BasicComponentType( new org.objectweb.fractal.api.type.InterfaceType[]{new org.objectweb.fractal.julia.type.BasicInterfaceType("service","org.objectweb.fractal.bf.connectors.Service",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("weirdService","org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParams",false,false,false),} );
}
catch( org.objectweb.fractal.api.factory.InstantiationException ie ) {
throw new org.objectweb.fractal.juliac.runtime.RuntimeException(ie);
}
}
public Object getFcControllerDesc() {
return "primitive";
}
public Object getFcContentDesc() {
return "org.objectweb.fractal.bf.connectors.BasicServiceImpl";
}
public Object newFcContent() {
Object content = new org.objectweb.fractal.bf.connectors.BasicServiceImpl();
return content;
}
public org.objectweb.fractal.api.Component newFcInstance() throws org.objectweb.fractal.api.factory.InstantiationException {
Object content = newFcContent();
return newFcInstance(content);
}
public org.objectweb.fractal.api.Component newFcInstance(Object content) throws org.objectweb.fractal.api.factory.InstantiationException {
if( content!=null && !(content instanceof org.objectweb.fractal.bf.connectors.Service) ) {
String msg = "org.objectweb.fractal.bf.connectors.BasicServiceImpl should implement org.objectweb.fractal.bf.connectors.Service";
throw new org.objectweb.fractal.api.factory.InstantiationException(msg);
}
if( content!=null && !(content instanceof org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParams) ) {
String msg = "org.objectweb.fractal.bf.connectors.BasicServiceImpl should implement org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParams";
throw new org.objectweb.fractal.api.factory.InstantiationException(msg);
}
org.objectweb.fractal.julia.InitializationContext ic = new org.objectweb.fractal.julia.InitializationContext();
ic.controllers = new java.util.ArrayList();
ic.interfaces = new java.util.HashMap();
ic.interfaces.put("/content",content);
ic.interfaces.put("/controllerDesc","primitive");
ic.content = content;
Object ctrl = null;
org.objectweb.fractal.api.Component compctrl = null;
ic.controllers.add(ctrl = new juliac.generated.ComponentImpl());
if( ctrl instanceof org.objectweb.fractal.api.Component) {compctrl=(org.objectweb.fractal.api.Component)ctrl;}
ic.controllers.add(ctrl = new juliac.generated.ContainerBindingControllerImpl());
if( ctrl instanceof org.objectweb.fractal.api.Component) {compctrl=(org.objectweb.fractal.api.Component)ctrl;}
ic.controllers.add(ctrl = new juliac.generated.SuperControllerImpl());
if( ctrl instanceof org.objectweb.fractal.api.Component) {compctrl=(org.objectweb.fractal.api.Component)ctrl;}
ic.controllers.add(ctrl = new juliac.generated.LifeCycleControllerImpl());
if( ctrl instanceof org.objectweb.fractal.api.Component) {compctrl=(org.objectweb.fractal.api.Component)ctrl;}
ic.controllers.add(ctrl = new juliac.generated.NameControllerImpl());
if( ctrl instanceof org.objectweb.fractal.api.Component) {compctrl=(org.objectweb.fractal.api.Component)ctrl;}
Object intercept = null;
intercept = compctrl;
org.objectweb.fractal.api.Interface proxy = new org.objectweb.fractal.api.ComponentFcItf(compctrl,"component",new org.objectweb.fractal.julia.type.BasicInterfaceType("component","org.objectweb.fractal.api.Component",false,false,false),false,intercept);
org.objectweb.fractal.api.Component proxyForCompCtrl = (org.objectweb.fractal.api.Component) proxy;
ic.interfaces.put("component",proxy);
for( int i=0 ; i < ic.controllers.size() ; i++ ) {
ctrl = ic.controllers.get(i);
if( ctrl instanceof org.objectweb.fractal.api.control.BindingController ) {
break;
}
ctrl = null;
}
if( ctrl == null ) {
if( content instanceof org.objectweb.fractal.api.control.BindingController) {
ctrl = content;
}
else {
throw new org.objectweb.fractal.api.factory.InstantiationException("No such controller implementing org.objectweb.fractal.api.control.BindingController");
}
}
intercept = ctrl;
proxy = new org.objectweb.fractal.api.control.BindingControllerFcItf(proxyForCompCtrl,"binding-controller",new org.objectweb.fractal.julia.type.BasicInterfaceType("binding-controller","org.objectweb.fractal.api.control.BindingController",false,false,false),false,intercept);
ic.interfaces.put("binding-controller",proxy);
for( int i=0 ; i < ic.controllers.size() ; i++ ) {
ctrl = ic.controllers.get(i);
if( ctrl instanceof org.objectweb.fractal.julia.control.content.SuperControllerNotifier ) {
break;
}
ctrl = null;
}
if( ctrl == null ) {
if( content instanceof org.objectweb.fractal.julia.control.content.SuperControllerNotifier) {
ctrl = content;
}
else {
throw new org.objectweb.fractal.api.factory.InstantiationException("No such controller implementing org.objectweb.fractal.julia.control.content.SuperControllerNotifier");
}
}
intercept = ctrl;
proxy = new org.objectweb.fractal.julia.control.content.SuperControllerNotifierFcItf(proxyForCompCtrl,"super-controller",new org.objectweb.fractal.julia.type.BasicInterfaceType("super-controller","org.objectweb.fractal.julia.control.content.SuperControllerNotifier",false,false,false),false,intercept);
ic.interfaces.put("super-controller",proxy);
for( int i=0 ; i < ic.controllers.size() ; i++ ) {
ctrl = ic.controllers.get(i);
if( ctrl instanceof org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator ) {
break;
}
ctrl = null;
}
if( ctrl == null ) {
if( content instanceof org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator) {
ctrl = content;
}
else {
throw new org.objectweb.fractal.api.factory.InstantiationException("No such controller implementing org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator");
}
}
intercept = ctrl;
proxy = new org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinatorFcItf(proxyForCompCtrl,"lifecycle-controller",new org.objectweb.fractal.julia.type.BasicInterfaceType("lifecycle-controller","org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator",false,false,false),false,intercept);
ic.interfaces.put("lifecycle-controller",proxy);
for( int i=0 ; i < ic.controllers.size() ; i++ ) {
ctrl = ic.controllers.get(i);
if( ctrl instanceof org.objectweb.fractal.api.control.NameController ) {
break;
}
ctrl = null;
}
if( ctrl == null ) {
if( content instanceof org.objectweb.fractal.api.control.NameController) {
ctrl = content;
}
else {
throw new org.objectweb.fractal.api.factory.InstantiationException("No such controller implementing org.objectweb.fractal.api.control.NameController");
}
}
intercept = ctrl;
proxy = new org.objectweb.fractal.api.control.NameControllerFcItf(proxyForCompCtrl,"name-controller",new org.objectweb.fractal.julia.type.BasicInterfaceType("name-controller","org.objectweb.fractal.api.control.NameController",false,false,false),false,intercept);
ic.interfaces.put("name-controller",proxy);
ic.type = new org.objectweb.fractal.julia.type.BasicComponentType( new org.objectweb.fractal.api.type.InterfaceType[]{new org.objectweb.fractal.julia.type.BasicInterfaceType("component","org.objectweb.fractal.api.Component",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("binding-controller","org.objectweb.fractal.api.control.BindingController",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("super-controller","org.objectweb.fractal.julia.control.content.SuperControllerNotifier",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("lifecycle-controller","org.objectweb.fractal.julia.control.lifecycle.LifeCycleCoordinator",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("name-controller","org.objectweb.fractal.api.control.NameController",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("service","org.objectweb.fractal.bf.connectors.Service",false,false,false),new org.objectweb.fractal.julia.type.BasicInterfaceType("weirdService","org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParams",false,false,false),} );
intercept = new org.objectweb.fractal.bf.connectors.ServiceInterceptorLC1a2eb783();
ic.controllers.add(intercept);
((org.objectweb.fractal.julia.Interceptor)intercept).setFcItfDelegate(content);
proxy = new org.objectweb.fractal.bf.connectors.ServiceFcItf(proxyForCompCtrl,"service",new org.objectweb.fractal.julia.type.BasicInterfaceType("service","org.objectweb.fractal.bf.connectors.Service",false,false,false),false,intercept);
ic.interfaces.put("service",proxy);
intercept = new org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParamsInterceptorLC1a2eb783();
ic.controllers.add(intercept);
((org.objectweb.fractal.julia.Interceptor)intercept).setFcItfDelegate(content);
proxy = new org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParamsFcItf(proxyForCompCtrl,"weirdService",new org.objectweb.fractal.julia.type.BasicInterfaceType("weirdService","org.objectweb.fractal.bf.connectors.weird.ServiceWithWeirdParams",false,false,false),false,intercept);
ic.interfaces.put("weirdService",proxy);
for( int i=0 ; i < ic.controllers.size() ; i++ ) {
ctrl = ic.controllers.get(i);
if( ctrl instanceof org.objectweb.fractal.julia.Controller ) {
((org.objectweb.fractal.julia.Controller)ctrl).initFcController(ic);
}
}
return proxyForCompCtrl;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy