org.arakhne.vmutil
Class ClassLoaderFinder

java.lang.Object
  extended by org.arakhne.vmutil.ClassLoaderFinder

public final class ClassLoaderFinder
extends Object

This utility class permits to find the better class loader for your application.

It tries to find the preferred class loader registered with setPreferredClassLoader(ClassLoader). If none was found, the default class loader will be replied.

Version:
7.2 (rev:394) 2013-03-20 23:37:56
Author:
Stéphane GALLAND
Maven Group Id:
org.arakhne.afc
Maven Artifact Id:
arakhneVmutils

Constructor Summary
ClassLoaderFinder()
           
 
Method Summary
static ClassLoader findClassLoader()
          Replies the better class loader.
static void popPreferredClassLoader()
          Pop the preferred class loader.
static void setPreferredClassLoader(ClassLoader class_loader)
          Set the preferred class loader.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassLoaderFinder

public ClassLoaderFinder()
Method Detail

findClassLoader

public static ClassLoader findClassLoader()
Replies the better class loader.

It tries to find the preferred class loader. If none was found, the default class loader will be replied.

Returns:
the class loader, never null

setPreferredClassLoader

public static void setPreferredClassLoader(ClassLoader class_loader)
Set the preferred class loader.

Parameters:
class_loader - is the preferred class loader

popPreferredClassLoader

public static void popPreferredClassLoader()
Pop the preferred class loader.



Copyright © 2006-2013 Arakhnê.org Consortium. All rights reserved under LGPL license terms.