hydra.langs.java.syntax.ExplicitConstructorInvocation_Variant Maven / Gradle / Ivy
package hydra.langs.java.syntax;
import java.io.Serializable;
public abstract class ExplicitConstructorInvocation_Variant implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.ExplicitConstructorInvocation.Variant");
private ExplicitConstructorInvocation_Variant () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(This instance) ;
R visit(Super instance) ;
R visit(Primary instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(ExplicitConstructorInvocation_Variant instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(This instance) {
return otherwise((instance));
}
default R visit(Super instance) {
return otherwise((instance));
}
default R visit(Primary instance) {
return otherwise((instance));
}
}
public static final class This extends hydra.langs.java.syntax.ExplicitConstructorInvocation_Variant implements Serializable {
public This () {
}
@Override
public boolean equals(Object other) {
if (!(other instanceof This)) {
return false;
}
This o = (This) (other);
return true;
}
@Override
public int hashCode() {
return 0;
}
@Override
public R accept(Visitor visitor) {
return visitor.visit(this);
}
}
public static final class Super extends hydra.langs.java.syntax.ExplicitConstructorInvocation_Variant implements Serializable {
public final java.util.Optional value;
public Super (java.util.Optional value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Super)) {
return false;
}
Super o = (Super) (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 Primary extends hydra.langs.java.syntax.ExplicitConstructorInvocation_Variant implements Serializable {
public final hydra.langs.java.syntax.Primary value;
public Primary (hydra.langs.java.syntax.Primary value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Primary)) {
return false;
}
Primary o = (Primary) (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