org.fulib.scenarios.ast.sentence.AssignSentence Maven / Gradle / Ivy
Show all versions of fulibScenarios Show documentation
// Generated by GenTreeSrc v0.10.2
// DO NOT EDIT - CHANGES WILL BE LOST ON RE-GENERATE
package org.fulib.scenarios.ast.sentence;
import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.decl.Decl;
import org.fulib.scenarios.ast.expr.Expr;
import org.fulib.scenarios.ast.expr.operator.BinaryOperator;
public interface AssignSentence extends Sentence
{
// =============== Static Methods ===============
static AssignSentence of(Decl target, BinaryOperator operator, Expr value) { return new Impl(target, operator, value); }
// =============== Properties ===============
Decl getTarget();
void setTarget(Decl target);
BinaryOperator getOperator();
void setOperator(BinaryOperator operator);
Expr getValue();
void setValue(Expr value);
// =============== Methods ===============
default R accept(AssignSentence.Visitor
visitor, P par) { return visitor.visit(this, par); }
@Override default
R accept(Sentence.Visitor
visitor, P par) { return visitor.visit(this, par); }
@Override default
R accept(Positioned.Visitor
visitor, P par) { return visitor.visit(this, par); }
@Override default
R accept(Node.Visitor
visitor, P par) { return visitor.visit(this, par); }
// =============== Classes ===============
class Impl extends Positioned.Impl implements AssignSentence
{
// =============== Fields ===============
private Decl target;
private BinaryOperator operator;
private Expr value;
// =============== Constructors ===============
public Impl() {}
public Impl(Decl target, BinaryOperator operator, Expr value)
{
this.target = target;
this.operator = operator;
this.value = value;
}
// =============== Properties ===============
@Override public Decl getTarget() { return this.target; }
@Override public void setTarget(Decl target) { this.target = target; }
@Override public BinaryOperator getOperator() { return this.operator; }
@Override public void setOperator(BinaryOperator operator) { this.operator = operator; }
@Override public Expr getValue() { return this.value; }
@Override public void setValue(Expr value) { this.value = value; }
}
interface Visitor
{
// =============== Methods ===============
default R visit(AssignSentence assignSentence, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + assignSentence.getClass().getName() + ")"); }
}
}