org.fraid.interpreter.symbtable
Class SymbolTable

java.lang.Object
  extended by java.util.Dictionary<K,V>
      extended by java.util.Hashtable<java.lang.String,ComplexFunction>
          extended by org.fraid.interpreter.symbtable.SymbolTable
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.util.Map<java.lang.String,ComplexFunction>

public class SymbolTable
extends java.util.Hashtable<java.lang.String,ComplexFunction>

This is Fraid's symbol table. A singleton (no matter how many parsers are working or being created later).

See Also:
Serialized Form

Nested Class Summary
static class SymbolTable.Factory
          The factory to get a copy.
 
Method Summary
static java.lang.Object createObject(java.lang.String className)
          Helper.
 int loadFromDirTree(java.io.File aStartDir)
           
 int loadFromFunctionsDir(java.io.File aFunctDir, java.io.File aStartDir)
           
 int loadFromJar(java.io.File aJar)
           
 int loadFromJarDir(java.io.File aJarDir)
           
 int loadStaticSymbols(java.io.InputStream aSerializedStaticSymbols, boolean aThisIsUnload)
          Describe loadStaticSymbols method here.
static void main(java.lang.String[] args)
          Test driver.
protected  void processLoadUnload(java.lang.String aFunctionClassName, boolean aThisIsUnload)
          Helper.
 int removeChangeListener(javax.swing.event.ChangeListener aListener)
          Removes a previously added change listener.
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keys, keySet, put, putAll, rehash, remove, size, toString, values
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

loadFromDirTree

public int loadFromDirTree(java.io.File aStartDir)
                    throws java.lang.Exception
Throws:
java.lang.Exception

loadFromFunctionsDir

public int loadFromFunctionsDir(java.io.File aFunctDir,
                                java.io.File aStartDir)
                         throws java.lang.Exception
Throws:
java.lang.Exception

loadFromJar

public int loadFromJar(java.io.File aJar)
                throws java.lang.Exception
Throws:
java.lang.Exception

loadFromJarDir

public int loadFromJarDir(java.io.File aJarDir)
                   throws java.lang.Exception
Throws:
java.lang.Exception

loadStaticSymbols

public int loadStaticSymbols(java.io.InputStream aSerializedStaticSymbols,
                             boolean aThisIsUnload)
                      throws java.lang.Exception
Describe loadStaticSymbols method here.

Parameters:
aSerializedStaticSymbols - an InputStream value
aThisIsUnload - a boolean value
Returns:
an int value
Throws:
java.lang.Exception - if an error occurs

processLoadUnload

protected void processLoadUnload(java.lang.String aFunctionClassName,
                                 boolean aThisIsUnload)
                          throws SymbTableException
Helper.

Parameters:
aFunction - a ComplexFunction value
aThisIsUnload - a boolean value
Throws:
SymbTableException - if an error occurs

createObject

public static java.lang.Object createObject(java.lang.String className)
                                     throws java.lang.InstantiationException,
                                            java.lang.IllegalAccessException,
                                            java.lang.ClassNotFoundException,
                                            java.lang.NoClassDefFoundError
Helper.

Parameters:
className - a String value
Returns:
an Object value
Throws:
java.lang.InstantiationException - if an error occurs
java.lang.IllegalAccessException - if an error occurs
java.lang.ClassNotFoundException - if an error occurs
java.lang.NoClassDefFoundError

removeChangeListener

public int removeChangeListener(javax.swing.event.ChangeListener aListener)
Removes a previously added change listener.

Parameters:
aListener - a ChangeListener value
Returns:
an int value

main

public static void main(java.lang.String[] args)
                 throws java.lang.Exception
Test driver.

Parameters:
args - a String[] value
Throws:
java.lang.Exception - if an error occurs


Fraid (system and language). (C) 2003-2007 Ivaylo Iliev
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.