Package org.apache.commons.discovery.jdk
Class JDK11Hooks
- java.lang.Object
-
- org.apache.commons.discovery.jdk.JDKHooks
-
- org.apache.commons.discovery.jdk.JDK11Hooks
-
public class JDK11Hooks extends JDKHooks
- Author:
- Richard A. Sitze
-
-
Constructor Summary
Constructors Constructor Description JDK11Hooks()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration
getResources(java.lang.ClassLoader loader, java.lang.String resourceName)
Implement ClassLoader.getResources for JDK 1.1 On JDK1.1 there is no getResources() method.java.lang.ClassLoader
getSystemClassLoader()
The system class loader is available for JDK 1.2 or later, if certain security conditions are met.java.lang.String
getSystemProperty(java.lang.String propName)
Get the system propertyjava.lang.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
-
-
-
-
Method Detail
-
getSystemProperty
public java.lang.String getSystemProperty(java.lang.String propName)
Get the system property- Specified by:
getSystemProperty
in classJDKHooks
- Parameters:
propName
- name of the property- Returns:
- value of the property
-
getThreadContextClassLoader
public java.lang.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 classJDKHooks
- Returns:
- The thread context class loader, if available. Otherwise return null.
-
getSystemClassLoader
public java.lang.ClassLoader getSystemClassLoader()
The system class loader is available for JDK 1.2 or later, if certain security conditions are met.- Specified by:
getSystemClassLoader
in classJDKHooks
- Returns:
- The system class loader, if available. Otherwise return null.
-
getResources
public java.util.Enumeration getResources(java.lang.ClassLoader loader, java.lang.String resourceName) throws java.io.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 classJDKHooks
- Throws:
java.io.IOException
-
-