public class DefaultInvoker extends Object implements Invoker
Invoker implementation. Only allows to invoke methods which
are defined by interfaces specified in the InvocationRestriction.| Constructor and Description |
|---|
DefaultInvoker() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkMethod(Method method,
InvocationRestriction restriction) |
Object |
invoke(Object target,
Invocation invocation,
InvocationRestriction restriction)
Invokes an invocation on a target object with restriction.
|
public Object invoke(Object target, Invocation invocation, InvocationRestriction restriction) throws InvokedSideInvocationException, Throwable
Invokerinvoke in interface Invokertarget - object on which to call methodinvocation - what to invoke, and parametersrestriction - attributes which define how invocation will be
restrictedInvokedSideInvocationException - thrown if something is wrong
with invocation itself, like NoSuchMethodException or alike. Also,
thrown if invocation is not allowed due to restriction.Throwable - anything thrown by the targetprotected void checkMethod(Method method, InvocationRestriction restriction) throws InvokedSideInvocationException, SecurityException
Copyright © 2015. All Rights Reserved.