dblevins 2005/07/06 19:42:08
Modified: modules/core/src/java/org/openejb/util ClasspathUtils.java
Log:
Small step in the ClasspathUtils/Loader refactor.
Revision Changes Path
1.12 +13 -17
openejb1/modules/core/src/java/org/openejb/util/ClasspathUtils.java
Index: ClasspathUtils.java
===================================================================
RCS file:
/home/projects/openejb/scm/openejb1/modules/core/src/java/org/openejb/util/ClasspathUtils.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- ClasspathUtils.java 6 Jul 2005 02:04:04 -0000 1.11
+++ ClasspathUtils.java 6 Jul 2005 23:42:08 -0000 1.12
@@ -56,13 +56,13 @@
*/
public class ClasspathUtils {
- private static Loader tomcatLoader = new ClasspathUtils().new
TomcatLoader();
+ public static Loader tomcatLoader = new ClasspathUtils().new
TomcatLoader();
- private static Loader webappLoader = new ClasspathUtils().new
WebAppLoader();
+ public static Loader webappLoader = new ClasspathUtils().new
WebAppLoader();
- private static Loader sysLoader = new ClasspathUtils().new
SystemLoader();
+ public static Loader sysLoader = new ClasspathUtils().new SystemLoader();
- private static Loader ctxLoader = new ClasspathUtils().new
ContextLoader();
+ public static Loader ctxLoader = new ClasspathUtils().new
ContextLoader();
public static void addJarToPath(String jar) throws Exception {
addJarToPath(FileUtils.getHome().getFile(jar));
@@ -172,7 +172,7 @@
}
}
- protected static Loader getLoader(String name) {
+ public static Loader getLoader(String name) {
if (name.equalsIgnoreCase("tomcat")) {
return tomcatLoader;
@@ -191,17 +191,13 @@
}
}
- public static void rebuildJavaClassPathVariable() throws Exception {
-
- }
-
- interface Loader {
+ public interface Loader {
public void addJarsToPath(File dir) throws Exception;
public void addJarToPath(URL dir) throws Exception;
}
- class BasicURLLoader implements Loader {
+ public class BasicURLLoader implements Loader {
public void addJarsToPath(File dir) throws Exception {
}
@@ -266,7 +262,7 @@
/*-------------------------------------------------------*/
/* System ClassLoader Support */
/*-------------------------------------------------------*/
- class SystemLoader extends BasicURLLoader {
+ public class SystemLoader extends BasicURLLoader {
private URLClassLoader sysLoader;
@@ -320,7 +316,7 @@
/*-------------------------------------------------------*/
/* Thread Context ClassLoader Support */
/*-------------------------------------------------------*/
- class ContextLoader extends BasicURLLoader {
+ public class ContextLoader extends BasicURLLoader {
public void addJarsToPath(File dir) throws Exception {
ClassLoader contextClassLoader =
ClasspathUtils.getContextClassLoader();
@@ -342,7 +338,7 @@
/*-------------------------------------------------------*/
/* Tomcat ClassLoader Support */
/*-------------------------------------------------------*/
- class TomcatLoader extends BasicURLLoader {
+ public class TomcatLoader extends BasicURLLoader {
/**
* The Tomcat Common ClassLoader
@@ -482,7 +478,7 @@
}
}
- class WebAppLoader extends TomcatLoader {
+ public class WebAppLoader extends TomcatLoader {
ClassLoader webappLoader;
protected ClassLoader getCommonLoader() {
@@ -493,7 +489,7 @@
}
}
- protected static ClassLoader getContextClassLoader() {
+ public static ClassLoader getContextClassLoader() {
return (ClassLoader) java.security.AccessController.doPrivileged(new
java.security.PrivilegedAction() {
public Object run() {
return Thread.currentThread().getContextClassLoader();