OW2 Consortium
Search OW2 Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | fractal-commits List | Febuary 2007 Index

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

CVS update of julia (3 files)


    Date: Monday, February 19, 2007 @ 13:18:46
  Author: seintur
    Path: /cvsroot/fractal/julia

Modified: examples/juliak/src/membrane/introspect/Main.java
          src/org/objectweb/fractal/julia/type/BasicComponentType.java
          src/org/objectweb/fractal/julia/type/BasicInterfaceType.java

String representation for interface and component types.


--------------------------------------------------------------+
 examples/juliak/src/membrane/introspect/Main.java            |    2 
 src/org/objectweb/fractal/julia/type/BasicComponentType.java |   21 
++++++++++
 src/org/objectweb/fractal/julia/type/BasicInterfaceType.java |   10 ++++
 3 files changed, 32 insertions(+), 1 deletion(-)


Index: julia/examples/juliak/src/membrane/introspect/Main.java
diff -u julia/examples/juliak/src/membrane/introspect/Main.java:1.1 
julia/examples/juliak/src/membrane/introspect/Main.java:1.2
--- julia/examples/juliak/src/membrane/introspect/Main.java:1.1 Wed Jan 17 
15:09:15 2007
+++ julia/examples/juliak/src/membrane/introspect/Main.java     Mon Feb 19 
13:18:46 2007
@@ -86,7 +86,7 @@
         for (int i = 0; i < itfs.length; i++) {
             Interface itf = (Interface) itfs[i];
             InterfaceType it = (InterfaceType) itf.getFcItfType();
-            System.err.println("  "+i+": "+FractalHelper.toString(it));
+            System.err.println("  "+i+": "+it.toString());
         }
         System.err.println();
         
Index: julia/src/org/objectweb/fractal/julia/type/BasicComponentType.java
diff -u 
julia/src/org/objectweb/fractal/julia/type/BasicComponentType.java:1.2 
julia/src/org/objectweb/fractal/julia/type/BasicComponentType.java:1.3
--- julia/src/org/objectweb/fractal/julia/type/BasicComponentType.java:1.2    
  Tue Apr 27 15:07:18 2004
+++ julia/src/org/objectweb/fractal/julia/type/BasicComponentType.java  Mon 
Feb 19 13:18:46 2007
@@ -166,4 +166,25 @@
       return clone;
     }
   }
+
+  /**
+   * Return a string representation of this component type.
+   */
+  public String toString() {
+      String s = "[";
+      InterfaceType[] its = getFcInterfaceTypes();
+      boolean first = false;
+      for (int i = 0; i < its.length; i++) {
+          if(first) {
+              first = false;
+          }
+          else {
+              s += ",";
+          }
+          s += its[i].toString();
+      }
+      s += "]";
+      return s;
+  }
+
 }
Index: julia/src/org/objectweb/fractal/julia/type/BasicInterfaceType.java
diff -u 
julia/src/org/objectweb/fractal/julia/type/BasicInterfaceType.java:1.5 
julia/src/org/objectweb/fractal/julia/type/BasicInterfaceType.java:1.6
--- julia/src/org/objectweb/fractal/julia/type/BasicInterfaceType.java:1.5    
  Thu Jun 10 10:49:57 2004
+++ julia/src/org/objectweb/fractal/julia/type/BasicInterfaceType.java  Mon 
Feb 19 13:18:46 2007
@@ -203,4 +203,14 @@
     }
     return false;
   }
+
+  /**
+   * Return a string representation of this interface type.
+   */
+  public String toString() {
+      String isClient = isFcClientItf() ? "client" : "server";
+      String isOptional = isFcOptionalItf() ? "optional" : "mandatory";
+      String isCollection = isFcCollectionItf() ? "collection" : "singleton";
+      return name+"/"+signature+"/"+isClient+"/"+isOptional+"/"+isCollection;
+  }
 }



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

Reply via email to:

Powered by MHonArc.

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