public interface ExtensionManager
ExtensionManager
provides some methods that can be used in runOnce
Method Summary | |
---|---|
void |
addToLibraryPath(Object classManager,
String directory)
|
boolean |
anyExtensionsLoaded()
Returns true if any extensions have been imported in the current model, false otherwise. |
String |
dumpExtensionPrimitives()
|
String |
dumpExtensions()
|
void |
finishFullCompilation()
Instructs any extensions which haven't been re-imported during the current compile to shut down. |
List<String> |
getExtensionNames()
|
File |
getFile(String path)
|
List<String> |
getJarPaths()
|
String |
getSource(String filename)
|
void |
importExtension(String jarPath,
ErrorSource errors)
Loads the extension contained in the jar at jarPath. |
ExtensionObject |
readExtensionObject(String extname,
String typeName,
String value)
|
Object |
readFromString(String src)
|
Primitive |
replaceIdentifier(String name)
Returns the identifier "name" by its imported implementation, if any, or null, if not. |
void |
reset()
Instructs any loaded extensions to unload. |
String |
resolvePath(String path)
|
String |
resolvePathAsURL(String path)
|
Object |
retrieveObject()
Returns the stored object. |
void |
startFullCompilation()
During compilation, we reach the extensions [ ... ] block. |
void |
storeObject(Object obj)
Stores an object for the extension that can be retrieved in runOnce if the extension is loaded again. |
Method Detail |
---|
void storeObject(Object obj)
obj
- the object to be storedObject retrieveObject()
ExtensionObject readExtensionObject(String extname, String typeName, String value) throws CompilerException
CompilerException
Object readFromString(String src) throws CompilerException
CompilerException
void reset()
void startFullCompilation()
void finishFullCompilation()
boolean anyExtensionsLoaded()
Primitive replaceIdentifier(String name)
void importExtension(String jarPath, ErrorSource errors) throws CompilerException
jarPath
- the path to the extension jar. May be relative to the
current model directory.errors
- the ErrorSource to use when a CompilerException needs
to be thrown.
CompilerException
String resolvePath(String path)
String resolvePathAsURL(String path)
String dumpExtensions()
String dumpExtensionPrimitives()
String getSource(String filename) throws IOException
IOException
void addToLibraryPath(Object classManager, String directory)
File getFile(String path) throws ExtensionException
ExtensionException
List<String> getJarPaths()
List<String> getExtensionNames()