OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | December 2006 Index

<--  Date Index  --> <--  Thread Index  -->

CVS update of julia/src/org/objectweb/fractal/juliak (3 files)


    Date: Monday, December 18, 2006 @ 21:50:18
  Author: seintur
    Path: /cvsroot/fractal/julia/src/org/objectweb/fractal/juliak

   Added: control/component/ComponentImpl.java
Modified: control/component/ComponentController.fractal
 Removed: ComponentImpl.java

Moving the default implementation of the component controller to 
o.o.f.j.juliak.control.component.


-----------------------------------------------+
 ComponentImpl.java                            |  163 ------------------------
 control/component/ComponentController.fractal |    2 
 control/component/ComponentImpl.java          |  163 ++++++++++++++++++++++++
 3 files changed, 164 insertions(+), 164 deletions(-)


Index: julia/src/org/objectweb/fractal/juliak/ComponentImpl.java
diff -u julia/src/org/objectweb/fractal/juliak/ComponentImpl.java:1.2 
julia/src/org/objectweb/fractal/juliak/ComponentImpl.java:removed
--- julia/src/org/objectweb/fractal/juliak/ComponentImpl.java:1.2       Sat 
Dec 16 20:29:46 2006
+++ julia/src/org/objectweb/fractal/juliak/ComponentImpl.java   Mon Dec 18 
21:50:18 2006
@@ -1,163 +0,0 @@
-/*
- * Generated by SpoonMixinClassProcessor.
- * 
- * Author: Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
- */
-package org.objectweb.fractal.juliak;
-
-import java.util.Map;
-
-import org.objectweb.fractal.api.Component;
-import org.objectweb.fractal.api.NoSuchInterfaceException;
-import org.objectweb.fractal.api.Type;
-import org.objectweb.fractal.api.factory.InstantiationException;
-import org.objectweb.fractal.api.type.ComponentType;
-import org.objectweb.fractal.api.type.InterfaceType;
-import org.objectweb.fractal.julia.ChainedNoSuchInterfaceException;
-import org.objectweb.fractal.julia.ComponentInterface;
-import org.objectweb.fractal.julia.Controller;
-import org.objectweb.fractal.julia.InitializationContext;
-
-/**
- * Default implementation of the {@link Component} control interface.
- * 
- * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
- *  
- * @see org.objectweb.fractal.julia.BasicControllerMixin
- * @see org.objectweb.fractal.julia.BasicComponentMixin
- * @see org.objectweb.fractal.julia.TypeComponentMixin
- * @see 
org.objectweb.fractal.juliak.control.interceptor.CollectionItfComponentMixin
- */
-public class ComponentImpl implements Component , Controller {
-    /** 
-     * @see 
org.objectweb.fractal.juliak.control.interceptor.CollectionItfComponentMixin#getFcInterface(java.lang.String)
-     */
-    public Object getFcInterface(final String interfaceName) throws 
NoSuchInterfaceException {
-        if (interfaceName.startsWith("/juliak/collection/")) {
-            return fcInterfaces.get(interfaceName);
-        } 
-        return getFcInterface$0(interfaceName);
-    }
-    
-    /** 
-     * Does nothing.
-     * 
-     * @param ic information about the component to which this controller 
object
-     *      belongs.
-     * @throws InstantiationException if the initialization fails.
-     * @see 
org.objectweb.fractal.julia.BasicControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
-     */
-    private void initFcController$0(final InitializationContext ic) throws 
InstantiationException {
-    }
-    
-    /** 
-     * The type of this component.
-     * @see org.objectweb.fractal.julia.BasicComponentMixin#fcType
-     */
-    public Type fcType;
-    
-    /** 
-     * The interfaces of this component. This map associates each interface 
to its
-     * name.
-     * @see org.objectweb.fractal.julia.BasicComponentMixin#fcInterfaces
-     */
-    public Map fcInterfaces;
-    
-    /** 
-     * Checks the interface name against the component's type and then calls 
the
-     * overriden method. This method also creates the collection interfaces
-     * when needed, and puts them in the {@link #_this_fcInterfaces} map.
-     * 
-     * @param interfaceName the name of the external interface that must be
-     *      returned.
-     * @return the external interface of the component to which this 
interface
-     *      belongs, whose name is equal to the given name.
-     * @throws NoSuchInterfaceException if there is no such interface.
-     * @see 
org.objectweb.fractal.julia.TypeComponentMixin#getFcInterface(java.lang.String)
-     */
-    private Object getFcInterface$0(final String interfaceName) throws 
NoSuchInterfaceException {
-        if ((interfaceName.indexOf('/')) == 0) {
-            return getFcInterface$1(interfaceName);
-        } 
-        ComponentType compType = ((ComponentType)(getFcType()));
-        InterfaceType itfType;
-        try {
-            itfType = compType.getFcInterfaceType(interfaceName);
-        } catch (NoSuchInterfaceException e) {
-            throw new ChainedNoSuchInterfaceException(null , this , 
interfaceName);
-        }
-        Object result;
-        try {
-            result = getFcInterface$1(interfaceName);
-        } catch (NoSuchInterfaceException e) {
-            if (itfType.isFcCollectionItf()) {
-                result = getFcInterface$1(("/collection/" + 
(itfType.getFcItfName())));
-                result = ((ComponentInterface)(result)).clone();
-                ((ComponentInterface)(result)).setFcItfName(interfaceName);
-                fcInterfaces.put(interfaceName ,result);
-            } else {
-                throw e;
-            }
-        }
-        return result;
-    }
-    
-    /** 
-     * Initializes the fields of this mixin from the given context, and then 
calls
-     * the overriden method.
-     * 
-     * @param ic information about the component to which this controller 
object
-     *      belongs.
-     * @throws InstantiationException if the initialization fails.
-     * @see 
org.objectweb.fractal.julia.BasicComponentMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
-     */
-    public void initFcController(final InitializationContext ic) throws 
InstantiationException {
-        this.fcType = ic.type;
-        this.fcInterfaces = ic.interfaces;
-        initFcController$0(ic);
-    }
-    
-    /** 
-     * @see org.objectweb.fractal.julia.BasicComponentMixin#getFcType()
-     */
-    public Type getFcType() {
-        return fcType;
-    }
-    
-    /** 
-     * @see org.objectweb.fractal.julia.BasicComponentMixin#getFcInterfaces()
-     */
-    public Object[] getFcInterfaces() {
-        if ((fcInterfaces) == null) {
-            return new Object[0];
-        } 
-        int size = 0;
-        String[] names = new String[fcInterfaces.size()];
-        names = ((String[])(fcInterfaces.keySet().toArray(names)));
-        for (int i = 0 ; i < (names.length) ; ++i) {
-            if ((names[i].charAt(0)) != '/') {
-                ++size;
-            } 
-        }
-        int index = 0;
-        Object[] itfs = new Object[size];
-        for (int i = 0 ; i < (names.length) ; ++i) {
-            if ((names[i].charAt(0)) != '/') {
-                itfs[index++] = fcInterfaces.get(names[i]);
-            } 
-        }
-        return itfs;
-    }
-    
-    /** 
-     * @see 
org.objectweb.fractal.julia.BasicComponentMixin#getFcInterface(java.lang.String)
-     */
-    private Object getFcInterface$1(final String interfaceName) throws 
NoSuchInterfaceException {
-        Object itf = (fcInterfaces) == null ? null : 
fcInterfaces.get(interfaceName);
-        if (itf == null) {
-            throw new ChainedNoSuchInterfaceException(null , this , 
interfaceName);
-        } 
-        return itf;
-    }
-    
-}
\ No newline at end of file
Index: 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal
diff -u 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal:1.2
 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal:1.3
