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

org.fulib.scenarios.ast.sentence.InheritanceSentence 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.sentence;

import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.type.Type;


public interface InheritanceSentence extends Sentence
{
	// =============== Static Methods ===============
	static InheritanceSentence of(Type subType, Type superType) { return new Impl(subType, superType); }
	// =============== Properties ===============
	Type getSubType();
	void setSubType(Type subType);
	Type getSuperType();
	void setSuperType(Type superType);
	// =============== Methods ===============
	default  R accept(InheritanceSentence.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 InheritanceSentence
	{
		// =============== Fields ===============
		private Type subType;
		private Type superType;
		// =============== Constructors ===============
		public Impl() {}
		public Impl(Type subType, Type superType)
		{
			this.subType = subType;
			this.superType = superType;
		}
		// =============== Properties ===============
		@Override public Type getSubType() { return this.subType; }
		@Override public void setSubType(Type subType) { this.subType = subType; }
		@Override public Type getSuperType() { return this.superType; }
		@Override public void setSuperType(Type superType) { this.superType = superType; }
	}
	interface Visitor
	{
		// =============== Methods ===============
		default R visit(InheritanceSentence inheritanceSentence, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + inheritanceSentence.getClass().getName() + ")"); }
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy