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

org.fulib.scenarios.ast.decl.AttributeDecl 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.decl;

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


public interface AttributeDecl extends Decl
{
	// =============== Static Methods ===============
	static AttributeDecl of(ClassDecl owner, String name, Type type) { return new Impl(owner, name, type); }
	// =============== Properties ===============
	ClassDecl getOwner();
	void setOwner(ClassDecl owner);
	String getName();
	void setName(String name);
	Type getType();
	void setType(Type type);
	// =============== Methods ===============
	default  R accept(AttributeDecl.Visitor visitor, P par) { return visitor.visit(this, par); }
	@Override default  R accept(Decl.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 AttributeDecl
	{
		// =============== Fields ===============
		private ClassDecl owner;
		private String name;
		private Type type;
		// =============== Constructors ===============
		public Impl() {}
		public Impl(ClassDecl owner, String name, Type type)
		{
			this.owner = owner;
			this.name = name;
			this.type = type;
		}
		// =============== Properties ===============
		@Override public ClassDecl getOwner() { return this.owner; }
		@Override public void setOwner(ClassDecl owner) { this.owner = owner; }
		@Override public String getName() { return this.name; }
		@Override public void setName(String name) { this.name = name; }
		@Override public Type getType() { return this.type; }
		@Override public void setType(Type type) { this.type = type; }
	}
	interface Visitor
	{
		// =============== Methods ===============
		default R visit(AttributeDecl attributeDecl, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + attributeDecl.getClass().getName() + ")"); }
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy