Package org.apache.groovy.macrolib
Class MacroLibGroovyMethods
java.lang.Object
org.apache.groovy.macrolib.MacroLibGroovyMethods
Macro library helpers for string and named-value expansion.
- Since:
- 2.5.0
-
Method Summary
Modifier and TypeMethodDescriptionstatic <T> NamedValue<T>Runtime stub forNV(MacroContext, Expression).static ExpressionNV(MacroContext ctx, Expression exp) Builds aNamedValueexpression from the supplied expression.static <T> List<NamedValue<T>>Runtime stub forNVL(MacroContext, Expression...).static ExpressionNVL(MacroContext ctx, Expression... exps) Builds a list ofNamedValueexpressions from the supplied expressions.static GStringRuntime stub forSV(MacroContext, Expression...).static ExpressionSV(MacroContext ctx, Expression... exps) Builds a GString expression that labels each supplied expression with its source text.static GStringRuntime stub forSVD(MacroContext, Expression...).static ExpressionSVD(MacroContext ctx, Expression... exps) Builds a GString expression that labels each supplied expression with its dumped value.static GStringRuntime stub forSVI(MacroContext, Expression...).static ExpressionSVI(MacroContext ctx, Expression... exps) Builds a GString expression that labels each supplied expression with its inspected value.
-
Method Details
-
SV
Builds a GString expression that labels each supplied expression with its source text.- Parameters:
ctx- the current macro contextexps- the expressions to interpolate- Returns:
- the labeled GString expression
-
SV
Runtime stub forSV(MacroContext, Expression...).- Parameters:
self- the receiverargs- the interpolated values- Returns:
- never returns normally
-
SVI
Builds a GString expression that labels each supplied expression with its inspected value.- Parameters:
ctx- the current macro contextexps- the expressions to inspect- Returns:
- the labeled GString expression
-
SVI
Runtime stub forSVI(MacroContext, Expression...).- Parameters:
self- the receiverargs- the interpolated values- Returns:
- never returns normally
-
SVD
Builds a GString expression that labels each supplied expression with its dumped value.- Parameters:
ctx- the current macro contextexps- the expressions to dump- Returns:
- the labeled GString expression
-
SVD
Runtime stub forSVD(MacroContext, Expression...).- Parameters:
self- the receiverargs- the interpolated values- Returns:
- never returns normally
-
NV
Builds aNamedValueexpression from the supplied expression.- Parameters:
ctx- the current macro contextexp- the expression to wrap- Returns:
- the named-value expression
-
NV
Runtime stub forNV(MacroContext, Expression).- Type Parameters:
T- the value type- Parameters:
self- the receiverarg- the runtime value- Returns:
- never returns normally
-
NVL
Builds a list ofNamedValueexpressions from the supplied expressions.- Parameters:
ctx- the current macro contextexps- the expressions to wrap- Returns:
- the list expression
-
NVL
Runtime stub forNVL(MacroContext, Expression...).- Type Parameters:
T- the value type- Parameters:
self- the receiverargs- the runtime values- Returns:
- never returns normally
-