public class ExpandOptions extends Object
Modifier and Type | Field and Description |
---|---|
static boolean |
DEFAULT_ALLOW_VARIABLE_MISS
Default value for
allowVariableMiss field = true as mandated by the RFC. |
Constructor and Description |
---|
ExpandOptions() |
ExpandOptions(ExpandOptions that) |
ExpandOptions(JsonObject json) |
Modifier and Type | Method and Description |
---|---|
boolean |
getAllowVariableMiss() |
ExpandOptions |
setAllowVariableMiss(boolean allowVariableMiss)
Configures whether a template missing variable is replaced by the empty string or triggers a
NoSuchElementException
to be thrown. |
JsonObject |
toJson() |
public static final boolean DEFAULT_ALLOW_VARIABLE_MISS
allowVariableMiss
field = true
as mandated by the RFC.public ExpandOptions()
public ExpandOptions(JsonObject json)
public ExpandOptions(ExpandOptions that)
public boolean getAllowVariableMiss()
false
to trigger a NoSuchElementException
when a referenced variable is missing.public ExpandOptions setAllowVariableMiss(boolean allowVariableMiss)
NoSuchElementException
to be thrown.
The default is true
as specified by the RFC, setting false
is a custom setting not compliant with the spec.allowVariableMiss
- true
to accept missing variables.public JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.