All Downloads are FREE. Search and download functionalities are using the official Maven repository.

juliac.generated.CompositeBindingControllerImpl Maven / Gradle / Ivy

The newest version!
package juliac.generated;

import java.util.ArrayList;
import org.objectweb.fractal.api.control.BindingController;
import org.objectweb.fractal.julia.control.binding.ChainedIllegalBindingException;
import org.objectweb.fractal.julia.control.lifecycle.ChainedIllegalLifeCycleException;
import org.objectweb.fractal.julia.ChainedNoSuchInterfaceException;
import org.objectweb.fractal.api.Component;
import org.objectweb.fractal.julia.ComponentInterface;
import org.objectweb.fractal.api.type.ComponentType;
import org.objectweb.fractal.api.control.ContentController;
import org.objectweb.fractal.julia.Controller;
import org.objectweb.fractal.julia.loader.Generated;
import java.util.HashMap;
import java.util.HashSet;
import org.objectweb.fractal.api.control.IllegalBindingException;
import org.objectweb.fractal.api.control.IllegalLifeCycleException;
import org.objectweb.fractal.julia.InitializationContext;
import org.objectweb.fractal.api.factory.InstantiationException;
import org.objectweb.fractal.julia.Interceptor;
import org.objectweb.fractal.api.Interface;
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.api.control.LifeCycleController;
import java.util.List;
import java.util.Map;
import org.objectweb.fractal.api.NoSuchInterfaceException;
import java.util.Set;
import org.objectweb.fractal.api.control.SuperController;
import org.objectweb.fractal.api.Type;

/** 
 * @see org.objectweb.fractal.julia.BasicControllerMixin
 * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin
 * @see org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin
 * @see org.objectweb.fractal.julia.UseComponentMixin
 * @see org.objectweb.fractal.julia.control.binding.CheckBindingMixin
 * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin
 * @see org.objectweb.fractal.julia.control.content.UseSuperControllerMixin
 * @see org.objectweb.fractal.julia.control.binding.ContentBindingMixin
 * @see org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin
 * @see org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin
 * @see org.objectweb.fractal.julia.control.content.UseContentControllerMixin
 * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin
 */
