Interface AFunction

All Known Implementing Classes:
Function

public interface AFunction
Interface for built-in functions.
Author:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    args(Object... args)
    Returns a string representation of the function with the specified arguments (see FuncDefinition).
    default String
    Returns the class name of a function implementation.
    Returns the function definition.
    default StandardFunc
    get(StaticContext sc, InputInfo ii, Expr... args)
    Creates a new instance of the function.
    default boolean
    is(Expr ex)
    Checks if the specified expression is an instance of this function.
  • Method Details

    • definition

      FuncDefinition definition()
      Returns the function definition.
      Returns:
      definition
    • get

      default StandardFunc get(StaticContext sc, InputInfo ii, Expr... args)
      Creates a new instance of the function.
      Parameters:
      sc - static context
      ii - input info
      args - function arguments
      Returns:
      function
    • is

      default boolean is(Expr ex)
      Checks if the specified expression is an instance of this function.
      Parameters:
      ex - expression
      Returns:
      result of check
    • args

      default String args(Object... args)
      Returns a string representation of the function with the specified arguments (see FuncDefinition).
      Parameters:
      args - arguments
      Returns:
      string representation with leading space (simplifies nesting of returned string)
    • className

      default String className()
      Returns the class name of a function implementation. Only called by tests.
      Returns:
      class name