@Incubating
public enum MacroBuilder
| Enum constant | Description |
|---|---|
INSTANCE |
Shared macro builder instance. |
| Type Params | Return Type | Name and description |
|---|---|---|
|
public static ASTNode |
getMacroValue(BlockStatement closureBlock, boolean asIs)Extracts the value represented by a parsed macro closure. |
<T> |
public T |
macro(String source, List<Closure<Expression>> context, Class<T> resultClass)Builds a macro value from source text using the conversion phase. |
<T> |
public T |
macro(boolean asIs, String source, List<Closure<Expression>> context, Class<T> resultClass)Builds a macro value from source text using the conversion phase. |
<T> |
public T |
macro(CompilePhase compilePhase, String source, List<Closure<Expression>> context, Class<T> resultClass)Builds a macro value from source text at the supplied compile phase. |
<T> |
public T |
macro(CompilePhase compilePhase, boolean asIs, String source, List<Closure<Expression>> context, Class<T> resultClass)Builds a macro value from source text. |
Shared macro builder instance.
Extracts the value represented by a parsed macro closure.
closureBlock - the parsed closure blockasIs - whether to keep a single-statement closure as a blockBuilds a macro value from source text using the conversion phase.
source - the source to parsecontext - the substitution closures used for $v placeholdersresultClass - the expected result typeT - the expected result typeBuilds a macro value from source text using the conversion phase.
asIs - whether to keep a single-statement closure as a blocksource - the source to parsecontext - the substitution closures used for $v placeholdersresultClass - the expected result typeT - the expected result typeBuilds a macro value from source text at the supplied compile phase.
compilePhase - the phase to use when parsing the sourcesource - the source to parsecontext - the substitution closures used for $v placeholdersresultClass - the expected result typeT - the expected result typeBuilds a macro value from source text.
compilePhase - the phase to use when parsing the source, or null for conversionasIs - whether to keep a single-statement closure as a blocksource - the source to parsecontext - the substitution closures used for $v placeholdersresultClass - the expected result typeT - the expected result typeCopyright © 2003-2026 The Apache Software Foundation. All rights reserved.