use

Synopsis

EdgeSet use()
boolean use(String java.class)
boolean use(String java.class, String alias)
boolean use(String java.class, String alias, String library)

Description

Without parameters returns an EdgeSet whose domain are the name of available functions, and the range is the class file that implements that function.

If a class file is specified this must implement the ca.uwaterloo.cs.jgrok.lib.Function interface. This interface defines an invoke method to be executed when the function is invoked, and a usage method providing a synopsis of how the function might be used. If no alias is specified this class file must return a name.

If no library is specified then this function is added during the current scope of execution to the JGrok built in operators. Otherwise, the function is added to the named function library, and must then be invoked using the syntax "library.name(..)".

When a class file is specified this function returns true if the registration of the named function was successful, else false.

Example

>> use("ca.uwaterloo.cs.jgrok.lib.use", "functions")
true

See Also