com.bc.jexp.impl
Class NamespaceImpl

java.lang.Object
  extended by com.bc.jexp.impl.NamespaceImpl
All Implemented Interfaces:
Namespace, WritableNamespace
Direct Known Subclasses:
DefaultNamespace

public class NamespaceImpl
extends Object
implements WritableNamespace

Provides an implementation of the Namespace interface.

Version:
$Revision$ $Date$
Author:
Norman Fomferra (norman.fomferra@brockmann-consult.de)

Constructor Summary
NamespaceImpl()
           
NamespaceImpl(Namespace defaultNamespace)
           
 
Method Summary
 void deregisterFunction(Function function)
           
 void deregisterSymbol(Symbol symbol)
           
 Function[] getAllFunctions()
           
 Symbol[] getAllSymbols()
           
 Namespace getDefaultNamespace()
           
 void registerFunction(Function function)
           
 void registerSymbol(Symbol symbol)
           
 Function resolveFunction(String name, Term[] args)
          Resolves the given name and argument list in order to find a matching function.
 Symbol resolveSymbol(String name)
          Resolves the given name in order to find a matching symbol.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NamespaceImpl

public NamespaceImpl()

NamespaceImpl

public NamespaceImpl(Namespace defaultNamespace)
Method Detail

getDefaultNamespace

public final Namespace getDefaultNamespace()

registerSymbol

public final void registerSymbol(Symbol symbol)
Specified by:
registerSymbol in interface WritableNamespace

deregisterSymbol

public final void deregisterSymbol(Symbol symbol)
Specified by:
deregisterSymbol in interface WritableNamespace

resolveSymbol

public final Symbol resolveSymbol(String name)
Description copied from interface: Namespace
Resolves the given name in order to find a matching symbol.

Specified by:
resolveSymbol in interface Namespace
Parameters:
name - a symbol name
Returns:
the symbol or null if this namespace does not contain a corresponding symbol

registerFunction

public final void registerFunction(Function function)
Specified by:
registerFunction in interface WritableNamespace

deregisterFunction

public final void deregisterFunction(Function function)
Specified by:
deregisterFunction in interface WritableNamespace

resolveFunction

public final Function resolveFunction(String name,
                                      Term[] args)
Description copied from interface: Namespace
Resolves the given name and argument list in order to find a matching function.

Specified by:
resolveFunction in interface Namespace
Parameters:
name - a function name
args - the argument list
Returns:
the function or null if this namespace does not contain a corresponding function

getAllSymbols

public Symbol[] getAllSymbols()
Specified by:
getAllSymbols in interface WritableNamespace

getAllFunctions

public final Function[] getAllFunctions()
Specified by:
getAllFunctions in interface WritableNamespace


Copyright © 2002-2012 Brockmann Consult GmbH. All Rights Reserved.