gnu.jel.TableKeeper Maven / Gradle / Ivy
/* -*- Mode: Java; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*-
* $Id: TableKeeper.java 490 2006-10-01 16:08:04Z metlov $
*
* This file is part of the Java Expressions Library (JEL).
* For more information about JEL visit :
* http://kinetic.ac.donetsk.ua/JEL/
*
* (c) 1998 -- 2007 by Konstantin Metlov([email protected]);
*
* JEL is Distributed under the terms of GNU General Public License.
* This code comes with ABSOLUTELY NO WARRANTY.
* For license details see COPYING file in this directory.
*/
package gnu.jel;
import java.util.*;
import java.io.*;
import gnu.jel.debug.Debug;
public class TableKeeper {
private static final Hashtable tables;
private static final ResourceBundle msgs;
static {
Hashtable temp=new Hashtable();
PropertyResourceBundle resB=null;
try {
Class c=Class.forName("gnu.jel.DVMap");
// Read messages
resB=
new PropertyResourceBundle(c.getResourceAsStream("JEL.properties"));
// Read tables
ObjectInputStream ios=
new ObjectInputStream(c.getResourceAsStream("tables.dat"));
temp=(Hashtable)ios.readObject();
// work around the serialization bug that classes representing the
// primitive types can be serialized but can not be deserealized
String[] specialTypesStr=(String[]) temp.get("specialTypes");
String[] specialClassesAddStr=(String[]) temp.get("specialClasses");
Class[] specialTypes=new Class[specialTypesStr.length];
Class[] specialClasses=new Class[specialTypesStr.length+
specialClassesAddStr.length];
for(int i=10; i
© 2015 - 2025 Weber Informatics LLC | Privacy Policy