Class FunctionalBIFAccess

java.lang.Object
ortus.boxlang.runtime.types.Function
ortus.boxlang.runtime.types.FunctionalBIFAccess
All Implemented Interfaces:
Serializable, IBoxRunnable, IFunctionRunnable, IType

public class FunctionalBIFAccess extends Function
I wrap up a functional call to a BIF, passing along the arguments passed to me
See Also:
  • Constructor Details

    • FunctionalBIFAccess

      public FunctionalBIFAccess(Key name)
      Constructor Create a new abstract function. There is no body to execute, just the metadata
  • Method Details

    • of

      public static FunctionalBIFAccess of(Key name)
    • getName

      public Key getName()
      Get the name of the function.
      Specified by:
      getName in class Function
      Returns:
      function name
    • getArguments

      public Argument[] getArguments()
      We return nothing here since the methos handle isn't resolved yet so we don't know what overloaded args we may have. We will resolve this when we actually call the method
      Specified by:
      getArguments in class Function
      Returns:
      array of arguments
    • getReturnType

      public String getReturnType()
      We don't actually know the return type of the method until we call it
      Specified by:
      getReturnType in class Function
      Returns:
      return type
    • getAnnotations

      public IStruct getAnnotations()
      Get any annotations declared for this function, both the @annotation syntax and inline.
      Specified by:
      getAnnotations in class Function
      Returns:
      function metadata
    • getDocumentation

      public IStruct getDocumentation()
      Get the contents of the documentation comment for this function.
      Specified by:
      getDocumentation in class Function
      Returns:
      function metadata
    • getAccess

      public Function.Access getAccess()
      Get access modifier of the function
      Specified by:
      getAccess in class Function
      Returns:
      function access modifier
    • _invoke

      public Object _invoke(FunctionBoxContext context)
      Implement this method to invoke the actual function logic
      Specified by:
      _invoke in class Function
      Parameters:
      context -
      Returns:
    • getRunnableCompileVersion

      public long getRunnableCompileVersion()
      Get the version of the BoxLang runtime
      Specified by:
      getRunnableCompileVersion in interface IBoxRunnable
      Specified by:
      getRunnableCompileVersion in class Function
    • getRunnableCompiledOn

      public LocalDateTime getRunnableCompiledOn()
      Get the date the template was compiled
      Specified by:
      getRunnableCompiledOn in interface IBoxRunnable
      Specified by:
      getRunnableCompiledOn in class Function
    • getRunnableAST

      public Object getRunnableAST()
      The AST (abstract syntax tree) of the runnable
      Specified by:
      getRunnableAST in interface IBoxRunnable
      Specified by:
      getRunnableAST in class Function
    • getImports

      public List<ImportDefinition> getImports()
      Description copied from interface: IBoxRunnable
      The imports for this runnable
    • getRunnablePath

      public ResolvedFilePath getRunnablePath()
      Description copied from interface: IBoxRunnable
      The path to the template
    • getSourceType

      public BoxSourceType getSourceType()
      Description copied from interface: IBoxRunnable
      The original source type
    • requiresStrictArguments

      public boolean requiresStrictArguments()
      True if the function requires strict arguments (basically a java method) or false if this is a Boxlang method which can accept additional arbitrary arguments
      Overrides:
      requiresStrictArguments in class Function
      Returns:
      true if strict arguments are required
    • canOutput

      public boolean canOutput(FunctionBoxContext context)
      If we are wrapping a BIF that outputs something, don't block it
      Overrides:
      canOutput in class Function
      Parameters:
      context - The context in which the function is being invoked
      Returns:
      Whether the function can output