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

Gavin King gavin.king at jboss.com
Wed Nov 8 16:14:37 EST 2006


  User: gavin   
  Date: 06/11/08 16:14:37

  Modified:    src/main/org/jboss/seam  Component.java
  Log:
  add @Interceptors, JBSEAm-467
  
  Revision  Changes    Path
  1.203     +10 -3     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.202
  retrieving revision 1.203
  diff -u -b -r1.202 -r1.203
  --- Component.java	4 Nov 2006 01:58:24 -0000	1.202
  +++ Component.java	8 Nov 2006 21:14:37 -0000	1.203
  @@ -61,6 +61,7 @@
   import org.jboss.seam.annotations.Destroy;
   import org.jboss.seam.annotations.IfInvalid;
   import org.jboss.seam.annotations.In;
  +import org.jboss.seam.annotations.Interceptors;
   import org.jboss.seam.annotations.JndiName;
   import org.jboss.seam.annotations.Observer;
   import org.jboss.seam.annotations.Out;
  @@ -119,7 +120,7 @@
    *
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author Gavin King
  - * @version $Revision: 1.202 $
  + * @version $Revision: 1.203 $
    */
   @Scope(ScopeType.APPLICATION)
   @SuppressWarnings("deprecation")
  @@ -619,11 +620,17 @@
      {
         initDefaultInterceptors();
   
  -      for (Annotation annotation: beanClass.getAnnotations())
  +      for ( Annotation annotation: beanClass.getAnnotations() )
         {
            if ( annotation.annotationType().isAnnotationPresent(INTERCEPTORS) )
            {
  -            addInterceptor( new Interceptor(annotation, this) );
  +            Class[] classes = value( annotation.annotationType().getAnnotation(INTERCEPTORS) );
  +            addInterceptor( new Interceptor(classes, annotation, this) );
  +         }
  +         if ( annotation.annotationType().isAnnotationPresent(Interceptors.class) )
  +         {
  +            Class[] classes = annotation.annotationType().getAnnotation(Interceptors.class).value();
  +            addInterceptor( new Interceptor(classes, annotation, this) );
            }
         }
   
  
  
  



More information about the jboss-cvs-commits mailing list