--- 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal:1.2
    Fri Nov 10 21:06:37 2006
+++ 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentController.fractal
        Mon Dec 18 21:50:17 2006
@@ -28,7 +28,7 @@
        
name="org.objectweb.fractal.juliak.control.component.ComponentController"
        
extends="org.objectweb.fractal.juliak.control.component.ComponentControllerType"
 >
        
-       <content class="org.objectweb.fractal.juliak.ComponentImpl" />
+       <content 
class="org.objectweb.fractal.juliak.control.component.ComponentImpl" />
        
        <controller desc="mPrimitive" />
 </definition>
Index: 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentImpl.java
diff -u /dev/null 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentImpl.java:1.1
--- /dev/null   Mon Dec 18 21:50:18 2006
+++ 
julia/src/org/objectweb/fractal/juliak/control/component/ComponentImpl.java 
Mon Dec 18 21:50:17 2006
@@ -0,0 +1,163 @@
+/*
+ * Generated by SpoonMixinClassProcessor.
+ * 
+ * Author: Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ */
+package org.objectweb.fractal.juliak.control.component;
+
+import java.util.Map;
+
+import org.objectweb.fractal.api.Component;
+import org.objectweb.fractal.api.NoSuchInterfaceException;
+import org.objectweb.fractal.api.Type;
+import org.objectweb.fractal.api.factory.InstantiationException;
+import org.objectweb.fractal.api.type.ComponentType;
+import org.objectweb.fractal.api.type.InterfaceType;
+import org.objectweb.fractal.julia.ChainedNoSuchInterfaceException;
+import org.objectweb.fractal.julia.ComponentInterface;
+import org.objectweb.fractal.julia.Controller;
+import org.objectweb.fractal.julia.InitializationContext;
+
+/**
+ * Default implementation of the {@link Component} control interface.
+ * 
+ * @author Lionel Seinturier <Lionel.Seinturier@xxxxxxx>
+ *  
+ * @see org.objectweb.fractal.julia.BasicControllerMixin
+ * @see org.objectweb.fractal.julia.BasicComponentMixin
+ * @see org.objectweb.fractal.julia.TypeComponentMixin
+ * @see 
org.objectweb.fractal.juliak.control.interceptor.CollectionItfComponentMixin
+ */
+public class ComponentImpl implements Component , Controller {
+    /** 
+     * @see 
org.objectweb.fractal.juliak.control.interceptor.CollectionItfComponentMixin#getFcInterface(java.lang.String)
+     */
+    public Object getFcInterface(final String interfaceName) throws 
NoSuchInterfaceException {
+        if (interfaceName.startsWith("/juliak/collection/")) {
+            return fcInterfaces.get(interfaceName);
+        } 
+        return getFcInterface$0(interfaceName);
+    }
+    
+    /** 
+     * Does nothing.
+     * 
+     * @param ic information about the component to which this controller 
object
+     *      belongs.
+     * @throws InstantiationException if the initialization fails.
+     * @see 
org.objectweb.fractal.julia.BasicControllerMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
+     */
+    private void initFcController$0(final InitializationContext ic) throws 
InstantiationException {
+    }
+    
+    /** 
+     * The type of this component.
+     * @see org.objectweb.fractal.julia.BasicComponentMixin#fcType
+     */
+    public Type fcType;
+    
+    /** 
+     * The interfaces of this component. This map associates each interface 
to its
+     * name.
+     * @see org.objectweb.fractal.julia.BasicComponentMixin#fcInterfaces
+     */
+    public Map fcInterfaces;
+    
+    /** 
+     * Checks the interface name against the component's type and then calls 
the
+     * overriden method. This method also creates the collection interfaces
+     * when needed, and puts them in the {@link #_this_fcInterfaces} map.
+     * 
+     * @param interfaceName the name of the external interface that must be
+     *      returned.
+     * @return the external interface of the component to which this 
interface
+     *      belongs, whose name is equal to the given name.
+     * @throws NoSuchInterfaceException if there is no such interface.
+     * @see 
org.objectweb.fractal.julia.TypeComponentMixin#getFcInterface(java.lang.String)
+     */
+    private Object getFcInterface$0(final String interfaceName) throws 
NoSuchInterfaceException {
+        if ((interfaceName.indexOf('/')) == 0) {
+            return getFcInterface$1(interfaceName);
+        } 
+        ComponentType compType = ((ComponentType)(getFcType()));
+        InterfaceType itfType;
+        try {
+            itfType = compType.getFcInterfaceType(interfaceName);
+        } catch (NoSuchInterfaceException e) {
+            throw new ChainedNoSuchInterfaceException(null , this , 
interfaceName);
+        }
+        Object result;
+        try {
+            result = getFcInterface$1(interfaceName);
+        } catch (NoSuchInterfaceException e) {
+            if (itfType.isFcCollectionItf()) {
+                result = getFcInterface$1(("/collection/" + 
(itfType.getFcItfName())));
+                result = ((ComponentInterface)(result)).clone();
+                ((ComponentInterface)(result)).setFcItfName(interfaceName);
+                fcInterfaces.put(interfaceName ,result);
+            } else {
+                throw e;
+            }
+        }
+        return result;
+    }
+    
+    /** 
+     * Initializes the fields of this mixin from the given context, and then 
calls
+     * the overriden method.
+     * 
+     * @param ic information about the component to which this controller 
object
+     *      belongs.
+     * @throws InstantiationException if the initialization fails.
+     * @see 
org.objectweb.fractal.julia.BasicComponentMixin#initFcController(org.objectweb.fractal.julia.InitializationContext)
+     */
+    public void initFcController(final InitializationContext ic) throws 
InstantiationException {
+        this.fcType = ic.type;
+        this.fcInterfaces = ic.interfaces;
+        initFcController$0(ic);
+    }
+    
+    /** 
+     * @see org.objectweb.fractal.julia.BasicComponentMixin#getFcType()
+     */
+    public Type getFcType() {
+        return fcType;
+    }
+    
+    /** 
+     * @see org.objectweb.fractal.julia.BasicComponentMixin#getFcInterfaces()
+     */
+    public Object[] getFcInterfaces() {
+        if ((fcInterfaces) == null) {
+            return new Object[0];
+        } 
+        int size = 0;
+        String[] names = new String[fcInterfaces.size()];
+        names = ((String[])(fcInterfaces.keySet().toArray(names)));
+        for (int i = 0 ; i < (names.length) ; ++i) {
+            if ((names[i].charAt(0)) != '/') {
+                ++size;
+            } 
+        }
+        int index = 0;
+        Object[] itfs = new Object[size];
+        for (int i = 0 ; i < (names.length) ; ++i) {
+            if ((names[i].charAt(0)) != '/') {
+                itfs[index++] = fcInterfaces.get(names[i]);
+            } 
+        }
+        return itfs;
+    }
+    
+    /** 
+     * @see 
org.objectweb.fractal.julia.BasicComponentMixin#getFcInterface(java.lang.String)
+     */
+    private Object getFcInterface$1(final String interfaceName) throws 
NoSuchInterfaceException {
+        Object itf = (fcInterfaces) == null ? null : 
fcInterfaces.get(interfaceName);
+        if (itf == null) {
+            throw new ChainedNoSuchInterfaceException(null , this , 
interfaceName);
+        } 
+        return itf;
+    }
+    
+}
\ No newline at end of file



<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 2006-2007, OW2 Consortium | contact | webmaster.