/**
* A simple bean class
*
* @pattern autoimplemente
*/
public class MyBean implements Startable{
...
/**
* A simple interface with start() methods.
*/
public interface Startable{
/** Computes the result with TVA */
public void start(float a,String s);
/** Computes the result with TVA */
public void start(float a);
...
run Patternity...
/**
* A simple bean class
*
* @pattern autoimplemente
*/
public class MyBean implements Startable{
/** Computes the result with TVA **/
public void start(float a,java.lang.String s) {
;
}
/** Computes the result with TVA **/
public void start(float a) {
;
}
...
/**
* A simple Visitor class
*
* @pattern Visitor node=Visitable
*/
public class MyVisitor {
...
public class Node implements Visitable{ ...
public class OtherNode implements Visitable{ ...
run Patternity...
/**
* A simple Visitor class
*
* @pattern Visitor node=Visitable
*/
public class MyVisitor {
...
/** The visitor method to handle the OtherNode object. **/
public void visit(OtherNode o) {
;
}
/** The visitor method to handle the Node object. **/
public void visit(Node o) {
;
}
...
/**
* @get
* @set
*/
protected String name= "";
/**
* @get
* @set
*/
protected String secondName= "";
public String getName(){return name;} //already exists!
...
run Patternity...
/** Sets the name. **/
public void setName(String name) {
this.name = name;
}
/** Gets the secondName. **/
public String getSecondName() {
return this.secondName;
}
/** Sets the secondName. **/
public void setSecondName(String secondName) {
this.secondName = secondName;
}
...
...
/**
* @set
* @pattern IfProxy
*/
protected Node deleguee = null;
...
/**
* A simple node class
*/
public class Node{
/** Computes the result with TVA */
public void dump(float a,String s){;}
}
run Patternity...
...
/** Computes the result with TVA **/
public void dump(float a,java.lang.String s) {
if(true){
this.deleguee.dump(a,s);
}
}
...
/** Sets the deleguee. **/
public void setDeleguee(Node deleguee) {
this.deleguee = deleguee;
}
...
...
/**
* @get
* @pattern Composite
*/
protected Rendable[] children = null;
...
/**
* A simple interface with render() methods.
*/
public interface Rendable{
/** Computes the result with TVA */
public void render(Node n,Node n2);
/** Computes the result with TVA */
public void render(Node n);
}
run Patternity...
...
/** Computes the result with TVA **/
public void render(examples.Node n,examples.Node n2) {
for(int i=0;i<this.children.length;i++){
Rendable o = this.children[i];
o.render(n,n2);
}
}
/** Computes the result with TVA **/
public void render(examples.Node n) {
for(int i=0;i<this.children.length;i++){
Rendable o = this.children[i];
o.render(n);
}
}
...
/** Gets the children. **/
public Rendable getChildren() {
return this.children;
}
...