Interface CelMacroExpander

  • Functional Interface:
    This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

    @FunctionalInterface
    @Immutable
    public interface CelMacroExpander
    Converts the target and arguments of a function call that matches a macro.
    • Method Detail

      • expandMacro

        java.util.Optional<CelExpr> expandMacro​(CelMacroExprFactory exprFactory,
                                                CelExpr target,
                                                com.google.common.collect.ImmutableList<CelExpr> arguments)
        Converts a call and its associated arguments into a new CEL AST.
        Parameters:
        exprFactory - Expression factory to assist with expansion of this macro.
        target - Target expression which the macro is being invoked on. Default instance of Expr is provided instead for global macros.
        arguments - Arguments of the call
        Returns:
        A newly generated CEL AST. Implementations may return Optional.Empty instead to signal that an expansion is not needed.