[prev in list] [next in list] [prev in thread] [next in thread] 

List:       jboss-cvs-commits
Subject:    [jboss-cvs] jbosstest/src/main/org/jboss/test/aop/bean AfterInterceptor.java BeforeInterceptor.java
From:       Bill Burke <patriot1burke () users ! sourceforge ! net>
Date:       2004-02-29 6:30:23
Message-ID: E1AxKT1-0007s0-5w () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

  User: patriot1burke
  Date: 04/02/28 22:30:23

  Modified:    src/main/org/jboss/test/aop/bean AfterInterceptor.java
                        BeforeInterceptor.java InstanceOfInterceptor.java
                        InterceptorCounter.java SimpleInterceptor.java
  Log:
  cleanup.  Removed InvocationType
  
  Revision  Changes    Path
  1.9       +2 -2      \
jbosstest/src/main/org/jboss/test/aop/bean/AfterInterceptor.java  
  Index: AfterInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/AfterInterceptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- AfterInterceptor.java	30 Jan 2004 16:51:01 -0000	1.8
  +++ AfterInterceptor.java	29 Feb 2004 06:30:22 -0000	1.9
  @@ -14,7 +14,7 @@
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class AfterInterceptor implements org.jboss.aop.advice.Interceptor
   {
  @@ -26,7 +26,7 @@
   
      public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
  -      System.out.println("AfterInterceptor interception: " + \
invocation.getType());  +      System.out.println("AfterInterceptor interception: " + \
                invocation.getClass().getName());
         org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  lastIntercepted = m.getName();
  
  
  
  1.9       +2 -2      \
jbosstest/src/main/org/jboss/test/aop/bean/BeforeInterceptor.java  
  Index: BeforeInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/BeforeInterceptor.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- BeforeInterceptor.java	30 Jan 2004 16:51:01 -0000	1.8
  +++ BeforeInterceptor.java	29 Feb 2004 06:30:22 -0000	1.9
  @@ -14,7 +14,7 @@
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.8 $
  + * @version $Revision: 1.9 $
    */
   public class BeforeInterceptor implements org.jboss.aop.advice.Interceptor
   {
  @@ -26,7 +26,7 @@
   
      public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
  -      System.out.println("BeforeInterceptor interception: " + \
invocation.getType());  +      System.out.println("BeforeInterceptor interception: " \
                + invocation.getClass().getName());
         org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  lastIntercepted = m.getName();
  
  
  
  1.2       +1 -2      \
jbosstest/src/main/org/jboss/test/aop/bean/InstanceOfInterceptor.java  
  Index: InstanceOfInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/InstanceOfInterceptor.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InstanceOfInterceptor.java	27 Feb 2004 00:12:47 -0000	1.1
  +++ InstanceOfInterceptor.java	29 Feb 2004 06:30:22 -0000	1.2
  @@ -9,7 +9,6 @@
   import org.jboss.aop.joinpoint.FieldInvocation;
   import org.jboss.aop.advice.Interceptor;
   import org.jboss.aop.joinpoint.Invocation;
  -import org.jboss.aop.joinpoint.InvocationType;
   import org.jboss.aop.joinpoint.MethodInvocation;
   
   import java.lang.reflect.Field;
  @@ -17,7 +16,7 @@
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class InstanceOfInterceptor implements Interceptor
   {
  
  
  
  1.2       +0 -1      \
jbosstest/src/main/org/jboss/test/aop/bean/InterceptorCounter.java  
  Index: InterceptorCounter.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/InterceptorCounter.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- InterceptorCounter.java	27 Feb 2004 23:58:04 -0000	1.1
  +++ InterceptorCounter.java	29 Feb 2004 06:30:22 -0000	1.2
  @@ -9,7 +9,6 @@
   import org.jboss.aop.joinpoint.FieldInvocation;
   import org.jboss.aop.advice.Interceptor;
   import org.jboss.aop.joinpoint.Invocation;
  -import org.jboss.aop.joinpoint.InvocationType;
   import org.jboss.aop.joinpoint.MethodInvocation;
   
   import java.lang.reflect.Field;
  @@ -17,7 +16,7 @@
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.1 $
  + * @version $Revision: 1.2 $
    */
   public class InterceptorCounter implements Interceptor
   {
  
  
  
  1.16      +6 -5      \
jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptor.java  
  Index: SimpleInterceptor.java
  ===================================================================
  RCS file: /cvsroot/jboss/jbosstest/src/main/org/jboss/test/aop/bean/SimpleInterceptor.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- SimpleInterceptor.java	14 Feb 2004 07:16:59 -0000	1.15
  +++ SimpleInterceptor.java	29 Feb 2004 06:30:22 -0000	1.16
  @@ -9,15 +9,16 @@
   import org.jboss.aop.joinpoint.FieldInvocation;
   import org.jboss.aop.advice.Interceptor;
   import org.jboss.aop.joinpoint.Invocation;
  -import org.jboss.aop.joinpoint.InvocationType;
   import org.jboss.aop.joinpoint.MethodInvocation;
  +import org.jboss.aop.joinpoint.FieldReadInvocation;
  +import org.jboss.aop.joinpoint.FieldWriteInvocation;
   
   import java.lang.reflect.Field;
   import java.lang.reflect.Method;
   /**
    *
    * @author <a href="mailto:bill@jboss.org">Bill Burke</a>
  - * @version $Revision: 1.15 $
  + * @version $Revision: 1.16 $
    */
   public class SimpleInterceptor implements org.jboss.aop.advice.Interceptor
   {
  @@ -29,8 +30,8 @@
   
      public Object invoke(org.jboss.aop.joinpoint.Invocation invocation) throws \
Throwable  {
  -      System.out.println("interception: " + invocation.getType());
  -      if (invocation.getType() == org.jboss.aop.joinpoint.InvocationType.METHOD)
  +      System.out.println("interception: " + invocation.getClass().getName());
  +      if (invocation instanceof MethodInvocation)
         {
            org.jboss.aop.joinpoint.MethodInvocation methodInvocation = \
(org.jboss.aop.joinpoint.MethodInvocation)invocation;  Method m = \
methodInvocation.method;  @@ -40,7 +41,7 @@
            System.out.println("trans-attribute: " + transattr);
            lastTransAttributeAccessed = transattr;
         }
  -      else if (invocation.getType() == \
org.jboss.aop.joinpoint.InvocationType.FIELD_READ || invocation.getType() == \
org.jboss.aop.joinpoint.InvocationType.FIELD_WRITE)  +      else if (invocation \
instanceof FieldReadInvocation || invocation instanceof FieldWriteInvocation)  {
            org.jboss.aop.joinpoint.FieldInvocation fieldInvocation = \
(org.jboss.aop.joinpoint.FieldInvocation)invocation;  Field field = \
fieldInvocation.field;  
  
  


-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
jboss-cvs-commits mailing list
jboss-cvs-commits@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-cvs-commits


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic