/** * @see org.objectweb.fractal.julia.control.content.SuperContentMixin#addFcSubComponent(org.objectweb.fractal.api.Component) */ public void addFcSubComponent(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { addFcSubComponent$0(subComponent); org.objectweb.fractal.julia.control.content.SuperControllerNotifier scn = getFcSuperControllerNotifier(subComponent); if (scn != null) { try { org.objectweb.fractal.api.Component c = ((org.objectweb.fractal.api.Component) (weaveableC.getFcInterface("component"))); scn.addedToFc(c); } catch (org.objectweb.fractal.api.NoSuchInterfaceException ignored) { } } }
/** * @see org.objectweb.fractal.julia.control.content.BindingContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$1(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { try { checkFcRemoveSubComponent(subComponent); } catch (org.objectweb.fractal.api.control.IllegalBindingException e) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(e, weaveableOptC, subComponent, "Would create non local bindings"); } removeFcSubComponent$2(subComponent); }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$1(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if (!(containsFcSubComponent(subComponent))) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(null, weaveableC, subComponent, "Not a sub component"); } removeFcSubComponent$2(subComponent); }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$2(final Component subComponent) throws IllegalContentException, IllegalLifeCycleException { if (!(containsFcSubComponent(subComponent))) { throw new ChainedIllegalContentException(null , weaveableC , subComponent , "Not a sub component"); } removeFcSubComponent$3(subComponent); }
/** * @see org.objectweb.fractal.julia.control.content.BindingContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$0(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { try { checkFcRemoveSubComponent(subComponent); } catch (org.objectweb.fractal.api.control.IllegalBindingException e) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(e, weaveableOptC, subComponent, "Would create non local bindings"); } removeFcSubComponent$1(subComponent); }
public org.objectweb.fractal.api.Component newFcControllerInstantiation(org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException { Object ctrl = null; ic.controllers.add(ctrl = new juliac.generated.ComponentImpl()); org.objectweb.fractal.api.Component compctrl = (org.objectweb.fractal.api.Component)ctrl; ic.controllers.add(ctrl = new juliac.generated.CompositeBindingControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.ContentControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.SuperControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.CompositeLifeCycleControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.NameControllerImpl()); return compctrl; }
/** * @see org.objectweb.fractal.julia.control.content.SuperContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ public void removeFcSubComponent(final Component subComponent) throws IllegalContentException, IllegalLifeCycleException { removeFcSubComponent$0(subComponent); SuperControllerNotifier scn = getFcSuperControllerNotifier(subComponent); if (scn != null) { try { Component c = ((Component)(weaveableC.getFcInterface("component"))); scn.removedFromFc(c); } catch (NoSuchInterfaceException ignored) { } } }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#addFcSubComponent(org.objectweb.fractal.api.Component) */ private void addFcSubComponent$0(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if (containsFcSubComponent(subComponent)) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(null, weaveableC, subComponent, "Already a sub component"); } org.objectweb.fractal.api.Component thisComponent; try { thisComponent = ((org.objectweb.fractal.api.Component) (weaveableC.getFcInterface("component"))); } catch (org.objectweb.fractal.api.NoSuchInterfaceException e) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(e, weaveableC, subComponent, "Cannot check this operation"); } if (subComponent.equals(thisComponent)) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(null, weaveableC, subComponent, "A component cannot be a sub component of itself"); } java.util.List allSubComponents = org.objectweb.fractal.julia.control.content.Util.getAllSubComponents(subComponent); for (int i = 0; i < (allSubComponents.size()); ++i) { if (allSubComponents.get(i).equals(thisComponent)) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(null, weaveableC, subComponent, "Would create a cycle in the component hierarchy"); } } addFcSubComponent$1(subComponent); }
/** * @see org.objectweb.fractal.julia.control.content.BasicContentControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext) */ public void initFcController(final org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException { fcInternalInterfaces = ic.internalInterfaces; initFcController$0(ic); }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#containsFcSubComponent(org.objectweb.fractal.api.Component) */ public boolean containsFcSubComponent(final Component subComponent) { Component[] subComponents = getFcSubComponents(); for (int i = 0 ; i < (subComponents.length) ; ++i) { if (subComponents[i].equals(subComponent)) { return true; } } return false; }
/** * @see org.objectweb.fractal.julia.control.content.TypeContentMixin#getFcInternalInterface(java.lang.String) */ public java.lang.Object getFcInternalInterface(final java.lang.String interfaceName) throws org.objectweb.fractal.api.NoSuchInterfaceException { org.objectweb.fractal.api.type.ComponentType compType = ((org.objectweb.fractal.api.type.ComponentType) (weaveableC.getFcType())); org.objectweb.fractal.api.type.InterfaceType itfType; try { itfType = compType.getFcInterfaceType(interfaceName); } catch (org.objectweb.fractal.api.NoSuchInterfaceException e) { throw new org.objectweb.fractal.julia.ChainedNoSuchInterfaceException(null, weaveableC, interfaceName); } java.lang.Object result; try { result = getFcInternalInterface$0(interfaceName); } catch (org.objectweb.fractal.api.NoSuchInterfaceException e) { if (itfType.isFcCollectionItf()) { java.lang.String collectionName = "/collection/" + (itfType.getFcItfName()); result = getFcInternalInterface$0(collectionName); result = ((org.objectweb.fractal.julia.ComponentInterface) (result)).clone(); ((org.objectweb.fractal.julia.ComponentInterface) (result)).setFcItfName(interfaceName); fcInternalInterfaces.put(interfaceName, result); }else { throw e; } } return result; }
checkFcLocalBinding(itf, parent, sItf, null); checkFcLocalBinding(((org.objectweb.fractal.api.Interface) (clientItfs.get(0))), null, itf, parent);
public org.objectweb.fractal.api.Component newFcControllerInstantiation(org.objectweb.fractal.julia.InitializationContext ic) throws org.objectweb.fractal.api.factory.InstantiationException { Object ctrl = null; ic.controllers.add(ctrl = new juliac.generated.ComponentImpl()); org.objectweb.fractal.api.Component compctrl = (org.objectweb.fractal.api.Component)ctrl; ic.controllers.add(ctrl = new juliac.generated.CompositeBindingControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.ContentControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.SuperControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.LifeCycleControllerNoFracletImpl()); ic.controllers.add(ctrl = new juliac.generated.NameControllerImpl()); return compctrl; }
/** * @see org.objectweb.fractal.julia.control.content.SuperContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ public void removeFcSubComponent(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { removeFcSubComponent$0(subComponent); org.objectweb.fractal.julia.control.content.SuperControllerNotifier scn = getFcSuperControllerNotifier(subComponent); if (scn != null) { try { org.objectweb.fractal.api.Component c = ((org.objectweb.fractal.api.Component) (weaveableC.getFcInterface("component"))); scn.removedFromFc(c); } catch (org.objectweb.fractal.api.NoSuchInterfaceException ignored) { } } }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#addFcSubComponent(org.objectweb.fractal.api.Component) */ private void addFcSubComponent$0(final Component subComponent) throws IllegalContentException, IllegalLifeCycleException { if (containsFcSubComponent(subComponent)) { throw new ChainedIllegalContentException(null , weaveableC , subComponent , "Already a sub component"); } Component thisComponent; try { thisComponent = ((Component)(weaveableC.getFcInterface("component"))); } catch (NoSuchInterfaceException e) { throw new ChainedIllegalContentException(e , weaveableC , subComponent , "Cannot check this operation"); } if (subComponent.equals(thisComponent)) { throw new ChainedIllegalContentException(null , weaveableC , subComponent , "A component cannot be a sub component of itself"); } List allSubComponents = org.objectweb.fractal.julia.control.content.Util.getAllSubComponents(subComponent); for (int i = 0 ; i < (allSubComponents.size()) ; ++i) { if (allSubComponents.get(i).equals(thisComponent)) { throw new ChainedIllegalContentException(null , weaveableC , subComponent , "Would create a cycle in the component hierarchy"); } } addFcSubComponent$1(subComponent); }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#removeFcSubComponent(org.objectweb.fractal.api.Component) */ private void removeFcSubComponent$2(final org.objectweb.fractal.api.Component subComponent) throws org.objectweb.fractal.api.control.IllegalContentException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if (!(containsFcSubComponent(subComponent))) { throw new org.objectweb.fractal.julia.control.content.ChainedIllegalContentException(null, weaveableC, subComponent, "Not a sub component"); } removeFcSubComponent$3(subComponent); }
/** * @see org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext) */ public void initFcController(final InitializationContext ic) throws InstantiationException { weaveableOptLC = ((LifeCycleController)(ic.getOptionalInterface("lifecycle-controller"))); initFcController$0(ic); }
/** * @see org.objectweb.fractal.julia.control.content.CheckContentMixin#containsFcSubComponent(org.objectweb.fractal.api.Component) */ public boolean containsFcSubComponent(final org.objectweb.fractal.api.Component subComponent) { org.objectweb.fractal.api.Component[] subComponents = getFcSubComponents(); for (int i = 0; i < (subComponents.length); ++i) { if (subComponents[i].equals(subComponent)) { return true; } } return false; }
/** * @see org.objectweb.fractal.julia.control.content.TypeContentMixin#getFcInternalInterface(java.lang.String) */ public Object getFcInternalInterface(final String interfaceName) throws NoSuchInterfaceException { ComponentType compType = ((ComponentType)(weaveableC.getFcType())); InterfaceType itfType; try { itfType = compType.getFcInterfaceType(interfaceName); } catch (NoSuchInterfaceException e) { throw new ChainedNoSuchInterfaceException(null , weaveableC , interfaceName); } Object result; try { result = getFcInternalInterface$0(interfaceName); } catch (NoSuchInterfaceException e) { if (itfType.isFcCollectionItf()) { String collectionName = "/collection/" + (itfType.getFcItfName()); result = getFcInternalInterface$0(collectionName); result = ((ComponentInterface)(result)).clone(); ((ComponentInterface)(result)).setFcItfName(interfaceName); fcInternalInterfaces.put(interfaceName ,result); } else { throw e; } } return result; }
checkFcLocalBinding(itf, parent, sItf, null); checkFcLocalBinding(((org.objectweb.fractal.api.Interface) (clientItfs.get(0))), null, itf, parent);