public AstReadOptionNodeBuilder setOptionValue(long optionValue) { node.setOptionValue(new AstLiteralLongValue(optionValue)); return this; }
public StreamNested<R> setOptionValue(byte[] optionValue) { node.setOptionValue(new AstLiteralBytesValue(optionValue)); return this; }
public StreamNested<R> setOptionValue(URI optionValue) { node.setOptionValue(new AstLiteralURIValue(optionValue)); return this; }
public StreamNested<R> setOptionValue(String optionValue) { node.setOptionValue(new AstLiteralTextValue(optionValue)); return this; }
public AstReadOptionNodeBuilder setOptionValue(String optionValue) { node.setOptionValue(new AstLiteralTextValue(optionValue)); return this; }
public AstReadOptionNodeBuilder setOptionValue(byte[] optionValue) { node.setOptionValue(new AstLiteralBytesValue(optionValue)); return this; }
public AstReadOptionNodeBuilder setOptionValue(ValueExpression expression, ExpressionContext environment) { node.setOptionValue(new AstExpressionValue<>(expression, environment)); return this; }
public StreamNested<R> setOptionValue(long optionValue) { node.setOptionValue(new AstLiteralLongValue(optionValue)); return this; }
public AstReadOptionNodeBuilder setOptionValue(URI optionValue) { node.setOptionValue(new AstLiteralURIValue(optionValue)); return this; }
public AstReadOptionNodeBuilder setOptionValue(int optionValue) { node.setOptionValue(new AstLiteralIntegerValue(optionValue)); return this; }
public StreamNested<R> setOptionValue(int optionValue) { node.setOptionValue(new AstLiteralIntegerValue(optionValue)); return this; }
public StreamNested<R> setOptionValue(ValueExpression expression, ExpressionContext environment) { node.setOptionValue(new AstExpressionValue<>(expression, environment)); return this; }
@Override public AstReadOptionNode visitReadOptionNode(ReadOptionNodeContext ctx) { String optionQName = ctx.optionName().getText(); TypeInfo<?> optionType = TYPE_SYSTEM.readOption(optionQName); Class<?> expectedType = optionType.getType(); AstValueVisitor<?> visitor = new AstValueVisitor<>(factory, environment, expectedType); AstValue<?> optionValue = visitor.visit(ctx); childInfos().add(optionValue.getRegionInfo()); node = new AstReadOptionNode(); node.setOptionType(optionType); node.setOptionName(optionQName); node.setOptionValue(optionValue); node.setRegionInfo(asSequentialRegion(childInfos, ctx)); return node; } }