Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package org.jboss.weld.bean.proxy;
  
  
A method handler that wraps the invocation of interceptors and decorators.

Author(s):
Marius Bogoevici
 
 
         @Override
         public void setInterceptorMethodHandler(InterceptorMethodHandler interceptorMethodHandler) {
             throw new UnsupportedOperationException();
         }
 
         @Override
         public void setOuterDecorator(Object outerDecorator) {
             throw new UnsupportedOperationException();
         }
 
         @Override
         public Object invoke(Object selfMethod thisMethodMethod proceedObject[] argsthrows Throwable {
             throw new UnsupportedOperationException();
         }
     };
 
 
     private Object outerDecorator;
 
     public void setInterceptorMethodHandler(InterceptorMethodHandler interceptorMethodHandler) {
         this. = interceptorMethodHandler;
     }
 
     public void setOuterDecorator(Object outerDecorator) {
         this. = outerDecorator;
     }
 
     @Override
     public Object invoke(Object selfMethod thisMethodMethod proceedObject[] argsthrows Throwable {
         throw new UnsupportedOperationException();
     }
 
     @Override
     public Object invoke(Stack stackObject selfMethod thisMethodMethod proceedObject[] argsthrows Throwable {
         if (stack == null) {
             /*
              * This is a lifecycle callback invocation.
              * 1) Lifecycle callback interception is never suppressed by IDC
              * 2) Interception of methods called by lifecycle callbacks is suppressed
              */
             stack = InterceptionDecorationContext.getStack();
             return invoke(stackselfthisMethodproceedargstruestack.startIfNotOnTop(this));
         } else {
             /*
              * This is an around-invoke interception
              * Interceptors are invoked as long as the current IDC is not suppressed.
              */
             boolean intercept = stack.startIfNotOnTop(this);
             return invoke(stackselfthisMethodproceedargsinterceptintercept);
         }
     }
 
     public Object invoke(Stack stackObject selfMethod thisMethodMethod proceedObject[] argsboolean interceptboolean popStackthrows Throwable {
         if (intercept) {
             try {
                 if ( != null) {
                     if (proceed != null) {
                         if ( == null) {
                             // use WeldSubclass.method$$super() as proceed
                             return this..invoke(stackselfthisMethodproceedargs);
                         } else {
                             return this..invoke(stackthisMethodthisMethodargs);
                         }
                     } else {
                         return this..invoke(stackselfthisMethodnullargs);
                     }
                 } else {
                     if ( != null) {
                         SecurityActions.ensureAccessible(thisMethod);
                         return Reflections.invokeAndUnwrap(thisMethodargs);
                     }
                 }
             } finally {
                 if (popStack) {
                     stack.end();
                 }
             }
         }
         SecurityActions.ensureAccessible(proceed);
         return Reflections.invokeAndUnwrap(selfproceedargs);
    }
        return ;
    }
    public Object getOuterDecorator() {
        return ;
    }
    public boolean isDisabledHandler() {
        return this == InterceptionDecorationContext.peekIfNotEmpty();
    }
    public boolean isDisabledHandler(Stack stack) {
        return this == stack.peek();
    }
New to GrepCode? Check out our FAQ X