Package: org.apache.groovy.macrolib

## [Java] Class MacroLibGroovyMethods

- org.apache.groovy.macrolib.MacroLibGroovyMethods

-     public final class MacroLibGroovyMethods
      extends Object

  Macro library helpers for string and named-value expansion.

  Since:
    2.5.0

- - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public static Expression` | `NV(MacroContext ctx, Expression exp)` Builds a NamedValue expression from the supplied expression.
    `<T>` | `public static NamedValue<T>` | `NV(Object self, T arg)` Runtime stub for NV(MacroContext, Expression).
    `` | `public static Expression` | `NVL(MacroContext ctx, Expression exps)` Builds a list of NamedValue expressions from the supplied expressions.
    `<T>` | `public static List<NamedValue<T>>` | `NVL(Object self, T args)` Runtime stub for NVL(MacroContext, Expression...).
    `` | `public static Expression` | `SV(MacroContext ctx, Expression exps)` Builds a GString expression that labels each supplied expression with its source text.
    `` | `public static GString` | `SV(Object self, Object args)` Runtime stub for SV(MacroContext, Expression...).
    `` | `public static Expression` | `SVD(MacroContext ctx, Expression exps)` Builds a GString expression that labels each supplied expression with its dumped value.
    `` | `public static GString` | `SVD(Object self, Object args)` Runtime stub for SVD(MacroContext, Expression...).
    `` | `public static Expression` | `SVI(MacroContext ctx, Expression exps)` Builds a GString expression that labels each supplied expression with its inspected value.
    `` | `public static GString` | `SVI(Object self, Object args)` Runtime stub for SVI(MacroContext, Expression...).

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### @Macro
      public static Expression NV(MacroContext ctx, Expression exp)

      Builds a NamedValue expression from the supplied expression.

      Parameters:
        `ctx` - the current macro context
        `exp` - the expression to wrap
      Returns:
        the named-value expression

    - #### <T> public static NamedValue<T> NV(Object self, T arg)

      Runtime stub for NV(MacroContext, Expression).

      Parameters:
        `self` - the receiver
        `arg` - the runtime value
      Type Parameters:
        `T` - the value type
      Returns:
        never returns normally

    - #### @Macro
      public static Expression NVL(MacroContext ctx, Expression exps)

      Builds a list of NamedValue expressions from the supplied expressions.

      Parameters:
        `ctx` - the current macro context
        `exps` - the expressions to wrap
      Returns:
        the list expression

    - #### <T> public static List<NamedValue<T>> NVL(Object self, T args)

      Runtime stub for NVL(MacroContext, Expression...).

      Parameters:
        `self` - the receiver
        `args` - the runtime values
      Type Parameters:
        `T` - the value type
      Returns:
        never returns normally

    - #### @Macro
      public static Expression SV(MacroContext ctx, Expression exps)

      Builds a GString expression that labels each supplied expression with its source text.

      Parameters:
        `ctx` - the current macro context
        `exps` - the expressions to interpolate
      Returns:
        the labeled GString expression

    - #### public static GString SV(Object self, Object args)

      Runtime stub for SV(MacroContext, Expression...).

      Parameters:
        `self` - the receiver
        `args` - the interpolated values
      Returns:
        never returns normally

    - #### @Macro
      public static Expression SVD(MacroContext ctx, Expression exps)

      Builds a GString expression that labels each supplied expression with its dumped value.

      Parameters:
        `ctx` - the current macro context
        `exps` - the expressions to dump
      Returns:
        the labeled GString expression

    - #### public static GString SVD(Object self, Object args)

      Runtime stub for SVD(MacroContext, Expression...).

      Parameters:
        `self` - the receiver
        `args` - the interpolated values
      Returns:
        never returns normally

    - #### @Macro
      public static Expression SVI(MacroContext ctx, Expression exps)

      Builds a GString expression that labels each supplied expression with its inspected value.

      Parameters:
        `ctx` - the current macro context
        `exps` - the expressions to inspect
      Returns:
        the labeled GString expression

    - #### public static GString SVI(Object self, Object args)

      Runtime stub for SVI(MacroContext, Expression...).

      Parameters:
        `self` - the receiver
        `args` - the interpolated values
      Returns:
        never returns normally