org.apache.commons.discovery.jdk
Class JDK11Hooks

java.lang.Object
  extended by org.apache.commons.discovery.jdk.JDKHooks
      extended by org.apache.commons.discovery.jdk.JDK11Hooks

public class JDK11Hooks
extends JDKHooks

Author:
Richard A. Sitze

Constructor Summary
JDK11Hooks()
           
 
Method Summary
 Enumeration getResources(ClassLoader loader, String resourceName)
          Implement ClassLoader.getResources for JDK 1.1 On JDK1.1 there is no getResources() method.
 ClassLoader getSystemClassLoader()
          The system class loader is available for JDK 1.2 or later, if certain security conditions are met.
 String getSystemProperty(String propName)
          Get the system property
 ClassLoader getThreadContextClassLoader()
          The thread context class loader is available for JDK 1.2 or later, if certain security conditions are met.
 
Methods inherited from class org.apache.commons.discovery.jdk.JDKHooks
getJDKHooks
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDK11Hooks

public JDK11Hooks()
Method Detail

getSystemProperty

public String getSystemProperty(String propName)
Get the system property

Specified by:
getSystemProperty in class JDKHooks
Parameters:
propName - name of the property
Returns:
value of the property

getThreadContextClassLoader

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

Specified by:
getThreadContextClassLoader in class JDKHooks
Returns:
The thread context class loader, if available. Otherwise return null.

getSystemClassLoader

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

Specified by:
getSystemClassLoader in class JDKHooks
Returns:
The system class loader, if available. Otherwise return null.

getResources

public Enumeration getResources(ClassLoader loader,
                                String resourceName)
                         throws IOException
Implement ClassLoader.getResources for JDK 1.1 On JDK1.1 there is no getResources() method. We emulate this by using introspection and doing the lookup ourself, using the list of URLs, via getURLs().

Specified by:
getResources in class JDKHooks
Throws:
IOException


Copyright © 2002-2010 Apache Software Foundation. All Rights Reserved.