
org.fulib.scenarios.ast.NamedExpr 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;
import org.fulib.scenarios.ast.decl.Name;
import org.fulib.scenarios.ast.expr.Expr;
public interface NamedExpr extends Node
{
// =============== Static Methods ===============
static NamedExpr of(Name name, Expr expr) { return new Impl(name, expr); }
// =============== Properties ===============
Name getName();
void setName(Name name);
Expr getExpr();
void setExpr(Expr expr);
Name getOtherName();
void setOtherName(Name otherName);
boolean getOtherMany();
void setOtherMany(boolean otherMany);
// =============== Methods ===============
default R accept(NamedExpr.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 implements NamedExpr
{
// =============== Fields ===============
private Name name;
private Expr expr;
private Name otherName;
private boolean otherMany;
// =============== Constructors ===============
public Impl() {}
public Impl(Name name, Expr expr)
{
this.name = name;
this.expr = expr;
}
// =============== Properties ===============
@Override public Name getName() { return this.name; }
@Override public void setName(Name name) { this.name = name; }
@Override public Expr getExpr() { return this.expr; }
@Override public void setExpr(Expr expr) { this.expr = expr; }
@Override public Name getOtherName() { return this.otherName; }
@Override public void setOtherName(Name otherName) { this.otherName = otherName; }
@Override public boolean getOtherMany() { return this.otherMany; }
@Override public void setOtherMany(boolean otherMany) { this.otherMany = otherMany; }
}
interface Visitor
{
// =============== Methods ===============
default R visit(NamedExpr namedExpr, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + namedExpr.getClass().getName() + ")"); }
}
}