|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.svincent.moksa.WamObject
|
+--com.svincent.moksa.PrologPackageManager
Manages Prolog source.
Currently operates on a "class path" concept, with no versioning, and thus, all the same issues as the normal Java classloader has.
By default, the prolog path includes the Java CLASSPATH, as well as searching in the 'library' subdirectory of the installation directory.
| Inner Class Summary | |
static class |
PrologPackageManager.PrologClassLoader
|
| Constructor Summary | |
PrologPackageManager(PrologEngine _engine)
|
|
| Method Summary | |
void |
addDirs(java.lang.String path)
Add all the directories (and archive files) in the given path to the Prolog search path. |
void |
addJarDirs(java.lang.String path)
Add all the archive files in the directories in the given path to the Prolog search path. |
static java.lang.String |
calculateClassName(java.lang.String prologSourceName)
|
java.io.File |
findClass(java.lang.String className)
Find the location of the file corresponding to the given class in the current prolog search path. |
java.io.File |
findFile(java.lang.String fileName)
Find the first file with the given name in the path, return it. |
java.io.File |
findModule(java.lang.String moduleName)
Finds a Prolog module. |
void |
loadModule(PrologEngine engine,
PrologParser parser,
java.lang.String moduleName)
|
void |
loadModule(PrologEngine engine,
java.lang.String moduleName)
Loads the given filename into the given PrologEngine. |
static void |
main(java.lang.String[] args)
|
static void |
readProlog(PrologEngine engine,
PrologParser parser,
java.lang.String fileName)
|
| Methods inherited from class com.svincent.moksa.WamObject |
tag,
tag |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public PrologPackageManager(PrologEngine _engine)
| Method Detail |
public java.io.File findModule(java.lang.String moduleName)
Finds a Prolog module. It can either return a class file or a Prolog source file, depending on the ages of the relative files.
public java.io.File findClass(java.lang.String className)
public java.io.File findFile(java.lang.String fileName)
public void addDirs(java.lang.String path)
public void addJarDirs(java.lang.String path)
public static void main(java.lang.String[] args)
public void loadModule(PrologEngine engine,
java.lang.String moduleName)
throws PrologException
public void loadModule(PrologEngine engine,
PrologParser parser,
java.lang.String moduleName)
throws PrologException
public static java.lang.String calculateClassName(java.lang.String prologSourceName)
public static void readProlog(PrologEngine engine,
PrologParser parser,
java.lang.String fileName)
throws PrologException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
This is documentation for Moksa Prolog, which can be found at http://www.svincent.com/moksa/
Copyright © 1999 Shawn P. Vincent.
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.