Package org.apache.commons.discovery.jdk
Class JDK12Hooks
java.lang.Object
org.apache.commons.discovery.jdk.JDKHooks
org.apache.commons.discovery.jdk.JDK12Hooks
JDK 1.2 Style Hooks implementation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetResources
(ClassLoader loader, String resourceName) Resolve resource with given names and make them available in the returned iterator.The system class loader is available for JDK 1.2 or later, if certain security conditions are met.getSystemProperty
(String propName) Get the system propertyThe thread context class loader is available for JDK 1.2 or later, if certain security conditions are met.static void
setLog
(org.apache.commons.logging.Log _log) Deprecated.This method is not thread-safeMethods inherited from class org.apache.commons.discovery.jdk.JDKHooks
getJDKHooks
-
Constructor Details
-
JDK12Hooks
public JDK12Hooks()
-
-
Method Details
-
setLog
Deprecated.This method is not thread-safeSets theLog
for this class.- Parameters:
_log
- This classLog
-
getSystemProperty
Get the system property- Specified by:
getSystemProperty
in classJDKHooks
- Parameters:
propName
- name of the property- Returns:
- value of the property
-
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
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
Resolve resource with given names and make them available in the returned iterator.- Specified by:
getResources
in classJDKHooks
- Parameters:
loader
- The class loader used to resolve resourcesresourceName
- The resource name to resolve- Returns:
- The iterator over the URL resolved resources
- Throws:
IOException
- if any error occurs while loading the resource
-