public class CompilerTools extends Object
Constructor and Description |
---|
CompilerTools() |
Modifier and Type | Method and Description |
---|---|
static void |
expectType(ParserContext pCtx,
Accessor expression,
Class type,
boolean compileMode) |
static void |
expectType(ParserContext pCtx,
ASTNode node,
Class type,
boolean compileMode) |
static Accessor |
extractAccessor(ASTNode n) |
static Map<String,Function> |
extractAllDeclaredFunctions(CompiledExpression compile)
Returns an ordered Map of all functions declared within an compiled script.
|
static ASTLinkedList |
finalizePayload(ASTLinkedList astLinkedList,
boolean secondPassOptimization,
ParserContext pCtx)
Finalize the payload, by reducing any stack-based-operations to dedicated nodes where possible.
|
static Map<String,Object> |
getInjectedImports(VariableResolverFactory factory) |
static Class |
getReturnType(ASTIterator input,
boolean strongTyping) |
static Class |
getReturnTypeFromOp(int operation,
Class left,
Class right) |
static Number |
signNumber(Object number) |
public static ASTLinkedList finalizePayload(ASTLinkedList astLinkedList, boolean secondPassOptimization, ParserContext pCtx)
astLinkedList
- - AST to be optimized.secondPassOptimization
- - perform a second pass optimization to optimize boolean expressions.pCtx
- - The parser contextpublic static Class getReturnType(ASTIterator input, boolean strongTyping)
public static Map<String,Function> extractAllDeclaredFunctions(CompiledExpression compile)
compile
- public static void expectType(ParserContext pCtx, Accessor expression, Class type, boolean compileMode)
public static void expectType(ParserContext pCtx, ASTNode node, Class type, boolean compileMode)
public static Map<String,Object> getInjectedImports(VariableResolverFactory factory)
Copyright © 2001–2024 JBoss by Red Hat. All rights reserved.