Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package org.jboss.weld.bean.proxy;
 
 import static org.jboss.weld.bean.proxy.InterceptionDecorationContext.endInterceptorContext;
 import static org.jboss.weld.bean.proxy.InterceptionDecorationContext.startInterceptorContext;
 
 import java.util.Set;
 
A method handler that wraps the invocation of interceptors and decorators.

Author(s):
Marius Bogoevici
    private Object outerDecorator;
    public void setInterceptorMethodHandler(MethodHandler interceptorMethodHandler) {
        this. = interceptorMethodHandler;
    }
    public void setOuterDecorator(Object outerDecorator) {
        this. = outerDecorator;
    }
        return InterceptionDecorationContext.peek();
    }
    public Object invoke(Object selfMethod thisMethodMethod proceedObject[] argsthrows Throwable {
        boolean externalContext = false;
        try {
            if (InterceptionDecorationContext.empty()) {
                externalContext = true;
                startInterceptorContext();
            }
            Set<CombinedInterceptorAndDecoratorStackMethodHandlerdisabledHandlers = getDisabledHandlers();
            if (!disabledHandlers.contains(this)) {
                try {
                    disabledHandlers.add(this);
                    if ( != null) {
                        if (proceed != null) {
                            return this..invoke( != null ?  : selfthisMethodthisMethodargs);
                        } else {
                            return this..invoke(selfthisMethodnullargs);
                        }
                    } else {
                        if ( != null) {
                            SecurityActions.ensureAccessible(thisMethod);
                            return Reflections.invokeAndUnwrap(thisMethodargs);
                        }
                    }
                } finally {
                    disabledHandlers.remove(this);
                }
            }
            SecurityActions.ensureAccessible(proceed);
            return Reflections.invokeAndUnwrap(selfproceedargs);
        } finally {
            if (externalContext) {
                endInterceptorContext();
            }
        }
    }
    public boolean isDisabledHandler() {
        if (InterceptionDecorationContext.empty()) {
            return false;
        }
        return getDisabledHandlers().contains(this);
    }
        return ;
    }
    public Object getOuterDecorator() {
        return ;
    }
New to GrepCode? Check out our FAQ X