public class StringLiteralTemplateParser
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
class |
StringLiteralTemplateParser.Expr |
static class |
StringLiteralTemplateParser.ExprKind |
| Modifier and Type | Method and Description |
|---|---|
static java.util.List<StringLiteralTemplateParser.Expr> |
parse(java.util.function.IntPredicate $escapeMatcher,
java.lang.String stringValue)
Parse a string from a string literal using standard template delimiters e.g., "$foo" and "${foo.bar()}",
and return the list of expressions.
|
public static java.util.List<StringLiteralTemplateParser.Expr> parse(java.util.function.IntPredicate $escapeMatcher, java.lang.String stringValue)
$escapeMatcher - Given the index of a '$' returns whether or not the '$' is escaped. Command line
compilers filter out the '\' char in the string, so the caller must keep track.
Other parsers, like many IDE parsers, preserve the '\' chars in the string, so
they have a different (and simpler) way of determining escaped '$' chars.stringValue - The value of the string literal as returned by the tokenizer.Copyright © 2021. All rights reserved.