public class ClassLoadingHelper extends Object
| Constructor and Description |
|---|
ClassLoadingHelper() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
existsInJavaObjectClass(Method method) |
static <T> Class<T> |
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<ClassLoader> classLoadersToTry,
Class<?>[] minimumSetOfInterfaces,
Class<?>[] interfaces,
InvocationHandler delegate)
Creates a new dynamic proxy instance for the given delegate.
|
public static Object newProxyInstance(List<ClassLoader> classLoadersToTry, Class<?>[] minimumSetOfInterfaces, Class<?>[] interfaces, InvocationHandler delegate) throws 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.IllegalArgumentException - If any of the interfaces involved could not be loaded.public static <T> Class<T> loadClass(String className) throws ClassNotFoundException
className - ClassNotFoundException - If not foundpublic static URL loadResourceFromClasspath(Class<?> clazz, String resourceName)
clazz - The class to use as reference re classpath.resourceName - The name of the resourcepublic static boolean existsInJavaObjectClass(Method method)
Copyright © 2016. All Rights Reserved.