org.fulib.scenarios.ast.expr.PlaceholderExpr 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.expr;
import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.type.Type;
public interface PlaceholderExpr extends Expr
{
// =============== Static Methods ===============
static PlaceholderExpr of(Type type, Expr example) { return new Impl(type, example); }
// =============== Properties ===============
Type getType();
void setType(Type type);
Expr getExample();
void setExample(Expr example);
// =============== Methods ===============
default R accept(PlaceholderExpr.Visitor
visitor, P par) { return visitor.visit(this, par); }
@Override default
R accept(Expr.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 PlaceholderExpr
{
// =============== Fields ===============
private Type type;
private Expr example;
// =============== Constructors ===============
public Impl() {}
public Impl(Type type, Expr example)
{
this.type = type;
this.example = example;
}
// =============== Properties ===============
@Override public Type getType() { return this.type; }
@Override public void setType(Type type) { this.type = type; }
@Override public Expr getExample() { return this.example; }
@Override public void setExample(Expr example) { this.example = example; }
}
interface Visitor
{
// =============== Methods ===============
default R visit(PlaceholderExpr placeholderExpr, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + placeholderExpr.getClass().getName() + ")"); }
}
}