|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader java.security.SecureClassLoader java.net.URLClassLoader project35.system.ModelClassLoader
public class ModelClassLoader
A class loader that looks in the model directory's "lib" directory for class files. Scans for *.class and *.jar files.
Copyright (c) Kevin Garwood and University of Manchester 2007. All rights reserved. Licensed under the Academic Free License version 3.0. For more information on the terms and conditions, please see the file "LICENSE" that is included in this distribution.
Constructor Summary | |
---|---|
ModelClassLoader()
constructor |
Method Summary | |
---|---|
java.lang.Object |
getInstance(java.lang.String className)
convenience method to get an instance of a class by the given class name |
static ModelClassLoader |
getModelClassLoader()
instantiation is done through this method only, to ensure that only one instance of the class is created |
java.lang.Class |
loadClass(java.lang.String className)
|
void |
loadModelClasses(java.net.URL libraryDirectoryURL)
loads class and jar files found in the model directory "lib" folder eg: project35/dist/models/tutorial/lib |
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 ModelClassLoader()
Method Detail |
---|
public static ModelClassLoader getModelClassLoader()
public void loadModelClasses(java.net.URL libraryDirectoryURL) throws Project35Exception
Project35Exception
public java.lang.Class loadClass(java.lang.String className) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public java.lang.Object getInstance(java.lang.String className) throws Project35Exception
className
- the fully qualified class name
Project35Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |