|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
java.security.SecureClassLoader
java.net.URLClassLoader
org.eclipse.amp.escape.ide.ProjectLoader
public class ProjectLoader
Provides class loading for a project, with a fall back to the main
class-loader for all other classes. Overriding a specific class loader seems
to be the only model that works. Decorator pattern does not find new classes.
Resources (such as the 'About this model' file displayed by InfoView
)
can be placed in the same folder as their class, or in a placed in a "res"
source folder in the model project directory in a parallel directory path to
the Java class package. For example, an about file for a model defined by the
scape "edu.brook.norms.Norms" could be placed at
"res/edu/brook/norms/AboutNorms.html".
Constructor Summary | |
---|---|
ProjectLoader(org.eclipse.core.resources.IProject project)
Instantiates a new project loader. |
Method Summary | |
---|---|
java.lang.Class<?> |
loadClass(java.lang.String name)
|
void |
restore()
Restore. |
Methods inherited from class java.net.URLClassLoader |
---|
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance |
Methods inherited from class java.security.SecureClassLoader |
---|
defineClass, defineClass |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ProjectLoader(org.eclipse.core.resources.IProject project) throws LoaderCreationException, java.net.MalformedURLException
project
- the project
LoaderCreationException
- the loader creation exception
java.net.MalformedURLException
- if can't get URL to project resource dirMethod Detail |
---|
public void restore()
public java.lang.Class<?> loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |