public final class ClassUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static <T> java.lang.Class<? extends T> |
forName(java.lang.String className,
java.lang.Class<T> expectedClass,
java.lang.ClassLoader classLoader)
Safely loads a class using the three-parameter Class.forName with initialize=false
and validates it's assignable to the expected type.
|
public static <T> java.lang.Class<? extends T> forName(java.lang.String className,
java.lang.Class<T> expectedClass,
java.lang.ClassLoader classLoader)
throws java.lang.ClassNotFoundException
T - the expected typeclassName - the name of the class to loadexpectedClass - the expected superclass or interfaceclassLoader - the class loader to usejava.lang.ClassNotFoundException - if the class cannot be foundCopyright © 2026 PostgreSQL Global Development Group. All rights reserved.