hydra.langs.java.syntax.MethodInvocation_Header Maven / Gradle / Ivy
package hydra.langs.java.syntax;
import java.io.Serializable;
public abstract class MethodInvocation_Header implements Serializable {
public static final hydra.core.Name NAME = new hydra.core.Name("hydra/langs/java/syntax.MethodInvocation.Header");
private MethodInvocation_Header () {
}
public abstract R accept(Visitor visitor) ;
public interface Visitor {
R visit(Simple instance) ;
R visit(Complex instance) ;
}
public interface PartialVisitor extends Visitor {
default R otherwise(MethodInvocation_Header instance) {
throw new IllegalStateException("Non-exhaustive patterns when matching: " + (instance));
}
default R visit(Simple instance) {
return otherwise((instance));
}
default R visit(Complex instance) {
return otherwise((instance));
}
}
public static final class Simple extends hydra.langs.java.syntax.MethodInvocation_Header implements Serializable {
public final hydra.langs.java.syntax.MethodName value;
public Simple (hydra.langs.java.syntax.MethodName value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Simple)) {
return false;
}
Simple o = (Simple) (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 Complex extends hydra.langs.java.syntax.MethodInvocation_Header implements Serializable {
public final hydra.langs.java.syntax.MethodInvocation_Complex value;
public Complex (hydra.langs.java.syntax.MethodInvocation_Complex value) {
this.value = value;
}
@Override
public boolean equals(Object other) {
if (!(other instanceof Complex)) {
return false;
}
Complex o = (Complex) (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