public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Object self, Method proxiedMethod, Method proceed, Object[] args) throws Throwable { Object instance = callable.call(); if (instance == null) { throw BeanLogger.LOG.nullInstance(callable); } Object returnValue = Reflections.invokeAndUnwrap(instance, proxiedMethod, args); BeanLogger.LOG.callProxiedMethod(proxiedMethod, instance, args, returnValue == null ? null : returnValue); return returnValue; }
public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { SecurityActions.ensureAccessible(proceed); if (proceed == null) { if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) { return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack); } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) { return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack); } } else { if (isInterceptorMethod(thisMethod)) { return Reflections.invokeAndUnwrap(self, proceed, args); } return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack); } return null; }
protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable { CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType); if (chain.interceptorMethods.isEmpty()) { // shortcut if there are no interceptors if (proceed == null) { return null; } else { return Reflections.invokeAndUnwrap(instance, proceed, args); } } if (InterceptionType.AROUND_INVOKE == interceptionType) { return executeAroundInvoke(instance, method, proceed, args, chain, stack); } else { return executeLifecycleInterception(instance, method, proceed, args, chain, stack); } } protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }
protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable { CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType); if (chain.interceptorMethods.isEmpty()) { // shortcut if there are no interceptors if (proceed == null) { return null; } else { return Reflections.invokeAndUnwrap(instance, proceed, args); } } if (InterceptionType.AROUND_INVOKE == interceptionType) { return executeAroundInvoke(instance, method, proceed, args, chain, stack); } else { return executeLifecycleInterception(instance, method, proceed, args, chain, stack); } } protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { SecurityActions.ensureAccessible(proceed); if (proceed == null) { if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) { return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack); } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) { return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack); } } else { if (isInterceptorMethod(thisMethod)) { return Reflections.invokeAndUnwrap(self, proceed, args); } return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack); } return null; }
public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { SecurityActions.ensureAccessible(proceed); if (proceed == null) { if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) { return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack); } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) { return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack); } } else { if (isInterceptorMethod(thisMethod)) { return Reflections.invokeAndUnwrap(self, proceed, args); } return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack); } return null; }
public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { SecurityActions.ensureAccessible(proceed); if (proceed == null) { if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) { return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack); } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) { return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack); } } else { if (isInterceptorMethod(thisMethod)) { return Reflections.invokeAndUnwrap(self, proceed, args); } return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack); } return null; }
public Object invoke(Stack stack, Object self, Method thisMethod, Method proceed, Object[] args) throws Throwable { SecurityActions.ensureAccessible(proceed); if (proceed == null) { if (thisMethod.getName().equals(InterceptionUtils.POST_CONSTRUCT)) { return executeInterception(self, null, null, null, InterceptionType.POST_CONSTRUCT, stack); } else if (thisMethod.getName().equals(InterceptionUtils.PRE_DESTROY)) { return executeInterception(self, null, null, null, InterceptionType.PRE_DESTROY, stack); } } else { if (isInterceptorMethod(thisMethod)) { return Reflections.invokeAndUnwrap(self, proceed, args); } return executeInterception(self, thisMethod, proceed, args, InterceptionType.AROUND_INVOKE, stack); } return null; }
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }
protected Object executeInterception(Object instance, Method method, Method proceed, Object[] args, InterceptionType interceptionType, Stack stack) throws Throwable { CachedInterceptionChain chain = getInterceptionChain(instance, method, interceptionType); if (chain.interceptorMethods.isEmpty()) { // shortcut if there are no interceptors if (proceed == null) { return null; } else { return Reflections.invokeAndUnwrap(instance, proceed, args); } } if (InterceptionType.AROUND_INVOKE == interceptionType) { return executeAroundInvoke(instance, method, proceed, args, chain, stack); } else { return executeLifecycleInterception(instance, method, proceed, args, chain, stack); } } protected Object executeLifecycleInterception(Object instance, Method method, Method proceed, Object[] args, CachedInterceptionChain chain, Stack stack) throws Throwable {
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }
private Object doInvoke(WeldDecorator<?> weldDecorator, Object decoratorInstance, Method method, Object[] args) throws Throwable { if (!method.isAnnotationPresent(Inject.class)) { InvokableAnnotatedMethod<?> decoratorMethod = weldDecorator.getDecoratorMethod(method); if (decoratorMethod != null) { try { return decoratorMethod.invokeOnInstance(decoratorInstance, args); } catch (InvocationTargetException e) { throw e.getCause(); } } } SecurityActions.ensureAccessible(method); return Reflections.invokeAndUnwrap(getTargetInstance(), method, args); } }