< Back
Release Notes v0.5.3
See also the release notes of
0.5.2,
0.5.1 and
0.5.0
What's new?
Virtual Classes Can Be Defined in Separate Files
Large collaborations now can be splitted into multiple files - one for each virtual class. The
package
declaration of the virtual class must be replaced by a
cclass
declaration, which specifies the fully qualified name of the enclosing class. The enclosing class can a top level class as well as a nested class.
Bellow is an example of Graph collaboration, which nested classes are defined in separate files:
/* File .../Graph.java */
package org.caesarj.examples.graph
public cclass Graph {
}
/* File .../Graph/Node.java */
cclass org.caesarj.examples.graph.Graph;
public cclass Node {
protected List edges = new LinkedList();
public Iterator getEdges() {
return edges.iterator();
}
...
}
/* File .../Graph/Edge.java */
cclass org.caesarj.examples.graph.Graph;
public cclass Edge {
protected Node start;
protected Node end;
public Node getStart() {
return start;
}
public Node getEnd() {
return end;
}
...
}
The developer has a full freedom to take out the classes from collaborations. He/she can define some of the virtual classes separatelly from the collaboration and the other leave inside the collaboration.
See also our
Expressions example.