Class BaseFEELFunction

    • Constructor Summary

      Constructors 
      Constructor Description
      BaseFEELFunction​(java.lang.String name)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Returns the name of the function
      java.util.List<java.util.List<FEELFunction.Param>> getParameters()
      Returns the parameter for each supported signature.
      Symbol getSymbol()
      Returns the Symbol of the function
      java.lang.Object invoke​(EvaluationContext ctx, java.lang.Object[] params)
      this method should be overriden by custom function implementations that should be invoked reflectively
      java.lang.Object invokeReflectively​(EvaluationContext ctx, java.lang.Object[] params)
      Invokes the function reflectively based on the parameters
      protected boolean isCustomFunction()  
      void setName​(java.lang.String name)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • BaseFEELFunction

        public BaseFEELFunction​(java.lang.String name)
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from interface: FEELFunction
        Returns the name of the function
        Specified by:
        getName in interface FEELFunction
        Returns:
      • setName

        public void setName​(java.lang.String name)
      • invokeReflectively

        public java.lang.Object invokeReflectively​(EvaluationContext ctx,
                                                   java.lang.Object[] params)
        Description copied from interface: FEELFunction
        Invokes the function reflectively based on the parameters
        Specified by:
        invokeReflectively in interface FEELFunction
        Returns:
      • invoke

        public java.lang.Object invoke​(EvaluationContext ctx,
                                       java.lang.Object[] params)
        this method should be overriden by custom function implementations that should be invoked reflectively
        Parameters:
        ctx -
        params -
        Returns:
      • getParameters

        public java.util.List<java.util.List<FEELFunction.Param>> getParameters()
        Description copied from interface: FEELFunction
        Returns the parameter for each supported signature.
        Specified by:
        getParameters in interface FEELFunction
        Returns:
        a List of Lists of Strings with the parameters. For a function with multiple signatures, each element of the list returns the parameters of one signature. E.g.: the substring function has 2 supported signatures: substring( string, start position ) substring( string, start position, length ) So this method will return: { { "string", "start position" }, { "string", "start position", "length" } }
      • isCustomFunction

        protected boolean isCustomFunction()