public class ParsedExpressionCache
extends java.lang.Object
LoadingCache that stores parsed versions of AggreGate expressions, i.e. instances
of abstract syntax trees. The caching is based on the fact that for every expression text there is only one parsed
abstract syntax tree, so the text can be used as a key of the cache and the root of the tree can be a value.| Constructor and Description |
|---|
ParsedExpressionCache() |
| Modifier and Type | Method and Description |
|---|---|
static ASTStart |
getCachedAstRoot(java.lang.String expressionText)
Tries to find corresponding parsed tree in the underlying cache and, if not found, transparently parses the
expression, enters the tree into the cache and returns the tree as it was stored in the cache before.
|
public static ASTStart getCachedAstRoot(java.lang.String expressionText) throws SyntaxErrorException
expressionText - the text of the expression to find corresponding AST forSyntaxErrorException - if the expression cannot be parsed due to a syntax error