
org.fulib.scenarios.ast.decl.ClassDecl Maven / Gradle / Ivy
// Generated by GenTreeSrc v0.10.2
// DO NOT EDIT - CHANGES WILL BE LOST ON RE-GENERATE
package org.fulib.scenarios.ast.decl;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.fulib.scenarios.ast.Node;
import org.fulib.scenarios.ast.Positioned;
import org.fulib.scenarios.ast.ScenarioGroup;
import org.fulib.scenarios.ast.type.Type;
public interface ClassDecl extends Decl
{
// =============== Static Methods ===============
static ClassDecl of(ScenarioGroup group, String name, Type type, Type superType, Map attributes, Map associations, List methods) { return new Impl(group, name, type, superType, attributes, associations, methods); }
// =============== Properties ===============
ScenarioGroup getGroup();
void setGroup(ScenarioGroup group);
String getName();
void setName(String name);
Type getType();
void setType(Type type);
Type getSuperType();
void setSuperType(Type superType);
Map getAttributes();
void setAttributes(Map attributes);
Map getAssociations();
void setAssociations(Map associations);
List getMethods();
void setMethods(List methods);
boolean getExternal();
void setExternal(boolean external);
boolean getFrozen();
void setFrozen(boolean frozen);
Set getStoredSuperClasses();
void setStoredSuperClasses(Set storedSuperClasses);
default Set getSuperClasses() { return ClassDeclDelegate.getSuperClasses(this); }
// =============== Methods ===============
default R accept(ClassDecl.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 ClassDecl
{
// =============== Fields ===============
private ScenarioGroup group;
private String name;
private Type type;
private Type superType;
private Map attributes;
private Map associations;
private List methods;
private boolean external;
private boolean frozen;
private Set storedSuperClasses;
// =============== Constructors ===============
public Impl() {}
public Impl(ScenarioGroup group, String name, Type type, Type superType, Map attributes, Map associations, List methods)
{
this.group = group;
this.name = name;
this.type = type;
this.superType = superType;
this.attributes = attributes;
this.associations = associations;
this.methods = methods;
}
// =============== Properties ===============
@Override public ScenarioGroup getGroup() { return this.group; }
@Override public void setGroup(ScenarioGroup group) { this.group = group; }
@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; }
@Override public Type getSuperType() { return this.superType; }
@Override public void setSuperType(Type superType) { this.superType = superType; }
@Override public Map getAttributes() { return this.attributes; }
@Override public void setAttributes(Map attributes) { this.attributes = attributes; }
@Override public Map getAssociations() { return this.associations; }
@Override public void setAssociations(Map associations) { this.associations = associations; }
@Override public List getMethods() { return this.methods; }
@Override public void setMethods(List methods) { this.methods = methods; }
@Override public boolean getExternal() { return this.external; }
@Override public void setExternal(boolean external) { this.external = external; }
@Override public boolean getFrozen() { return this.frozen; }
@Override public void setFrozen(boolean frozen) { this.frozen = frozen; }
@Override public Set getStoredSuperClasses() { return this.storedSuperClasses; }
@Override public void setStoredSuperClasses(Set storedSuperClasses) { this.storedSuperClasses = storedSuperClasses; }
}
interface Visitor
{
// =============== Methods ===============
default R visit(ClassDecl classDecl, P par) { throw new UnsupportedOperationException(this.getClass().getName() + ".visit(" + classDecl.getClass().getName() + ")"); }
}
}