Mail Archive Home | fractal-commits List | Febuary 2007 Index
| <-- Date Index --> | <-- Thread Index --> |
Date: Monday, February 19, 2007 @ 13:18:24
Author: seintur
Path: /cvsroot/fractal/julia/src/org/objectweb/fractal/juliak
Modified: FractalHelper.java factory/BasicGenericFactoryImpl.java
newSymetricInterfaceType() method moved to FractalHelper.
--------------------------------------+
FractalHelper.java | 24 ++++++++++++++++--------
factory/BasicGenericFactoryImpl.java | 19 ++-----------------
2 files changed, 18 insertions(+), 25 deletions(-)
Index: julia/src/org/objectweb/fractal/juliak/FractalHelper.java
diff -u julia/src/org/objectweb/fractal/juliak/FractalHelper.java:1.7
julia/src/org/objectweb/fractal/juliak/FractalHelper.java:1.8
--- julia/src/org/objectweb/fractal/juliak/FractalHelper.java:1.7 Wed
Dec 20 21:29:37 2006
+++ julia/src/org/objectweb/fractal/juliak/FractalHelper.java Mon Feb 19
13:18:24 2007
@@ -42,6 +42,7 @@
import org.objectweb.fractal.api.type.InterfaceType;
import org.objectweb.fractal.api.type.TypeFactory;
import org.objectweb.fractal.julia.control.content.SuperControllerNotifier;
+import org.objectweb.fractal.julia.type.BasicInterfaceType;
import org.objectweb.fractal.juliak.control.content.SuperControllerDef;
@@ -343,14 +344,21 @@
return getTopMostComponent(sups[0]);
}
- public static String toString( InterfaceType it ) {
- String name = it.getFcItfName();
- String signature = it.getFcItfSignature();
- String isClient = it.isFcClientItf() ? "client" : "server";
- String isOptional = it.isFcOptionalItf() ? "optional" : "mandatory";
- String isCollection = it.isFcCollectionItf() ? "collection" :
"singleton";
-
- return
name+"/"+signature+"/"+isClient+"/"+isOptional+"/"+isCollection;
+ /**
+ * Return a copy of the given interface type where the direction of the
+ * interface has been inverted: if the direction of the specified
interface
+ * type is client (resp. server), the direction of the returned interface
+ * type is server (resp. client).
+ */
+ public static InterfaceType newSymetricInterfaceType( InterfaceType it )
{
+ return
+ new BasicInterfaceType(
+ it.getFcItfName(),
+ it.getFcItfSignature(),
+ ! it.isFcClientItf(), // client <-> server
+ it.isFcOptionalItf(),
+ it.isFcCollectionItf()
+ );
}
}
Index:
julia/src/org/objectweb/fractal/juliak/factory/BasicGenericFactoryImpl.java
diff -u
julia/src/org/objectweb/fractal/juliak/factory/BasicGenericFactoryImpl.java:1.3
julia/src/org/objectweb/fractal/juliak/factory/BasicGenericFactoryImpl.java:1.4
---
julia/src/org/objectweb/fractal/juliak/factory/BasicGenericFactoryImpl.java:1.3
Tue Jan 23 17:41:13 2007
+++
julia/src/org/objectweb/fractal/juliak/factory/BasicGenericFactoryImpl.java
Mon Feb 19 13:18:24 2007
@@ -235,7 +235,7 @@
// Control (internal) interface
if( name.equals("factory") ) {
- InterfaceType intit = newSymetricInterfaceType(it);
+ InterfaceType intit =
FractalHelper.newSymetricInterfaceType(it);
Interface internal =
itfgen.generate(intit,proxyForCompctrl,itf,true);
ic.internalInterfaces.put(name,internal);
}
@@ -287,7 +287,7 @@
// Internal interface
if( ! name.equals("attribute-controller") ) {
- InterfaceType intit = newSymetricInterfaceType(its[i]);
+ InterfaceType intit =
FractalHelper.newSymetricInterfaceType(its[i]);
Interface internal =
itfgen.generate(intit,proxyForCompctrl,content,true);
ic.internalInterfaces.put(name,internal);
@@ -473,19 +473,4 @@
return it;
}
- /**
- * Return a copy of the given interface type where the client role is
- * transformed into server and the server role is transformed into
client.
- */
- private static InterfaceType newSymetricInterfaceType( InterfaceType it
) {
- return
- new BasicInterfaceType(
- it.getFcItfName(),
- it.getFcItfSignature(),
- ! it.isFcClientItf(), // client <-> server
- it.isFcOptionalItf(),
- it.isFcCollectionItf()
- );
- }
-
}
| <-- Date Index --> | <-- Thread Index --> |
Powered by MHonArc.
Copyright © 2006-2007, OW2 Consortium | contact | webmaster.