@Generated(value="jsii-pacmak/0.21.2 (build 4370756)", date="2020-02-07T03:00:48.123Z") @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, jsiiCall, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticGet, jsiiStaticSetprotected Token(software.amazon.jsii.JsiiObjectRef objRef)
protected Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Stable) public static IResolvable asAny(Object value)
value - This parameter is required.@Stability(value=Stable) public static List<String> asList(Object value, EncodingOptions options)
value - This parameter is required.options - @Stability(value=Stable) public static List<String> asList(Object value)
value - This parameter is required.@Stability(value=Stable) public static Number asNumber(Object value)
value - This parameter is required.@Stability(value=Stable) public static String asString(Object value, 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) public static String asString(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) public static Boolean isUnresolved(Object obj)
One of these must be true:
obj is an IResolvableobj is a string containing at least one encoded IResolvableobj 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.