Class ClassLoadingUtil
java.lang.Object
dev.derklaro.aerogel.auto.internal.util.ClassLoadingUtil
@API(status=INTERNAL,
since="1.0",
consumers="dev.derklaro.aerogel.auto.internal")
public final class ClassLoadingUtil
extends Object
A utility class for loading classes.
- Since:
- 1.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic @NotNull Class<?>loadClass(@NotNull ClassLoader loader, @NotNull String name) Loads a class by its name using the current thread context class loader.
-
Field Details
-
PRIMITIVE_CLASSES
-
-
Constructor Details
-
ClassLoadingUtil
private ClassLoadingUtil()
-
-
Method Details
-
loadClass
@NotNull public static @NotNull Class<?> loadClass(@NotNull @NotNull ClassLoader loader, @NotNull @NotNull String name) throws ClassNotFoundException Loads a class by its name using the current thread context class loader. This will not initialize the class. Primitive classes and arrays are supported as well.- Parameters:
loader- the loader to load the class from.name- the name of the class to load, may be a primitive type name.- Returns:
- a class object representing the requested class.
- Throws:
ClassNotFoundException- if the class can not be located using the thread context class loader.
-