Documentation Index
Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Fragments of a concatenated string containing stringified Tokens.
Initializers
import io.cdktn.cdktn.TokenizedStringFragments;
new TokenizedStringFragments();
Methods
| Name | Description |
|---|
addEscape | No description. |
addIntrinsic | Adds an intrinsic fragment. |
addLiteral | Adds a literal fragment. |
addToken | Adds a token fragment. |
concat | No description. |
join | Combine the string fragments using the given joiner. |
mapTokens | Apply a transformation function to all tokens in the string. |
addEscape
public void addEscape(java.lang.String kind)
kindRequired
addIntrinsic
public void addIntrinsic(java.lang.Object value)
Adds an intrinsic fragment.
valueRequired
the intrinsic value to add.
addLiteral
public void addLiteral(java.lang.Object lit)
Adds a literal fragment.
litRequired
the literal to add.
addToken
public void addToken(IResolvable token)
Adds a token fragment.
tokenRequired
the token to add.
concat
public void concat(TokenizedStringFragments other)
otherRequired
join
public java.lang.Object join(IFragmentConcatenator concat)
Combine the string fragments using the given joiner.
If there are any
concatRequired
mapTokens
public TokenizedStringFragments mapTokens(IResolveContext context)
Apply a transformation function to all tokens in the string.
contextRequired
Properties
| Name | Type | Description |
|---|
escapes | java.util.List<IResolvable> | Return all escape fragments from this string. |
firstValue | java.lang.Object | Returns the first value. |
intrinsic | java.util.List<IResolvable> | Return all intrinsic fragments from this string. |
length | java.lang.Number | Returns the number of fragments. |
literals | java.util.List<IResolvable> | Return all literals from this string. |
tokens | java.util.List<IResolvable> | Return all Tokens from this string. |
firstToken | IResolvable | Returns the first token. |
escapesRequired
public java.util.List<IResolvable> getEscapes();
Return all escape fragments from this string.
firstValueRequired
public java.lang.Object getFirstValue();
Returns the first value.
intrinsicRequired
public java.util.List<IResolvable> getIntrinsic();
Return all intrinsic fragments from this string.
lengthRequired
public java.lang.Number getLength();
Returns the number of fragments.
literalsRequired
public java.util.List<IResolvable> getLiterals();
Return all literals from this string.
tokensRequired
public java.util.List<IResolvable> getTokens();
Return all Tokens from this string.
firstTokenOptional
public IResolvable getFirstToken();
Returns the first token.