@Generated(value="jsii-pacmak/1.30.0 (build adae23f)", date="2021-06-30T10:00:45.959Z") @Stability(value=Experimental) 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)
(experimental) Return a resolvable representation of the given value.
|
static List<String> |
asList(Object value)
(experimental) Return a reversible list representation of this token.
|
static List<String> |
asList(Object value,
EncodingOptions options)
(experimental) Return a reversible list representation of this token.
|
static Number |
asNumber(Object value)
(experimental) Return a reversible number representation of this token.
|
static String |
asString(Object value)
(experimental) Return a reversible string representation of this token.
|
static String |
asString(Object value,
EncodingOptions options)
(experimental) Return a reversible string representation of this token.
|
static TokenComparison |
compareStrings(String possibleToken1,
String possibleToken2)
(experimental) Compare two strings that might contain Tokens with each other.
|
static Boolean |
isUnresolved(Object obj)
(experimental) Returns true if obj represents an unresolved value.
|
jsiiAsyncCall, jsiiAsyncCall, jsiiCall, jsiiCall, jsiiGet, jsiiGet, jsiiSet, jsiiStaticCall, jsiiStaticCall, jsiiStaticGet, jsiiStaticGet, jsiiStaticSet, jsiiStaticSetprotected Token(software.amazon.jsii.JsiiObjectRef objRef)
protected Token(software.amazon.jsii.JsiiObject.InitializationMode initializationMode)
@Stability(value=Experimental) @NotNull public static IResolvable asAny(@NotNull Object value)
value - This parameter is required.@Stability(value=Experimental) @NotNull public static List<String> asList(@NotNull Object value, @Nullable EncodingOptions options)
value - This parameter is required.options - @Stability(value=Experimental) @NotNull public static List<String> asList(@NotNull Object value)
value - This parameter is required.@Stability(value=Experimental) @NotNull public static Number asNumber(@NotNull Object value)
value - This parameter is required.@Stability(value=Experimental) @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=Experimental) @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=Experimental) @NotNull public static TokenComparison compareStrings(@NotNull String possibleToken1, @NotNull String possibleToken2)
possibleToken1 - This parameter is required.possibleToken2 - This parameter is required.@Stability(value=Experimental) @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 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 © 2021. All rights reserved.