Class LoadClass
java.lang.Object
org.hibernate.validator.internal.util.privilegedactions.LoadClass
- All Implemented Interfaces:
PrivilegedAction<Class<?>>
Loads a class specified by name.
If no class loader is provided, first the thread context class loader is tried, and finally Hibernate Validator's own class loader.
Note: When loading classes provided by the user (such as XML-configured beans or constraint types), the user class loader passed to the configuration must be passed.
- Author:
- Emmanuel Bernard, Hardy Ferentschik, Kevin Pollet <kevin.pollet@serli.com> (C) 2011 SERLI, Gunnar Morling, Guillaume Smet
-
Method Summary
Modifier and TypeMethodDescriptionstatic LoadClass
action
(String className, ClassLoader classLoader) static LoadClass
action
(String className, ClassLoader classLoader, boolean fallbackOnTCCL) static LoadClass
action
(String className, ClassLoader classLoader, ClassLoader initialThreadContextClassLoader) in some cases, the TCCL has been overridden so we need to pass it explicitly.Class<?>
run()
-
Method Details
-
action
-
action
-
action
public static LoadClass action(String className, ClassLoader classLoader, ClassLoader initialThreadContextClassLoader) in some cases, the TCCL has been overridden so we need to pass it explicitly. -
run
- Specified by:
run
in interfacePrivilegedAction<Class<?>>
-