public final class LibraryManager extends Object
Constructor and Description |
---|
LibraryManager() |
Modifier and Type | Method and Description |
---|---|
void |
addLibrary(String libraryClassname)
Add a library to the manager.
|
boolean |
contains(String library)
Check if a library is contained in the manager.
|
Prolog |
getEngine()
Get the engine referenced by the library manager.
|
Object[] |
getLibraries()
Get the libraries managed by the library manager.
|
boolean |
isLibraryLoaded(String libraryClassname)
Check if a library is loaded into the Prolog engine.
|
void |
loadLibrary(String library)
Load a library from the Library Manager into the engine.
|
void |
setEngine(Prolog engine)
Set the engine to be referenced by the library manager.
|
void |
unloadLibrary(String library)
Unload a library from the Library Manager out of the engine.
|
public void setEngine(Prolog engine)
engine
- The engine to be referenced by the library manager.public Prolog getEngine()
public boolean isLibraryLoaded(String libraryClassname)
libraryClassname
- The complete name of the library class to check.public void addLibrary(String libraryClassname) throws ClassNotFoundException, InvalidLibraryException
libraryClassname
- The name of the .class of the library to be added.ClassNotFoundException
- if the library class cannot be found.InvalidLibraryException
- if the library is not a valid tuProlog library.public Object[] getLibraries()
Object
s.public void loadLibrary(String library) throws InvalidLibraryException
library
- The library to be loaded into the engine.InvalidLibraryException
public void unloadLibrary(String library) throws InvalidLibraryException
library
- The library to be unloaded out of the engine.InvalidLibraryException
EngineRunningException
public boolean contains(String library)
library
- The name of the library we want to check the load status on.Copyright © 2015. All rights reserved.