use of org.whole.lang.operations.AbstractOperation in project whole by wholeplatform.
the class JavaStoreBuilder method addSubtree.
// NB devono essere 3 addSubtree
public Expression addSubtree(IVisitor visitor, SameStageFragment fragment, String type) {
int parentNestingSize = initNestingSize();
IVisitor v = ((AbstractOperation) visitor.getOperation()).getVisitor(fragment.wGetRoot(), visitor.getOperation().getStage());
v.visit(fragment.wGetRoot());
MethodInvocation callExp2 = newFactoryInvocation(v, "makeRootEntity");
callExp2.arguments().add(getExpression());
MethodInvocation callExp = newFactoryInvocation(visitor, "create" + type);
callExp.arguments().add(callExp2);
return addSubtree(parentNestingSize, type, callExp);
}
use of org.whole.lang.operations.AbstractOperation in project whole by wholeplatform.
the class JavaStoreBuilder method addSubtree.
public Expression addSubtree(IVisitor visitor, StageUpFragment fragment, String type) {
int parentNestingSize = initNestingSize();
IVisitor v = ((AbstractOperation) visitor.getOperation()).getVisitor(fragment.wGetRoot(), 1);
v.visit(fragment.wGetRoot());
MethodInvocation callExp2 = newFactoryInvocation(v, "makeRootEntity");
callExp2.arguments().add(getExpression());
MethodInvocation callExp = newFactoryInvocation(visitor, "create" + type);
callExp.arguments().add(callExp2);
return addSubtree(parentNestingSize, type, callExp);
}
use of org.whole.lang.operations.AbstractOperation in project whole by wholeplatform.
the class JavaStoreBuilder method addSubtree.
public Expression addSubtree(IVisitor visitor, StageDownFragment fragment, String type) {
int parentNestingSize = initNestingSize();
IVisitor v = ((AbstractOperation) visitor.getOperation()).getVisitor(fragment.wGetRoot(), 0);
v.visit(fragment.wGetRoot());
MethodInvocation callExp2 = newFactoryInvocation(v, "makeRootEntity");
callExp2.arguments().add(getExpression());
MethodInvocation callExp = newFactoryInvocation(visitor, "create" + type);
callExp.arguments().add(callExp2);
return addSubtree(parentNestingSize, type, callExp);
}
Aggregations