org.apache.commons.discovery.jdk

Class JDKHooks


public abstract class JDKHooks
extends java.lang.Object

Author:
Richard A. Sitze

Constructor Summary

JDKHooks()

Method Summary

static JDKHooks
getJDKHooks()
Return singleton object representing JVM hooks/tools.
Enumeration
getResources(ClassLoader loader, String resourceName)
ClassLoader
getSystemClassLoader()
The system class loader is available for JDK 1.2 or later, if certain security conditions are met.
ClassLoader
getThreadContextClassLoader()
The thread context class loader is available for JDK 1.2 or later, if certain security conditions are met.

Constructor Details

JDKHooks

protected JDKHooks()

Method Details

getJDKHooks

public static final JDKHooks getJDKHooks()
Return singleton object representing JVM hooks/tools. TODO: add logic to detect JDK level.


getResources

public Enumeration getResources(ClassLoader loader,
                                String resourceName)
            throws IOException


getSystemClassLoader

public ClassLoader getSystemClassLoader()
The system class loader is available for JDK 1.2 or later, if certain security conditions are met.

Returns:
The system class loader, if available. Otherwise return null.


getThreadContextClassLoader

public ClassLoader getThreadContextClassLoader()
The thread context class loader is available for JDK 1.2 or later, if certain security conditions are met.

Returns:
The thread context class loader, if available. Otherwise return null.


Copyright (c) 2002 - Apache Software Foundation