Interface Macro

All Superinterfaces:
Callable
All Known Implementing Classes:
BuiltinFunctions.AbstractMacro, BuiltinFunctions.Fallback, ExperimentalModule.GroupBy

public interface Macro extends Callable
Interface implemented by all macros. A macro is like a function, except that it controls the evaluation of its arguments itself. That allows it to do things that an ordinary function cannot do. Macros are an internal feature for now.
  • Method Summary

    Modifier and Type
    Method
    Description
    com.fasterxml.jackson.databind.JsonNode
    call(Scope scope, com.fasterxml.jackson.databind.JsonNode input, ExpressionNode[] parameters)
    Invokes the macro, which can then modify the input node and evaluate the parameters as needed.

    Methods inherited from interface com.schibsted.spt.data.jslt.Callable

    getMaxArguments, getMinArguments, getName
  • Method Details

    • call

      com.fasterxml.jackson.databind.JsonNode call(Scope scope, com.fasterxml.jackson.databind.JsonNode input, ExpressionNode[] parameters)
      Invokes the macro, which can then modify the input node and evaluate the parameters as needed.