public class BuiltinRegistry extends Object
This is currently implemented as a singleton to simply any future move to support different sets of builtins.
Modifier and Type | Field and Description |
---|---|
static BuiltinRegistry |
theRegistry
The single global static registry
|
Constructor and Description |
---|
BuiltinRegistry()
Construct an empty registry
|
Modifier and Type | Method and Description |
---|---|
Builtin |
getImplementation(String functor)
Find the implementation of the given builtin functor.
|
Builtin |
getImplementationByURI(String uri)
Find the implementation of the given builtin functor.
|
void |
register(Builtin impl)
Register an implementation for a given builtin using its default name.
|
void |
register(String functor,
Builtin impl)
Register an implementation for a given builtin functor.
|
public static BuiltinRegistry theRegistry
public void register(String functor, Builtin impl)
functor
- the name of the functor used to invoke the builtinimpl
- the implementation of the builtinpublic void register(Builtin impl)
impl
- the implementation of the builtinpublic Builtin getImplementation(String functor)
functor
- the name of the functor being invoked.Copyright ? 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Hewlett-Packard Development Company, LP