net.thisptr.jackson.jq.internal.tree.BreakExpression Maven / Gradle / Ivy
package net.thisptr.jackson.jq.internal.tree;
import com.fasterxml.jackson.databind.JsonNode;
import net.thisptr.jackson.jq.Expression;
import net.thisptr.jackson.jq.PathOutput;
import net.thisptr.jackson.jq.Scope;
import net.thisptr.jackson.jq.exception.JsonQueryBreakException;
import net.thisptr.jackson.jq.exception.JsonQueryException;
import net.thisptr.jackson.jq.path.Path;
public class BreakExpression implements Expression {
private final String name;
public BreakExpression(final String name) {
this.name = name;
}
@Override
public void apply(final Scope scope, final JsonNode in, final Path ipath, final PathOutput output, final boolean requirePath) throws JsonQueryException {
throw new JsonQueryBreakException(name);
}
@Override
public String toString() {
return "break $" + name;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy