io.github.kiryu1223.expressionTree.expressions.ThrowExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ExpressionTree Show documentation
Show all versions of ExpressionTree Show documentation
java static expressionTree
package io.github.kiryu1223.expressionTree.expressions;
public class ThrowExpression extends Expression
{
private final Expression expr;
public ThrowExpression(Expression expr)
{
this.expr = expr;
}
public Expression getExpr()
{
return expr;
}
@Override
public Kind getKind()
{
return Kind.Throw;
}
@Override
public String toString()
{
return "throw " + expr;
}
@Override
public boolean equals(Object obj)
{
if (this == obj) return true;
if (obj == null || getClass() != obj.getClass()) return false;
ThrowExpression that = (ThrowExpression) obj;
return expr.equals(that.expr);
}
}