Contents
- Description
- Field Summary
- Constructor Summary
- Method Summary
- Field Details
- Constructor Details
- Method Details
- getType()
- isStatic()
- getNumber(ExecutionContext)
- getString(ExecutionContext)
- getBoolean(ExecutionContext)
- getNumberArray(ExecutionContext)
- getIntegerArray(ExecutionContext)
- getStringArray(ExecutionContext)
- getBooleanArray(ExecutionContext)
- addToScope(String, StdScope)
- updateScope(StdScope, String, ExecutionContext)
- getExpression()
- fromOperand(ExecutionContext.Operand)
- fromJSON(JsonElement, BuilderParameters, boolean)
- fromJSON(JsonElement, BuilderParameters, ValueType)
- fromJSON(JsonElement, BuilderParameters)
- compile(BuilderParameters)
- toSchema(SchemaContext)
Class BuilderExpression
java.lang.Object
com.hypixel.hytale.server.npc.asset.builder.expression.BuilderExpression
- Direct Known Subclasses:
BuilderExpressionDynamic, BuilderExpressionStaticBoolean, BuilderExpressionStaticBooleanArray, BuilderExpressionStaticEmptyArray, BuilderExpressionStaticNumber, BuilderExpressionStaticNumberArray, BuilderExpressionStaticString, BuilderExpressionStaticStringArray
Builder expression representing a literal or an expression to evaluate later on.
The builder expression either holds a single literal constant (number, string, boolean) from JSON file or an expression string which is compiled and can be executed when builder is used to build the object.
A builder expression is a JSON object with a "Compute"/String key/value pair.
Example: "Appearance": { "Compute": "Appearance" }
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToScope(String name, StdScope scope) voidcompile(BuilderParameters builderParameters) static BuilderExpressionfromJSON(com.google.gson.JsonElement jsonElement, BuilderParameters builderParameters) static BuilderExpressionfromJSON(com.google.gson.JsonElement jsonElement, BuilderParameters builderParameters, boolean constantsOnly) static BuilderExpressionfromJSON(com.google.gson.JsonElement jsonElement, BuilderParameters builderParameters, ValueType expectedType) static BuilderExpressionfromOperand(ExecutionContext.Operand operand) booleangetBoolean(ExecutionContext executionContext) boolean[]getBooleanArray(ExecutionContext executionContext) int[]getIntegerArray(ExecutionContext executionContext) doublegetNumber(ExecutionContext executionContext) double[]getNumberArray(ExecutionContext executionContext) getString(ExecutionContext executionContext) String[]getStringArray(ExecutionContext executionContext) abstract ValueTypegetType()abstract booleanisStatic()static SchematoSchema(SchemaContext context) voidupdateScope(StdScope scope, String name, ExecutionContext executionContext)
-
Field Details
-
STATIC
- See Also:
-
-
Constructor Details
-
BuilderExpression
public BuilderExpression()
-
-
Method Details
-
getType
-
isStatic
public abstract boolean isStatic() -
getNumber
-
getString
-
getBoolean
-
getNumberArray
-
getIntegerArray
-
getStringArray
-
getBooleanArray
-
addToScope
-
updateScope
-
getExpression
-
fromOperand
-
fromJSON
@Nonnull public static BuilderExpression fromJSON(@Nonnull com.google.gson.JsonElement jsonElement, @Nonnull BuilderParameters builderParameters, boolean constantsOnly) -
fromJSON
@Nonnull public static BuilderExpression fromJSON(@Nonnull com.google.gson.JsonElement jsonElement, @Nonnull BuilderParameters builderParameters, ValueType expectedType) -
fromJSON
@Nonnull public static BuilderExpression fromJSON(@Nonnull com.google.gson.JsonElement jsonElement, @Nonnull BuilderParameters builderParameters) -
compile
-
toSchema
-