public final class ReflectUtil extends Object
Modifier and Type | Method and Description |
---|---|
static Method |
getMethod(Class<?> target,
String name,
Class<?>... parameters)
Gets the method defined on the target class.
|
static Object |
invoke(Object target,
Method method,
Object... parameters)
Invokes the method on the target object with the given parameters.
|
public static Method getMethod(Class<?> target, String name, Class<?>... parameters)
target
- Target class that contains method.name
- Method name.parameters
- Method parameters.public static Object invoke(Object target, Method method, Object... parameters)
target
- Target class that contains method.method
- Method to invoke on target.parameters
- Method parameters.Copyright © 2003-2024 Virginia Tech. All Rights Reserved.