hydra.langs.java.syntax.InterfaceMemberDeclaration Maven / Gradle / Ivy
package hydra.langs.java.syntax;
import java.io.Serializable;
public abstract class InterfaceMemberDeclaration implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.InterfaceMemberDeclaration");
private InterfaceMemberDeclaration () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Constant instance) ;
R visit(InterfaceMethod instance) ;
R visit(Class_ instance) ;
R visit(Interface instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(InterfaceMemberDeclaration instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Constant instance) {
return otherwise((instance));
}
default R visit(InterfaceMethod instance) {
return otherwise((instance));
}
default R visit(Class_ instance) {
return otherwise((instance));
}
default R visit(Interface instance) {
return otherwise((instance));
}
}
public static final class Constant extends hydra.langs.java.syntax.InterfaceMemberDeclaration implements Serializable {
public final hydra.langs.java.syntax.ConstantDeclaration value;
public Constant (hydra.langs.java.syntax.ConstantDeclaration value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Constant)) {
return false;
}
Constant o = (Constant) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class InterfaceMethod extends hydra.langs.java.syntax.InterfaceMemberDeclaration implements Serializable {
public final hydra.langs.java.syntax.InterfaceMethodDeclaration value;
public InterfaceMethod (hydra.langs.java.syntax.InterfaceMethodDeclaration value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof InterfaceMethod)) {
return false;
}
InterfaceMethod o = (InterfaceMethod) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Class_ extends hydra.langs.java.syntax.InterfaceMemberDeclaration implements Serializable {
public final hydra.langs.java.syntax.ClassDeclaration value;
public Class_ (hydra.langs.java.syntax.ClassDeclaration value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Class_)) {
return false;
}
Class_ o = (Class_) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Interface extends hydra.langs.java.syntax.InterfaceMemberDeclaration implements Serializable {
public final hydra.langs.java.syntax.InterfaceDeclaration value;
public Interface (hydra.langs.java.syntax.InterfaceDeclaration value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Interface)) {
return false;
}
Interface o = (Interface) (other);
return value.equals(o.value);
}
@Override
public int hashCode() {
return 2 * value.hashCode();
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy