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

org.fulib.scenarios.ast.pattern.MatchConstraint Maven / Gradle / Ivy

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

package org.fulib.scenarios.ast.pattern;

import java.util.List;
import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.expr.Expr;


public interface MatchConstraint extends Constraint
{
	// =============== Static Methods ===============
	static MatchConstraint of(Expr expr, List patterns) { return new Impl(expr, patterns); }
	// =============== Properties ===============
	Expr getExpr();
	void setExpr(Expr expr);
	List getPatterns();
	void setPatterns(List patterns);
	// =============== Methods ===============
	default  R accept(MatchConstraint.Visitor visitor, P par) { return visitor.visit(this, par); }
	@Override default  R accept(Constraint.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 Constraint.Impl implements MatchConstraint
	{
		// =============== Fields ===============
		private Expr expr;
		private List patterns;
		// =============== Constructors ===============
		public Impl() {}
		public Impl(Expr expr, List patterns)
		{
			this.expr = expr;
			this.patterns = patterns;
		}
		// =============== Properties ===============
		@Override public Expr getExpr() { return this.expr; }
		@Override public void setExpr(Expr expr) { this.expr = expr; }
		@Override public List getPatterns() { return this.patterns; }
		@Override public void setPatterns(List patterns) { this.patterns = patterns; }
	}
	interface Visitor
	{
		// =============== Methods ===============
		default R visit(MatchConstraint matchConstraint, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + matchConstraint.getClass().getName() + ")"); }
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy