public interface Invoker
JavaDispatcher.| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(Method method,
Object instance,
Object[] argument)
Invokes a method via
Method.invoke(Object, Object...). |
Object |
newInstance(Constructor<?> constructor,
Object[] argument)
Creates a new instance via
Constructor.newInstance(Object...). |
Object newInstance(Constructor<?> constructor, Object[] argument) throws InstantiationException, IllegalAccessException, InvocationTargetException
Constructor.newInstance(Object...).constructor - The constructor to invoke.argument - The constructor arguments.InstantiationException - If the instance cannot be constructed.IllegalAccessException - If the constructor is accessed illegally.InvocationTargetException - If the invocation causes an error.@MaybeNull Object invoke(Method method, @MaybeNull Object instance, @MaybeNull Object[] argument) throws IllegalAccessException, InvocationTargetException
Method.invoke(Object, Object...).method - The method to invoke.instance - The instance upon which to invoke the method or null if the method is static.argument - The method arguments.null if the method is void.IllegalAccessException - If the method is accessed illegally.InvocationTargetException - If the invocation causes an error.Copyright © 2014–2025. All rights reserved.