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