public static class CommonsManager.ItemMethodInterceptor extends Object implements JaloObjectCreator
| Constructor and Description |
|---|
ItemMethodInterceptor(Class<? extends Item> itemClass,
Method... methods) |
| Modifier and Type | Method and Description |
|---|---|
int |
accept(Method method)
To keep the generated class light enough we define which methods we'd like to intercept here.
|
protected Object |
after(Item i,
Method m,
Object[] originalArgs,
Object[] args,
Object returned)
Called after the actual method call.
|
protected Object[] |
before(Item p,
Method m,
Object[] args)
Called before the actual method call.
|
protected Object |
call(Item obj,
Object[] args,
MethodProxy proxy) |
BridgeAbstraction |
createInstance(Tenant tenant,
BridgeInterface impl)
Here we're creating a jalo item instance.
|
Object |
intercept(Object obj,
Method method,
Object[] args,
MethodProxy methodproxy)
Intercepts all target method calls and wraps the actual call into
before(Item, Method, Object[]) and
after(Item, Method, Object[], Object[], Object). |
public final Object intercept(Object obj, Method method, Object[] args, MethodProxy methodproxy) throws Throwable
before(Item, Method, Object[]) and
after(Item, Method, Object[], Object[], Object).Throwableprotected Object[] before(Item p, Method m, Object[] args)
m - the methodargs - the original argumentsprotected Object after(Item i, Method m, Object[] originalArgs, Object[] args, Object returned)
i - the itemm - the methodoriginalArgs - the original arguments before the callargs - the arguments used for the actual callreturned - the result of the actual callprotected Object call(Item obj, Object[] args, MethodProxy proxy) throws Throwable
Throwablepublic BridgeAbstraction createInstance(Tenant tenant, BridgeInterface impl)
createInstance in interface JaloObjectCreatorpublic int accept(Method method)
Enhancer.Copyright © 2017 SAP SE. All Rights Reserved.