Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


oracle.wsm.policy.util
Class Loader

java.lang.Object
  extended by oracle.wsm.policy.util.Loader


public class Loader
extends Object

Utility class for loading resource or classes.

Resources/classes are retrieved from class loaders in the following order:

  1. the calling thread context's class loader - obtained using Thread.currentThread().getContextClassLoader()
  2. this classes class loader (oracle.wsm.core in OC4J environments) - obtained using Loader.class.getClassLoader()
  3. the extension class loader (oracle.wsm.extension) - obtained using ClassLoaderUtilities.findClassLoader(EXTENSION_LIBRARY, null, null)
  4. the system class loader - obtained using ClassLoader.getSystemClassLoader()

Field Summary
static String EXTENSION_LIBRARY
          Shared library from which extension resources or classes will be loaded.

 

Constructor Summary
Loader()
           

 

Method Summary
static URL getResource(String resource)
          Get URL for resource from available loaders.
static URL getResource(String resource, boolean useSystemLoader)
          Get URL for resource from available loaders.
static Enumeration<URL> getResources(String resource)
          Get list of URL's for resource from available loaders.
static Enumeration<URL> getResources(String resource, boolean useSystemLoader)
          Get list of URL's for resource from available loaders.
static Class loadClass(String className)
          Load a class from available loaders.

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

EXTENSION_LIBRARY

public static final String EXTENSION_LIBRARY
Shared library from which extension resources or classes will be loaded.
See Also:
Constant Field Values

Constructor Detail

Loader

public Loader()

Method Detail

getResource

public static URL getResource(String resource)
Get URL for resource from available loaders.
Parameters:
resource - resource to get
Returns:
URL for resource, null if not found

getResource

public static URL getResource(String resource,
                              boolean useSystemLoader)
Get URL for resource from available loaders.
Parameters:
resource - resource to get
useSystemLoader - whether to include system loader in search
Returns:
URL for resource, null if not found

getResources

public static Enumeration<URL> getResources(String resource)
Get list of URL's for resource from available loaders.
Parameters:
resource - resource to get
Returns:
enumeration of resource URL's

getResources

public static Enumeration<URL> getResources(String resource,
                                            boolean useSystemLoader)
Get list of URL's for resource from available loaders.
Parameters:
resource - resource to get
useSystemLoader - whether to include system loader in search
Returns:
enumeration of resource URL's

loadClass

public static Class loadClass(String className)
                       throws ClassNotFoundException
Load a class from available loaders.
Parameters:
className - class to load
Returns:
class loaded
Throws:
ClassNotFoundException

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Web Services Manager
11g (11.1.1)

E10689-01


Copyright © 2007, 2009, Oracle and/or its affiliates. All rights reserved.