All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.fulib.scenarios.ast.expr.call.CallExpr Maven / Gradle / Ivy

// Generated by GenTreeSrc v0.10.2
// DO NOT EDIT - CHANGES WILL BE LOST ON RE-GENERATE

package org.fulib.scenarios.ast.expr.call;

import java.util.List;
import org.fulib.scenarios.ast.NamedExpr;
import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.decl.Name;
import org.fulib.scenarios.ast.expr.Expr;
import org.fulib.scenarios.ast.sentence.SentenceList;


public interface CallExpr extends Expr
{
	// =============== Static Methods ===============
	static CallExpr of(Name name, Expr receiver, List arguments, SentenceList body) { return new Impl(name, receiver, arguments, body); }
	// =============== Properties ===============
	Name getName();
	void setName(Name name);
	Expr getReceiver();
	void setReceiver(Expr receiver);
	List getArguments();
	void setArguments(List arguments);
	SentenceList getBody();
	void setBody(SentenceList body);
	// =============== Methods ===============
	default  R accept(CallExpr.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 CallExpr
	{
		// =============== Fields ===============
		private Name name;
		private Expr receiver;
		private List arguments;
		private SentenceList body;
		// =============== Constructors ===============
		public Impl() {}
		public Impl(Name name, Expr receiver, List arguments, SentenceList body)
		{
			this.name = name;
			this.receiver = receiver;
			this.arguments = arguments;
			this.body = body;
		}
		// =============== Properties ===============
		@Override public Name getName() { return this.name; }
		@Override public void setName(Name name) { this.name = name; }
		@Override public Expr getReceiver() { return this.receiver; }
		@Override public void setReceiver(Expr receiver) { this.receiver = receiver; }
		@Override public List getArguments() { return this.arguments; }
		@Override public void setArguments(List arguments) { this.arguments = arguments; }
		@Override public SentenceList getBody() { return this.body; }
		@Override public void setBody(SentenceList body) { this.body = body; }
	}
	interface Visitor
	{
		// =============== Methods ===============
		default R visit(CallExpr callExpr, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + callExpr.getClass().getName() + ")"); }
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy