Example usage for org.aspectj.lang ProceedingJoinPoint proceed

List of usage examples for org.aspectj.lang ProceedingJoinPoint proceed

Introduction

In this page you can find the example usage for org.aspectj.lang ProceedingJoinPoint proceed.

Prototype

public Object proceed(Object[] args) throws Throwable;

Source Link

Document

Proceed with the next advice or target method invocation.

Usage

From source file:de.hybris.platform.assistedservicestorefront.aspect.ChannelDecisionAspect.java

License:Open Source License

private void processChannelDecisionManager(final ProceedingJoinPoint joinPoint) throws Throwable {
    final Collection<ConfigAttribute> config = (Collection<ConfigAttribute>) joinPoint.getArgs()[1];
    final Collection<ConfigAttribute> filteredConfig = new ArrayList();

    /*//w w w  .j  a  v  a 2 s.  c  o  m
     * filter out all "ANY_CHANNEL" attributes, so that the ChannelDecisionManager delegates all invocations to its
     * ChannelProcessors
     */
    for (final ConfigAttribute attribute : config) {
        if (!"ANY_CHANNEL".equals(attribute.getAttribute())) {
            filteredConfig.add(attribute);
        }
    }

    final Object[] args = { joinPoint.getArgs()[0], filteredConfig };
    joinPoint.proceed(args);
}

From source file:de.kaiserpfalzEdv.vaadin.i18n.I18nInterceptor.java

License:Apache License

@Around("defaultSetCaption() || labelSetValue()")
public Object doTranslation(final ProceedingJoinPoint invocation) {
    LOG.trace("Checking translations for {} ...", invocation.getSignature().getName());
    Object result = null;/*from www . j  av  a 2  s .c  om*/

    Object[] args = invocation.getArgs();
    args[0] = translate((String) args[0], UI.getCurrent().getLocale());

    try {
        result = invocation.proceed(args);
    } catch (Throwable throwable) {
        LOG.error(throwable.getClass().getSimpleName() + " caught: " + throwable.getMessage(), throwable);
    }

    return result;
}