BuilderExpression

abstract class BuilderExpression

Class BuilderExpression. Provides builderexpression functionality for the Hytale server.

java.lang.Object > BuilderExpression

Field Summary

builderExpression

final BuilderExpression builderExpression

Field builderExpression.

jsonPrimitive

final BuilderExpression jsonPrimitive

Field jsonPrimitive.

result

final BuilderExpression result

Field result.

jsonArray

final JsonArray jsonArray

Field jsonArray.

firstElement

final JsonElement firstElement

Field firstElement.

s

final Schema s

Field s.

Method Detail

getNumber

public double getNumber (final ExecutionContext executionContext)

Method getNumber.

Parameters:
final ExecutionContext executionContext

getString

public String getString (final ExecutionContext executionContext)

Method getString.

Parameters:
final ExecutionContext executionContext

getBoolean

public boolean getBoolean (final ExecutionContext executionContext)

Method getBoolean.

Parameters:
final ExecutionContext executionContext

getNumberArray

public double[] getNumberArray (final ExecutionContext executionContext)

Method getNumberArray.

Parameters:
final ExecutionContext executionContext

getIntegerArray

public int[] getIntegerArray (final ExecutionContext executionContext)

Method getIntegerArray.

Parameters:
final ExecutionContext executionContext

getStringArray

public String[] getStringArray (final ExecutionContext executionContext)

Method getStringArray.

Parameters:
final ExecutionContext executionContext

getBooleanArray

public boolean[] getBooleanArray (final ExecutionContext executionContext)

Method getBooleanArray.

Parameters:
final ExecutionContext executionContext

addToScope

public void addToScope (final String name, final StdScope scope)

Method addToScope.

Parameters:
final String name
final StdScope scope

updateScope

public void updateScope (final StdScope scope, final String name, final ExecutionContext executionContext)

Method updateScope.

Parameters:
final StdScope scope
final String name
final ExecutionContext executionContext

getExpression

public String getExpression ()

Method getExpression.

fromOperand

static BuilderExpression fromOperand (@Nonnull final ExecutionContext.Operand operand)

Method fromOperand.

Parameters:
@Nonnull final ExecutionContext.Operand operand

switch

public return switch (operand.type)

Method switch.

Parameters:
operand.type operand.type

fromJSON

static BuilderExpression fromJSON (@Nonnull final JsonElement jsonElement, @Nonnull final BuilderParameters builderParameters, final boolean constantsOnly)

Method fromJSON.

Parameters:
@Nonnull final JsonElement jsonElement
@Nonnull final BuilderParameters builderParameters
final boolean constantsOnly

IllegalArgumentException

public new IllegalArgumentException ("Only constant string, number or boolean or arrays allowed, found: " + String.valueOf(jsonElement)

Method IllegalArgumentException.

Parameters:
"Only constant string
number or boolean or arrays allowed
found: " + String.valueOf(jsonElement

if

public else if (jsonElement.isJsonArray()

Method if.

Parameters:
jsonElement.isJsonArray( jsonElement.isJsonArray(

readJSONPrimitive

static BuilderExpression readJSONPrimitive (@Nonnull final JsonElement jsonElement)

Method readJSONPrimitive.

Parameters:
@Nonnull final JsonElement jsonElement

readStaticArray

static BuilderExpression readStaticArray (@Nonnull final JsonElement jsonElement)

Method readStaticArray.

Parameters:
@Nonnull final JsonElement jsonElement

compile

public void compile (final BuilderParameters builderParameters)

Method compile.

Parameters:
final BuilderParameters builderParameters

toSchema

static Schema toSchema (@Nonnull final SchemaContext context)

Method toSchema.

Parameters:
@Nonnull final SchemaContext context

getSchemaName

public String getSchemaName ()

Method getSchemaName.

ArraySchema

public new ArraySchema ()

Method ArraySchema.

NumberSchema

public new NumberSchema ()

Method NumberSchema.

StringSchema

public new StringSchema ()

Method StringSchema.

BooleanSchema

public new BooleanSchema ()

Method BooleanSchema.