[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Gavin King gavin.king at jboss.com
Wed Jul 26 18:08:08 EDT 2006


  User: gavin   
  Date: 06/07/26 18:08:08

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  replace @Within and @Around
  
  Revision  Changes    Path
  1.155     +5 -11     jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.154
  retrieving revision 1.155
  diff -u -b -r1.154 -r1.155
  --- Component.java	26 Jul 2006 21:51:04 -0000	1.154
  +++ Component.java	26 Jul 2006 22:08:08 -0000	1.155
  @@ -39,7 +39,6 @@
   import org.apache.commons.logging.Log;
   import org.apache.commons.logging.LogFactory;
   import org.hibernate.validator.ClassValidator;
  -import org.jboss.seam.annotations.Around;
   import org.jboss.seam.annotations.Create;
   import org.jboss.seam.annotations.DataBinderClass;
   import org.jboss.seam.annotations.DataSelectorClass;
  @@ -54,7 +53,6 @@
   import org.jboss.seam.annotations.Scope;
   import org.jboss.seam.annotations.Startup;
   import org.jboss.seam.annotations.Unwrap;
  -import org.jboss.seam.annotations.Within;
   import org.jboss.seam.annotations.datamodel.DataModel;
   import org.jboss.seam.contexts.Context;
   import org.jboss.seam.contexts.Contexts;
  @@ -89,7 +87,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.154 $
  + * @version $Revision: 1.155 $
    */
   @Scope(ScopeType.APPLICATION)
   public class Component
  @@ -608,18 +606,14 @@
         for (SortItem<Interceptor> si : siList)
         {
            Class<?> clazz = si.getObj().getUserInterceptor().getClass();
  -         Around around = clazz.getAnnotation(Around.class);
  -         Within within = clazz.getAnnotation(Within.class);
  -         if  (around!=null)
  +         if ( clazz.isAnnotationPresent(org.jboss.seam.annotations.Interceptor.class) )
            {
  -            for (Class<?> cl : Arrays.asList( around.value() ) )
  +            org.jboss.seam.annotations.Interceptor interceptorAnn = clazz.getAnnotation(org.jboss.seam.annotations.Interceptor.class);
  +            for (Class<?> cl : Arrays.asList( interceptorAnn.around() ) )
               {
                  si.getAround().add( ht.get(cl) );
               }
  -         }
  -         if (within!=null)
  -         {
  -            for (Class<?> cl : Arrays.asList( within.value() ) )
  +            for (Class<?> cl : Arrays.asList( interceptorAnn.within() ) )
               {
                  si.getWithin().add( ht.get(cl) );
               }
  
  
  



More information about the jboss-cvs-commits mailing list