public class ClassLoadingHelper
extends java.lang.Object
| Constructor and Description |
|---|
ClassLoadingHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
existsInJavaObjectClass(java.lang.reflect.Method method) |
static <T> java.lang.Class<T> |
loadClass(java.lang.String className)
Loads a class with the given name.
|
static java.net.URL |
loadResourceFromClasspath(java.lang.Class<?> clazz,
java.lang.String resourceName)
Attempts to load a given resource from the classpath.
|
static java.lang.Object |
newProxyInstance(java.util.List<java.lang.ClassLoader> classLoadersToTry,
java.lang.Class<?>[] minimumSetOfInterfaces,
java.lang.Class<?>[] interfaces,
java.lang.reflect.InvocationHandler delegate)
Creates a new dynamic proxy instance for the given delegate.
|
public static java.lang.Object newProxyInstance(java.util.List<java.lang.ClassLoader> classLoadersToTry,
java.lang.Class<?>[] minimumSetOfInterfaces,
java.lang.Class<?>[] interfaces,
java.lang.reflect.InvocationHandler delegate)
throws java.lang.IllegalArgumentException
classLoadersToTry - The class loaders to try, in the specified list order.minimumSetOfInterfaces - The minimum set of interfaces required, if not all interface
classes were found.interfaces - The interfaces to add to the returned proxy.delegate - The underlying object that will receive the calls on the
proxy.java.lang.IllegalArgumentException - If any of the interfaces involved could not be loaded.public static <T> java.lang.Class<T> loadClass(java.lang.String className)
throws java.lang.ClassNotFoundException
className - java.lang.ClassNotFoundException - If not foundpublic static java.net.URL loadResourceFromClasspath(java.lang.Class<?> clazz,
java.lang.String resourceName)
clazz - The class to use as reference re classpath.resourceName - The name of the resourcepublic static boolean existsInJavaObjectClass(java.lang.reflect.Method method)
Copyright © 2018. All Rights Reserved.