From: bobl@conceptsdyn.com (Bob Leurck) Newsgroups: comp.databases.informix Subject: Java for 3.0 Includes Date: Wed, 23 Jul 1997 21:40:06 GMT Below is a java program that determines if your 4GL program requires an include file from your own libraries. It is useful as an educational program . We are using it to port from 3.11 to 95 . The basic design is to build lists of functions by library, as well as the locally defined functions in the project and finally a list of symbols used in the program. The symbol list is compared to each library function list and if a function from the library is used and not locally overriden , then the libray is added to the programs include list. The program uses, File, StingTokenizer, and Hashtable classes as well as the regular expression libraries of Steve Brandt http://www.win.net/~stevesoft/pat . package origjava.jdbctest; import COM.stevesoft.pat.Regex; import COM.stevesoft.pat.RegRes; import COM.stevesoft.pat.FileRegex; import COM.stevesoft.pat.Pattern; import java.io.*; import java.awt.*; import java.awt.event.*; import java.util.Vector; import java.util.Hashtable; import java.util.StringTokenizer; import java.util.Enumeration; import java.applet.Applet; public class Funclist extends Applet { public void init() {} public void start() {} public void stop() {} public static void main( String[] args ) { new DoFuncList(); } } class DoFuncList extends Object { public DoFuncList() { //theFilter = "lowlevel.4gl"; init(); } public void init() { buildLocalFunctList(); buildSPHash(); buildRPTHash(); buildCMHash(); buildGLHash(); buildEXHash(); doAllFilesIndicated(); if (out != null ) out.close(); } public void buildLocalFunctList() { String dpat = theFilter;//t2.getText(); String[] files = FileRegex.list(dpat); for(int i=0;i