Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.atomikos.util
Class ClassLoadingHelper

    java.lang.Object
      com.atomikos.util.ClassLoadingHelper

    public class ClassLoadingHelper

extends Object

A helper class for class loading.

Constructor Summary
`ClassLoadingHelper()`

Method Summary
`static Class` | `loadClass(String className)` Loads a class with the given name.
`static URL` | `loadResourceFromClasspath(Class clazz, String resourceName)` Attempts to load a given resource from the classpath.
`static Object` | `newProxyInstance(List classLoadersToTry, Class[] interfaces, InvocationHandler delegate)` Creates a new dynamic proxy instance for the given delegate.

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

Constructor Detail

### ClassLoadingHelper

    public ClassLoadingHelper()

Method Detail

### newProxyInstance

    public static Object newProxyInstance(List classLoadersToTry,
                                          Class[] interfaces,
                                          InvocationHandler delegate)
                                   throws IllegalArgumentException

  Creates a new dynamic proxy instance for the given delegate.

  Parameters:
    `classLoadersToTry` - The class loaders to try, in the specified list order.
    `interfaces` - The interfaces to add to the returned proxy.
    `delegate` - The underlying object that will receive the calls on the proxy.
  Returns:
    The proxy.
  Throws:
    `IllegalArgumentException` - If any of the interfaces involved could not be loaded.

### loadClass

    public static Class loadClass(String className)
                           throws ClassNotFoundException

  Loads a class with the given name.

  Parameters:
    `className` -
  Returns:
    The class object
  Throws:
    `ClassNotFoundException` - If not found

### loadResourceFromClasspath

    public static URL loadResourceFromClasspath(Class clazz,
                                                String resourceName)

  Attempts to load a given resource from the classpath.

  Parameters:
    `clazz` - The class to use as reference re classpath.
    `resourceName` - The name of the resource
  Returns:
    The URL to the resource, or null if not found.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012. All Rights Reserved.