public class CompositeBindingControllerImpl implements BindingController , Controller , Generated {
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    private void initFcController$3(final InitializationContext ic) throws InstantiationException {
        ComponentType compType = ((ComponentType)(ic.type));
        InterfaceType[] itfTypes = compType.getFcInterfaceTypes();
        boolean isComposite = (ic.getOptionalInterface("content-controller")) != null;
        for (int j = 0 ; j < (itfTypes.length) ; j++) {
            InterfaceType itfType = itfTypes[j];
            if ((((!(itfType.isFcCollectionItf())) && (!(itfType.getFcItfName().equals("component")))) && (!(itfType.getFcItfName().endsWith("-controller")))) && ((itfType.isFcClientItf()) || isComposite)) {
                if ((fcBindings) == null) {
                    fcBindings = new HashMap();
                } 
                fcBindings.put(itfType.getFcItfName() ,fcBindings);
            } 
        }
        initFcController$4(ic);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.UseComponentMixin#weaveableC
     */
    public Component weaveableC;
    
    /** 
     * @see org.objectweb.fractal.julia.BasicControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    private void initFcController$4(final InitializationContext ic) throws InstantiationException {
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.content.UseSuperControllerMixin#weaveableSC
     */
    public SuperController weaveableSC;
    
    /** 
     * @see org.objectweb.fractal.julia.control.content.UseContentControllerMixin#weaveableCC
     */
    public ContentController weaveableCC;
    
    /** 
     * @see org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin#weaveableOptLC
     */
    public LifeCycleController weaveableOptLC;
    
    /** 
     * @see org.objectweb.fractal.julia.UseComponentMixin#weaveableOptC
     */
    public Component weaveableOptC;
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin#fcBindings
     */
    public Map fcBindings;
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.CheckBindingMixin#bindFc(java.lang.String,java.lang.Object)
     */
    private void bindFc$0(final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        if ((lookupFc(clientItfName)) != null) {
            throw new ChainedIllegalBindingException(null , weaveableOptC , null , clientItfName , null , "Already bound");
        } 
        bindFc$1(clientItfName ,serverItf);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.content.UseSuperControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    private void initFcController$1(final InitializationContext ic) throws InstantiationException {
        weaveableSC = ((SuperController)(ic.getInterface("super-controller")));
        initFcController$2(ic);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin#listFc()
     */
    public String[] listFc() {
        if ((fcBindings) == null) {
            return new String[0];
        } 
        return ((String[])(fcBindings.keySet().toArray(new String[fcBindings.size()])));
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    private void initFcController$0(final InitializationContext ic) throws InstantiationException {
        weaveableOptLC = ((LifeCycleController)(ic.getOptionalInterface("lifecycle-controller")));
        initFcController$1(ic);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.content.UseContentControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    public void initFcController(final InitializationContext ic) throws InstantiationException {
        weaveableCC = ((ContentController)(ic.getInterface("content-controller")));
        initFcController$0(ic);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin#unbindFc(java.lang.String)
     */
    public void unbindFc(final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        if ((weaveableOptLC) != null) {
            String state = weaveableOptLC.getFcState();
            if (!(LifeCycleController.STOPPED.equals(state))) {
                throw new ChainedIllegalLifeCycleException(null , weaveableOptC , "The component is not stopped");
            } 
        } 
        unbindFc$0(clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.UseComponentMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
     */
    private void initFcController$2(final InitializationContext ic) throws InstantiationException {
        weaveableC = ((Component)(ic.getInterface("component")));
        weaveableOptC = weaveableC;
        initFcController$3(ic);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin#lookupFc(java.lang.String)
     */
    private Object lookupFc$0(final String clientItfName) throws NoSuchInterfaceException {
        if ((fcBindings) == null) {
            return null;
        } 
        Object serverItf = fcBindings.get(clientItfName);
        return serverItf == (fcBindings) ? null : serverItf;
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#lookupFc(java.lang.String)
     */
    public Object lookupFc(final String clientItfName) throws NoSuchInterfaceException {
        ComponentType compType = ((ComponentType)(weaveableC.getFcType()));
        InterfaceType clientItfType;
        try {
            clientItfType = compType.getFcInterfaceType(clientItfName);
        } catch (NoSuchInterfaceException e) {
            throw new ChainedNoSuchInterfaceException(null , weaveableC , clientItfName);
        }
        checkFcClientInterface(clientItfType);
        return lookupFc(clientItfType ,clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.ContentBindingMixin#bindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object)
     */
    private void bindFc$0(final InterfaceType clientItfType, final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        checkFcLocalBinding(clientItfType ,clientItfName ,serverItf);
        bindFc$1(clientItfType ,clientItfName ,serverItf);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin#bindFc(java.lang.String,java.lang.Object)
     */
    private void bindFc$1(final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        if ((fcBindings) == null) {
            fcBindings = new HashMap();
        } 
        fcBindings.put(clientItfName ,serverItf);
    }
    
    private void initFcController$5(InitializationContext ic) throws InstantiationException {
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin#bindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object)
     */
    public void bindFc(final InterfaceType clientItfType, final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        bindFc$0(clientItfType ,clientItfName ,serverItf);
        setFcShortcuts(clientItfType ,clientItfName ,serverItf);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin#unbindFc(java.lang.String)
     */
    private void unbindFc$2(final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        if ((fcBindings) != null) {
            fcBindings.put(clientItfName ,fcBindings);
        } 
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.CheckBindingMixin#unbindFc(java.lang.String)
     */
    private void unbindFc$1(final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        if ((lookupFc(clientItfName)) == null) {
            throw new ChainedIllegalBindingException(null , weaveableOptC , null , clientItfName , null , "Not bound");
        } 
        unbindFc$2(clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.ContentBindingMixin#checkFcLocalBinding(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object)
     */
    public void checkFcLocalBinding(final InterfaceType clientItfType, final String clientItfName, final Object serverItf) throws IllegalBindingException {
        Interface sItf;
        Component sComp;
        try {
            sItf = ((Interface)(serverItf));
            sComp = sItf.getFcItfOwner();
        } catch (ClassCastException e) {
            return ;
        }
        Component[] cParents = weaveableSC.getFcSuperComponents();
        String msg;
        if (!(clientItfType.isFcClientItf())) {
            ContentController cc;
            try {
                cc = ((ContentController)(weaveableC.getFcInterface("content-controller")));
            } catch (NoSuchInterfaceException e) {
                return ;
            }
            Component[] cSubComps = cc.getFcSubComponents();
            for (int i = 0 ; i < (cSubComps.length) ; ++i) {
                if (cSubComps[i].equals(sComp)) {
                    return ;
                } 
            }
            Component thisComp;
            try {
                thisComp = ((Component)(weaveableC.getFcInterface("component")));
            } catch (NoSuchInterfaceException e) {
                throw new ChainedIllegalBindingException(e , weaveableC , sItf.getFcItfOwner() , clientItfName , sItf.getFcItfName() , "Cannot get the Component interface of the client component");
            }
            if ((sComp.equals(thisComp)) && (sItf.isFcInternalItf())) {
                return ;
            } 
            msg = "Invalid export binding";
        } else if (sItf.isFcInternalItf()) {
            for (int i = 0 ; i < (cParents.length) ; ++i) {
                if (sComp.equals(cParents[i])) {
                    return ;
                } 
            }
            msg = "Invalid import binding";
        } else {
            SuperController sCompSC;
            try {
                sCompSC = ((SuperController)(sComp.getFcInterface("super-controller")));
            } catch (NoSuchInterfaceException e) {
                return ;
            }
            Component[] sParents = sCompSC.getFcSuperComponents();
            for (int i = 0 ; i < (cParents.length) ; ++i) {
                for (int j = 0 ; j < (sParents.length) ; ++j) {
                    if (cParents[i].equals(sParents[j])) {
                        return ;
                    } 
                }
            }
            msg = "Not a local binding";
        }
        throw new ChainedIllegalBindingException(null , weaveableC , sItf.getFcItfOwner() , clientItfName , sItf.getFcItfName() , msg);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#bindFc(java.lang.String,java.lang.Object)
     */
    public void bindFc(final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        ComponentType compType = ((ComponentType)(weaveableC.getFcType()));
        InterfaceType cItfType;
        try {
            cItfType = compType.getFcInterfaceType(clientItfName);
        } catch (NoSuchInterfaceException e) {
            throw new ChainedNoSuchInterfaceException(null , weaveableC , clientItfName);
        }
        checkFcClientInterface(cItfType);
        ContentController cc;
        try {
            cc = ((ContentController)(weaveableC.getFcInterface("content-controller")));
        } catch (NoSuchInterfaceException e) {
            cc = null;
        }
        if (cItfType.isFcClientItf()) {
            weaveableC.getFcInterface(clientItfName);
        } else {
            cc.getFcInternalInterface(clientItfName);
        }
        Interface sItf;
        InterfaceType sItfType;
        try {
            sItf = ((Interface)(serverItf));
            sItfType = ((InterfaceType)(sItf.getFcItfType()));
        } catch (ClassCastException e) {
            bindFc(cItfType ,clientItfName ,serverItf);
            return ;
        }
        if (sItfType.isFcClientItf()) {
            throw new ChainedIllegalBindingException(null , weaveableC , sItf.getFcItfOwner() , clientItfName , sItf.getFcItfName() , "Cannot bind two client interfaces together");
        } 
        try {
            Class s = Class.forName(sItfType.getFcItfSignature());
            Class c = Class.forName(cItfType.getFcItfSignature());
            if (!(c.isAssignableFrom(s))) {
                throw new ChainedIllegalBindingException(null , weaveableC , sItf.getFcItfOwner() , clientItfName , sItf.getFcItfName() , "The server interface type is not a subtype of the client interface type");
            } 
        } catch (ClassNotFoundException ignored) {
        }
        if ((!(cItfType.isFcOptionalItf())) && (sItfType.isFcOptionalItf())) {
            throw new ChainedIllegalBindingException(null , weaveableC , ((Interface)(serverItf)).getFcItfOwner() , clientItfName , ((Interface)(serverItf)).getFcItfName() , "A mandatory interface cannot be bound to an optional interface");
        } 
        bindFc(cItfType ,clientItfName ,sItf);
    }
    
    private void unbindFc$3(String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin#unbindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String)
     */
    public void unbindFc(final InterfaceType clientItfType, final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        unbindFc$0(clientItfType ,clientItfName);
        setFcShortcuts(clientItfType ,clientItfName ,null);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin#setFcShortcuts(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object)
     */
    public void setFcShortcuts(final InterfaceType clientItfType, final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException {
        Interface clientItf;
        if (clientItfType.isFcClientItf()) {
            clientItf = ((Interface)(weaveableC.getFcInterface(clientItfName)));
        } else {
            clientItf = ((Interface)(weaveableCC.getFcInternalInterface(clientItfName)));
        }
        Set visited = new HashSet();
        List shortcutItfs = new ArrayList();
        List shortcutImpls = new ArrayList();
        Object itf = serverItf;
        while (true) {
            ComponentInterface citf;
            if (itf instanceof ComponentInterface) {
                citf = ((ComponentInterface)(itf));
            } else {
                break;
            }
            if ((citf.getFcItfImpl()) instanceof Interceptor) {
                break;
            } 
            try {
                Component owner = citf.getFcItfOwner();
                owner.getFcInterface("content-controller");
                BindingController bc = ((BindingController)(owner.getFcInterface("binding-controller")));
                itf = bc.lookupFc(citf.getFcItfName());
            } catch (NoSuchInterfaceException e) {
                break;
            }
        }
        Object impl;
        if (itf == null) {
            impl = null;
        } else {
            if (itf instanceof ComponentInterface) {
                impl = ((ComponentInterface)(itf)).getFcItfImpl();
            } else {
                impl = itf;
            }
        }
        try {
            setFcClientShortcuts(clientItf ,impl ,visited ,shortcutItfs ,shortcutImpls);
        } catch (Exception e) {
            Interface sItf;
            sItf = serverItf instanceof Interface ? ((Interface)(serverItf)) : null;
            throw new ChainedIllegalBindingException(e , clientItf.getFcItfOwner() , (sItf == null ? null : sItf.getFcItfOwner()) , clientItf.getFcItfName() , (sItf == null ? null : sItf.getFcItfName()) , "Cannot create shortcut links");
        }
        for (int i = 0 ; i < (shortcutItfs.size()) ; ++i) {
            Interface shortcutItf = ((Interface)(shortcutItfs.get(i)));
            Object shortcutImpl = shortcutImpls.get(i);
            Component c = shortcutItf.getFcItfOwner();
            ContentController cc;
            try {
                cc = ((ContentController)(c.getFcInterface("content-controller")));
            } catch (NoSuchInterfaceException e) {
                cc = null;
            }
            if (cc != null) {
                ComponentInterface cShortcutItf = ((ComponentInterface)(shortcutItf));
                if (cShortcutItf.hasFcInterceptor()) {
                    Object newImpl = cShortcutItf.getFcItfImpl();
                    ((Interceptor)(newImpl)).setFcItfDelegate(shortcutImpl);
                } else {
                    cShortcutItf.setFcItfImpl(shortcutImpl);
                }
            } else {
                BindingController bc;
                try {
                    bc = ((BindingController)(c.getFcInterface("binding-controller")));
                } catch (NoSuchInterfaceException e) {
                    continue;
                }
                try {
                    String itfName = shortcutItf.getFcItfName();
                    Object o = bc.lookupFc(itfName);
                    if (o != null) {
                        bc.unbindFc(itfName);
                        bc.bindFc(itfName ,o);
                    } 
                } catch (Exception e) {
                    Interface sItf;
                    sItf = serverItf instanceof Interface ? ((Interface)(serverItf)) : null;
                    throw new ChainedIllegalBindingException(e , clientItf.getFcItfOwner() , (sItf == null ? null : sItf.getFcItfOwner()) , clientItf.getFcItfName() , (sItf == null ? null : sItf.getFcItfName()) , "Cannot create shortcut links");
                }
            }
        }
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#unbindFc(java.lang.String)
     */
    private void unbindFc$0(final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        ComponentType compType = ((ComponentType)(weaveableC.getFcType()));
        InterfaceType clientItfType;
        try {
            clientItfType = compType.getFcInterfaceType(clientItfName);
        } catch (NoSuchInterfaceException e) {
            throw new ChainedNoSuchInterfaceException(null , weaveableC , clientItfName);
        }
        checkFcClientInterface(clientItfType);
        unbindFc(clientItfType ,clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#lookupFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String)
     */
    public Object lookupFc(final InterfaceType clientItfType, final String clientItfName) throws NoSuchInterfaceException {
        return lookupFc$0(clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#bindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String,java.lang.Object)
     */
    private void bindFc$1(final InterfaceType clientItfType, final String clientItfName, final Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        bindFc$0(clientItfName ,serverItf);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin#setFcClientShortcuts(org.objectweb.fractal.api.Interface,java.lang.Object,java.util.Set,java.util.List,java.util.List)
     */
    public void setFcClientShortcuts(final Interface clientItf, final Object impl, final Set visited, final List shortcutItfs, final List shortcutImpls) throws Exception {
        Component clientComp = clientItf.getFcItfOwner();
        ContentController cc;
        try {
            cc = ((ContentController)(clientComp.getFcInterface("content-controller")));
        } catch (NoSuchInterfaceException e) {
            cc = null;
        }
        if (cc != null) {
            ComponentInterface itf;
            try {
                String name = clientItf.getFcItfName();
                if (clientItf.isFcInternalItf()) {
                    itf = ((ComponentInterface)(clientComp.getFcInterface(name)));
                } else {
                    itf = ((ComponentInterface)(cc.getFcInternalInterface(name)));
                }
            } catch (NoSuchInterfaceException e) {
                throw new Exception("Cannot create shortcut links" , e);
            } catch (ClassCastException e) {
                itf = null;
            }
            if ((itf != null) && (!(visited.contains(itf)))) {
                visited.add(itf);
                shortcutItfs.add(itf);
                shortcutImpls.add(impl);
                if (itf.hasFcInterceptor()) {
                    Object newImpl = itf.getFcItfImpl();
                    setFcServerShortcuts(itf ,newImpl ,visited ,shortcutItfs ,shortcutImpls);
                } else {
                    setFcServerShortcuts(itf ,impl ,visited ,shortcutItfs ,shortcutImpls);
                }
            } 
        } else if (!(visited.contains(clientItf))) {
            visited.add(clientItf);
            shortcutItfs.add(clientItf);
            shortcutImpls.add(impl);
        } 
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#unbindFc(org.objectweb.fractal.api.type.InterfaceType,java.lang.String)
     */
    private void unbindFc$0(final InterfaceType clientItfType, final String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
        unbindFc$1(clientItfName);
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.TypeBindingMixin#checkFcClientInterface(org.objectweb.fractal.api.type.InterfaceType)
     */
    private void checkFcClientInterface(InterfaceType itfType) throws NoSuchInterfaceException {
        try {
            weaveableC.getFcInterface("content-controller");
            String name = itfType.getFcItfName();
            if ((!(name.equals("component"))) && (!(name.endsWith("-controller")))) {
                return ;
            } 
        } catch (NoSuchInterfaceException e) {
            if (itfType.isFcClientItf()) {
                return ;
            } 
        }
        throw new ChainedNoSuchInterfaceException(null , weaveableC , itfType.getFcItfName());
    }
    
    /** 
     * @see org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin#setFcServerShortcuts(org.objectweb.fractal.api.Interface,java.lang.Object,java.util.Set,java.util.List,java.util.List)
     */
    public void setFcServerShortcuts(final Interface serverItf, final Object impl, final Set visited, final List shortcutItfs, final List shortcutImpls) throws Exception {
        Object[] comps = org.objectweb.fractal.julia.control.binding.Util.getFcPotentialClientsOf(serverItf).toArray();
        for (int i = 0 ; i < (comps.length) ; ++i) {
            Component comp = ((Component)(comps[i]));
            List clientItfs = org.objectweb.fractal.julia.control.binding.Util.getFcClientItfsBoundTo(comp ,serverItf);
            for (int j = 0 ; j < (clientItfs.size()) ; ++j) {
                setFcClientShortcuts(((Interface)(clientItfs.get(j))) ,impl ,visited ,shortcutItfs ,shortcutImpls);
            }
        }
    }
    
    private Object lookupFc$1(String clientItfName) throws NoSuchInterfaceException {
        return null;
    }
    
    private void bindFc$2(String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
    }
    
    private void bindFc$2(InterfaceType clientItfType, String clientItfName, Object serverItf) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
    }
    
    private void unbindFc$1(InterfaceType clientItfType, String clientItfName) throws NoSuchInterfaceException, IllegalBindingException, IllegalLifeCycleException {
    }
    
    public String getFcGeneratorParameters() {
        return "(org.objectweb.fractal.juliac.spoon.MixinClassGenerator juliac.generated.CompositeBindingControllerImpl org.objectweb.fractal.julia.BasicControllerMixin org.objectweb.fractal.julia.control.binding.BasicBindingControllerMixin org.objectweb.fractal.julia.control.binding.TypeBasicBindingMixin org.objectweb.fractal.julia.UseComponentMixin org.objectweb.fractal.julia.control.binding.CheckBindingMixin org.objectweb.fractal.julia.control.binding.TypeBindingMixin org.objectweb.fractal.julia.control.content.UseSuperControllerMixin org.objectweb.fractal.julia.control.binding.ContentBindingMixin org.objectweb.fractal.julia.control.lifecycle.UseLifeCycleControllerMixin org.objectweb.fractal.julia.control.binding.LifeCycleBindingMixin org.objectweb.fractal.julia.control.content.UseContentControllerMixin org.objectweb.fractal.julia.control.binding.OptimizedCompositeBindingMixin)";
    }
    
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy