co.streamx.fluent.extree.expression.ParameterExpression Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of ex-tree Show documentation
Show all versions of ex-tree Show documentation
Build AST from the bytecode
The newest version!
package co.streamx.fluent.extree.expression;
import lombok.Getter;
/**
* Represents an indexed parameter expression.
*
*
*/
@Getter
public final class ParameterExpression extends Expression {
private final int index;
ParameterExpression(Class> resultType, int index) {
super(ExpressionType.Parameter, resultType);
if (index < 0)
throw new IndexOutOfBoundsException("index");
this.index = index;
}
@Override
protected T visit(ExpressionVisitor v) {
return v.visit(this);
}
@Override
public String toString() {
return "P" + getIndex();
}
}