/*
 * JBoss, the OpenSource J2EE webOS
 *
 * Distributable under LGPL license.
 * See terms of license at gnu.org.
 */

package org.jboss.test.aop.callerscope;

import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;

/**
 *
 * @author <a href="mailto:kabir.khan@jboss.org">Kabir Khan</a>
 * @version $Revision: 1.1.8.2 $
 */
public class PerClassInterceptor implements Interceptor
{
   static boolean intercepted = false;

   public String getName()
   {
      return this.getClass().getName();
   }
   
   public Object invoke(Invocation invocation) throws Throwable
   {
      System.out.println(this.getClass().getName() + " intercepting " + invocation);
      intercepted = true;
      return invocation.invokeNext();
   }
}
