Class AbstractFunctionCallFlux

All Implemented Interfaces:
Expression, HasImports, IsVariableAssignment

public abstract class AbstractFunctionCallFlux extends AbstractParametrizedFlux implements IsVariableAssignment
Base class defining a function invocation.

Example

  public static class MyCustomFunctionCall extends AbstractFunctionCallFlux {
     public MyCustomFunctionCall(@Nonnull String name) {
         super(name);
     }

     public MyCustomFunctionCall withN(final String n) {
         this.withPropertyValueEscaped("n", n);
         return this;
     }
 }
 
  • Constructor Details

    • AbstractFunctionCallFlux

      protected AbstractFunctionCallFlux(@Nonnull String name)
      Will be called by the AbstractFunctionFlux.invoke() method of the function definition.
      Parameters:
      name - the name of the variable holding the implementation of the function
  • Method Details

    • getVariableName

      @Nonnull public String getVariableName()
      Specified by:
      getVariableName in interface IsVariableAssignment
      Returns:
      the name of the variable
    • operatorName

      @Nonnull protected String operatorName()
      Specified by:
      operatorName in class AbstractParametrizedFlux
      Returns:
      name of function
    • toString

      public String toString(@Nonnull Map<String,Object> parameters, boolean prependImports)
      Specified by:
      toString in interface Expression
      Overrides:
      toString in class Flux
      Parameters:
      parameters - parameters to resolve
      prependImports - true, if the imports should be prepended
      Returns:
      the string representation of the expression
    • collectImports

      public void collectImports(@Nonnull Set<String> collectedImports)
      Description copied from class: Flux
      Collects all imports of the flux.
      Overrides:
      collectImports in class Flux
      Parameters:
      collectedImports - a set to be filled by the used imports