public class Reflection extends Object
| Constructor and Description |
|---|
Reflection() |
| Modifier and Type | Method and Description |
|---|---|
static Method |
findMethod(Class<?> clazz,
String methodName,
Class<?>[] parameterTypes)
Search a method on the specified class.
|
static <T> T |
safeCast(Object value,
Class<T> type)
Attempt to cast the value argument to the provided type argument.
|
public static Method findMethod(Class<?> clazz, String methodName, Class<?>[] parameterTypes) throws IllegalArgumentException
clazz - the class to inspectmethodName - the method nameparameterTypes - the parameter typesIllegalArgumentException - if one argument is nullpublic static <T> T safeCast(Object value, Class<T> type) throws IllegalArgumentException
value - the value to casttype - the type to downcastIllegalArgumentException - if the type argument is nullCopyright © 2025 JBoss by Red Hat. All Rights Reserved.