Class BuiltinRegistry

    • Constructor Summary

      Constructors 
      Constructor Description
      BuiltinRegistry()  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      abstract Builtin getImplementation​(java.lang.String functor)
      Find the implementation of the given builtin functor.
      abstract Builtin getImplementationByURI​(java.lang.String uri)
      Find the implementation of the given builtin functor.
      abstract void register​(java.lang.String functor, Builtin impl)
      Register an implementation for a given builtin functor.
      abstract void register​(Builtin impl)
      Register an implementation for a given builtin using its default name.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • theRegistry

        public static BuiltinRegistry theRegistry
        The default base registry
    • Constructor Detail

      • BuiltinRegistry

        public BuiltinRegistry()
    • Method Detail

      • register

        public abstract void register​(Builtin impl)
        Register an implementation for a given builtin using its default name.
        Parameters:
        impl - the implementation of the builtin
      • register

        public abstract void register​(java.lang.String functor,
                                      Builtin impl)
        Register an implementation for a given builtin functor.
        Parameters:
        functor - the name of the functor used to invoke the builtin
        impl - the implementation of the builtin
      • getImplementation

        public abstract Builtin getImplementation​(java.lang.String functor)
        Find the implementation of the given builtin functor.
        Parameters:
        functor - the name of the functor being invoked.
        Returns:
        a Builtin or null if there is none registered under that name
      • getImplementationByURI

        public abstract Builtin getImplementationByURI​(java.lang.String uri)
        Find the implementation of the given builtin functor.
        Parameters:
        uri - the URI of the builtin to be retrieved
        Returns:
        a Builtin or null if there is none registered under that name