Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.2.0)

E17486-03


oracle.adf.share.common.rc.util
Class LoaderUtil

java.lang.Object
  extended by oracle.adf.share.common.rc.util.LoaderUtil


public class LoaderUtil
extends java.lang.Object

Nested Class Summary
static interface LoaderUtil.NewJRLClassLoader
           

 

Constructor Summary
LoaderUtil()
           

 

Method Summary
static boolean activateTLCache()
           
static void clearTLCache()
          Forget the loaders presently in the cache.
static java.lang.ClassLoader getAndCacheLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
          A large percentage of the callers of the getLoader method use it to support the adding of one or more jars to the classpath of a project and for multiple components to respond to that.
static java.lang.ClassLoader getLoader(java.net.URL[] urls, java.lang.ClassLoader parent)
          This is an easy way to add a collection of URL's on top of an existing loader so that the existing resources of the loader will also be visible.
static java.lang.ClassLoader getNOPParent()
           
static boolean isTLCacheActive()
           

 

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

 

Constructor Detail

LoaderUtil

public LoaderUtil()

Method Detail

getLoader

public static java.lang.ClassLoader getLoader(java.net.URL[] urls,
                                              java.lang.ClassLoader parent)
This is an easy way to add a collection of URL's on top of an existing loader so that the existing resources of the loader will also be visible.
Parameters:
urls - the array (0-n) of the desired locations to include
parent - the loader to become the direct parent of the returned loader which may be null to include only the URL's passed in.
Returns:
a ClassLoader that represents the input param URL locations and the parent

getAndCacheLoader

public static java.lang.ClassLoader getAndCacheLoader(java.net.URL[] urls,
                                                      java.lang.ClassLoader parent)
A large percentage of the callers of the getLoader method use it to support the adding of one or more jars to the classpath of a project and for multiple components to respond to that. Therefore, numerous identical loaders would need to be created within the same thread notify cycle.
Parameters:
urls -
parent -
Returns:

activateTLCache

public static boolean activateTLCache()
Returns:
activate the cache (isTLCacheActive will return true after this) and return whether or not the caller "owns" the cache activation. i.e. the caller is responsible for calling clearTLCachedLoaders.

clearTLCache

public static void clearTLCache()
Forget the loaders presently in the cache.

isTLCacheActive

public static boolean isTLCacheActive()
Returns:
whether or not the cache is already owned higher up the stack

getNOPParent

public static java.lang.ClassLoader getNOPParent()

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Share
11g Release 2 (11.1.2.2.0)

E17486-03


Copyright © 1997, 2012, Oracle. All rights reserved.