/** * @see org.objectweb.fractal.julia.control.binding.ContentBindingMixin#bindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object) */ public void bindFc(final org.objectweb.fractal.api.type.InterfaceType clientItfType, final java.lang.String clientItfName, final java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { checkFcLocalBinding(clientItfType, clientItfName, serverItf); bindFc$0(clientItfType, clientItfName, serverItf); }
/** * @see org.objectweb.fractal.julia.control.binding.CheckBindingMixin#bindFc(java.lang.String,java.lang.Object) */ private void bindFc$0(final java.lang.String clientItfName, final java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if ((lookupFc(clientItfName)) != null) { throw new org.objectweb.fractal.julia.control.binding.ChainedIllegalBindingException(null, weaveableOptC, null, clientItfName, null, "Already bound"); } bindFc$1(clientItfName, serverItf); }
/** * @see org.objectweb.fractal.juliac.fraclet.control.binding.FracletBindingControllerMixin#lookupFc(java.lang.String) */ private java.lang.Object lookupFc$1(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException { if (bc) return lookupFc$2(clientItfName); org.objectweb.fractal.api.type.InterfaceType it = juliac.generated.ContainerBindingControllerImpl.getFcInterfaceType(weaveableC, clientItfName); java.lang.String itname = it.getFcItfName(); org.objectweb.fractal.juliac.commons.ipf.InjectionPoint<org.objectweb.fractal.fraclet.annotations.Requires> ip = ipm.get(itname); if (ip == null) { throw new org.objectweb.fractal.api.NoSuchInterfaceException(clientItfName); } java.lang.Object srv = org.objectweb.fractal.juliac.commons.ipf.InjectionPointHelper.get(ip, fcContent); boolean isCollection = it.isFcCollectionItf(); if (isCollection) { java.util.Map<java.lang.String, java.lang.Object> map = ((java.util.Map<java.lang.String, java.lang.Object>) (srv)); java.lang.String key = computeCollectionKeyBindingName(clientItfName, itname); srv = map.get(key); } return srv; }
/** * @see org.objectweb.fractal.juliac.fraclet.control.binding.FracletBindingControllerMixin#bindFc(java.lang.String,java.lang.Object) */ private void bindFc$2(final java.lang.String clientItfName, final java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if (bc) { bindFc$3(clientItfName, serverItf); return; } org.objectweb.fractal.api.type.InterfaceType it = juliac.generated.ContainerBindingControllerImpl.getFcInterfaceType(weaveableC, clientItfName); java.lang.String itname = it.getFcItfName(); org.objectweb.fractal.juliac.commons.ipf.InjectionPoint<org.objectweb.fractal.fraclet.annotations.Requires> ip = ipm.get(itname); if (ip == null) { throw new org.objectweb.fractal.api.NoSuchInterfaceException(clientItfName); } boolean isCollection = it.isFcCollectionItf(); if (isCollection) { java.util.Map<java.lang.String, java.lang.Object> map = ((java.util.Map<java.lang.String, java.lang.Object>) (org.objectweb.fractal.juliac.commons.ipf.InjectionPointHelper.get(ip, fcContent))); java.lang.String key = computeCollectionKeyBindingName(clientItfName, itname); map.put(key, serverItf); }else { org.objectweb.fractal.juliac.commons.ipf.InjectionPointHelper.set(ip, fcContent, serverItf); } }
/** * @see org.objectweb.fractal.juliac.fraclet.control.binding.FracletBindingControllerMixin#unbindFc(java.lang.String) */ private void unbindFc$2(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { if (bc) { unbindFc$3(clientItfName); return; } org.objectweb.fractal.api.type.InterfaceType it = juliac.generated.ContainerBindingControllerImpl.getFcInterfaceType(weaveableC, clientItfName); java.lang.String itname = it.getFcItfName(); org.objectweb.fractal.juliac.commons.ipf.InjectionPoint<org.objectweb.fractal.fraclet.annotations.Requires> ip = ipm.get(itname); if (ip == null) { throw new org.objectweb.fractal.api.NoSuchInterfaceException(clientItfName); } boolean isCollection = it.isFcCollectionItf(); if (isCollection) { java.util.Map<java.lang.String, java.lang.Object> map = ((java.util.Map<java.lang.String, java.lang.Object>) (org.objectweb.fractal.juliac.commons.ipf.InjectionPointHelper.get(ip, fcContent))); java.lang.String key = computeCollectionKeyBindingName(clientItfName, itname); map.remove(key); }else { org.objectweb.fractal.juliac.commons.ipf.InjectionPointHelper.set(ip, fcContent, null); } }
/** * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#unbindFc(java.lang.String) */ public void unbindFc(final java.lang.String clientItfName) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { org.objectweb.fractal.api.type.ComponentType compType = ((org.objectweb.fractal.api.type.ComponentType) (weaveableC.getFcType())); org.objectweb.fractal.api.type.InterfaceType clientItfType; try { clientItfType = compType.getFcInterfaceType(clientItfName); } catch (org.objectweb.fractal.api.NoSuchInterfaceException e) { throw new org.objectweb.fractal.julia.ChainedNoSuchInterfaceException(null, weaveableC, clientItfName); } checkFcClientInterface(clientItfType); unbindFc(clientItfType, clientItfName); }
/** * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#lookupFc(java.lang.String) */ public java.lang.Object lookupFc(final java.lang.String clientItfName) 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 clientItfType; try { clientItfType = compType.getFcInterfaceType(clientItfName); } catch (org.objectweb.fractal.api.NoSuchInterfaceException e) { throw new org.objectweb.fractal.julia.ChainedNoSuchInterfaceException(null, weaveableC, clientItfName); } checkFcClientInterface(clientItfType); return lookupFc(clientItfType, clientItfName); }
throw new org.objectweb.fractal.julia.ChainedNoSuchInterfaceException(null, weaveableC, clientItfName); checkFcClientInterface(cItfType); org.objectweb.fractal.api.control.ContentController cc; try { sItfType = ((org.objectweb.fractal.api.type.InterfaceType) (sItf.getFcItfType())); } catch (java.lang.ClassCastException e) { bindFc(cItfType, clientItfName, serverItf); return; throw new org.objectweb.fractal.julia.control.binding.ChainedIllegalBindingException(null, weaveableC, ((org.objectweb.fractal.api.Interface) (serverItf)).getFcItfOwner(), clientItfName, ((org.objectweb.fractal.api.Interface) (serverItf)).getFcItfName(), "A mandatory interface cannot be bound to an optional interface"); bindFc(cItfType, clientItfName, sItf);
/** * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#bindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object) */ private void bindFc$0(final org.objectweb.fractal.api.type.InterfaceType clientItfType, final java.lang.String clientItfName, final java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { bindFc$0(clientItfName, serverItf); }
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.ContainerBindingControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.SuperControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.LifeCycleControllerImpl()); ic.controllers.add(ctrl = new juliac.generated.NameControllerImpl()); return compctrl; }
/** * @see org.objectweb.fractal.julia.control.binding.InterceptorBindingMixin#bindFc(java.lang.String,java.lang.Object) */ private void bindFc$1(final java.lang.String clientItfName, final java.lang.Object serverItf) throws org.objectweb.fractal.api.NoSuchInterfaceException, org.objectweb.fractal.api.control.IllegalBindingException, org.objectweb.fractal.api.control.IllegalLifeCycleException { java.lang.Object o = weaveableC.getFcInterface(clientItfName); if (o instanceof org.objectweb.fractal.julia.ComponentInterface) { java.lang.Object next = ((org.objectweb.fractal.julia.ComponentInterface) (o)).getFcItfImpl(); if (next instanceof org.objectweb.fractal.julia.Interceptor) { ((org.objectweb.fractal.julia.Interceptor) (next)).setFcItfDelegate(serverItf); o = next; }else { ((org.objectweb.fractal.julia.ComponentInterface) (o)).setFcItfImpl(serverItf); o = serverItf; } }else { o = serverItf; } bindFc$2(clientItfName, o); }