@Generated(value="jsii-pacmak/0.22.0 (build 14afdde)", date="2020-03-12T20:02:34.626Z") @Stability(value=Stable) public class Token extends software.amazon.jsii.JsiiObject
Can be used to delay evaluation of a certain value in case, for example, that it requires some context or late-bound data. Can also be used to mark values that need special processing at document rendering time.
Tokens can be embedded into strings while retaining their original semantics.
Modifier | Constructor and Description |
---|---|
protected |
Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode) |
protected |
Token(software.amazon.jsii.JsiiObjectRef objRef) |
Modifier and Type | Method and Description |
---|---|
static IResolvable |
asAny(Object value)
Return a resolvable representation of the given value.
|
static List<String> |
asList(Object value)
Return a reversible list representation of this token.
|
static List<String> |
asList(Object value,
EncodingOptions options)
Return a reversible list representation of this token.
|
static Number |
asNumber(Object value)
Return a reversible number representation of this token.
|
static String |
asString(Object value)
Return a reversible string representation of this token.
|
static String |
asString(Object value,
EncodingOptions options)
Return a reversible string representation of this token.
|
static Boolean |
isUnresolved(Object obj)
Returns true if obj represents an unresolved value.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet
protected Token(software.amazon.jsii.JsiiObjectRef objRef)
protected Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) @NotNull public static IResolvable asAny(@NotNull Object value)
value
- This parameter is required.@Stability(value=Stable) @NotNull public static List<String> asList(@NotNull Object value, @Nullable EncodingOptions options)
value
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static List<String> asList(@NotNull Object value)
value
- This parameter is required.@Stability(value=Stable) @NotNull public static Number asNumber(@NotNull Object value)
value
- This parameter is required.@Stability(value=Stable) @NotNull public static String asString(@NotNull Object value, @Nullable EncodingOptions options)
If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into
complex values with the Tokens restored by calling resolve()
on the string.
value
- This parameter is required.options
- @Stability(value=Stable) @NotNull public static String asString(@NotNull Object value)
If the Token is initialized with a literal, the stringified value of the literal is returned. Otherwise, a special quoted string representation of the Token is returned that can be embedded into other strings.
Strings with quoted Tokens in them can be restored back into
complex values with the Tokens restored by calling resolve()
on the string.
value
- This parameter is required.@Stability(value=Stable) @NotNull public static Boolean isUnresolved(@NotNull Object obj)
One of these must be true:
obj
is an IResolvableobj
is a string containing at least one encoded IResolvable
obj
is either an encoded number or listThis does NOT recurse into lists or objects to see if they containing resolvables.
obj
- The object to test. This parameter is required.Copyright © 2020. All rights reserved.