[weld-commits] Weld SVN: r4444 - in core/trunk/impl/src/main/java/org/jboss/weld: bootstrap/events and 1 other directories.

weld-commits at lists.jboss.org weld-commits at lists.jboss.org
Fri Oct 30 09:18:26 EDT 2009


Author: pete.muir at jboss.org
Date: 2009-10-30 09:18:26 -0400 (Fri, 30 Oct 2009)
New Revision: 4444

Modified:
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
   core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessObserverMethodImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
   core/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java
Log:
WELD-217, part 2

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -231,9 +231,9 @@
       }
    }
    
-   protected <X, T> void createObserverMethod(RIBean<X> declaringBean, WeldMethod<T, X> method)
+   protected <T, X> void createObserverMethod(RIBean<X> declaringBean, WeldMethod<T, X> method)
    {
-      ObserverMethodImpl<X, T> observer = ObserverFactory.create(method, declaringBean, manager);
+      ObserverMethodImpl<T, X> observer = ObserverFactory.create(method, declaringBean, manager);
       getEnvironment().addObserverMethod(observer);
    }
 

Modified: core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessObserverMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessObserverMethodImpl.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/bootstrap/events/ProcessObserverMethodImpl.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -35,20 +35,20 @@
  * @author David Allen
  *
  */
-public class ProcessObserverMethodImpl<X, T> extends AbstractDefinitionContainerEvent implements ProcessObserverMethod<X, T>
+public class ProcessObserverMethodImpl<T, X> extends AbstractDefinitionContainerEvent implements ProcessObserverMethod<T, X>
 {
    
-   public static <X, T> void fire(BeanManagerImpl beanManager, ObserverMethodImpl<X, T> observer)
+   public static <T, X> void fire(BeanManagerImpl beanManager, ObserverMethodImpl<T, X> observer)
    {
-      new ProcessObserverMethodImpl<X, T>(beanManager, observer.getMethod(), observer) {}.fire();
+      new ProcessObserverMethodImpl<T, X>(beanManager, observer.getMethod(), observer) {}.fire();
    }
    
    private final AnnotatedMethod<X>   beanMethod;
    private final ObserverMethod<T> observerMethod;
    
-   public ProcessObserverMethodImpl(BeanManagerImpl beanManager, AnnotatedMethod<X> beanMethod, ObserverMethodImpl<X, T> observerMethod)
+   public ProcessObserverMethodImpl(BeanManagerImpl beanManager, AnnotatedMethod<X> beanMethod, ObserverMethodImpl<T, X> observerMethod)
    {
-      super(beanManager, ProcessObserverMethod.class, new Type[] { observerMethod.getMethod().getDeclaringType().getBaseType(), observerMethod.getObservedType() });
+      super(beanManager, ProcessObserverMethod.class, new Type[] { observerMethod.getObservedType(), observerMethod.getMethod().getDeclaringType().getBaseType() });
       this.beanMethod = beanMethod;
       this.observerMethod = observerMethod;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/AsynchronousTransactionalEventNotification.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -38,7 +38,7 @@
    private static final LocLogger log = loggerFactory().getLogger(EVENT);
    private static final XLogger xLog = loggerFactory().getXLogger(EVENT);
 
-   public AsynchronousTransactionalEventNotification(T event, ObserverMethodImpl<?, T> observer)
+   public AsynchronousTransactionalEventNotification(T event, ObserverMethodImpl<T, ?> observer)
    {
       super(event, observer);
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/DeferredEventNotification.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -41,7 +41,7 @@
    private static final XLogger xLog = loggerFactory().getXLogger(EVENT);
    
    // The observer
-   protected final ObserverMethodImpl<?, T> observer;
+   protected final ObserverMethodImpl<T, ?> observer;
    // The event object
    protected final T event;
 
@@ -51,7 +51,7 @@
     * @param observer The observer to be notified
     * @param event The event being fired
     */
-   public DeferredEventNotification(T event, ObserverMethodImpl<?, T> observer)
+   public DeferredEventNotification(T event, ObserverMethodImpl<T, ?> observer)
    {
       this.observer = observer;
       this.event = event;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -41,17 +41,17 @@
     * @param manager The Bean manager
     * @return An observer implementation built from the method abstraction
     */
-   public static <X, T> ObserverMethodImpl<X, T> create(WeldMethod<T, X> method, RIBean<X> declaringBean, BeanManagerImpl manager)
+   public static <T, X> ObserverMethodImpl<T, X> create(WeldMethod<T, X> method, RIBean<X> declaringBean, BeanManagerImpl manager)
    {
-      ObserverMethodImpl<X, T> result = null;
+      ObserverMethodImpl<T, X> result = null;
       TransactionPhase transactionPhase = getTransactionalPhase(method);
       if (manager.getServices().contains(TransactionServices.class) && !transactionPhase.equals(TransactionPhase.IN_PROGRESS))
       {
-         result = new TransactionalObserverMethodImpl<X, T>(method, declaringBean, transactionPhase, manager);
+         result = new TransactionalObserverMethodImpl<T, X>(method, declaringBean, transactionPhase, manager);
       }
       else
       {
-         result = new ObserverMethodImpl<X, T>(method, declaringBean, manager);
+         result = new ObserverMethodImpl<T, X>(method, declaringBean, manager);
       }
       return result;
    }

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -59,7 +59,7 @@
  * @author David Allen
  * 
  */
-public class ObserverMethodImpl<X, T> implements ObserverMethod<T>
+public class ObserverMethodImpl<T, X> implements ObserverMethod<T>
 {
 
    private final Set<Annotation> bindings;

Modified: core/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java
===================================================================
--- core/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java	2009-10-30 13:18:12 UTC (rev 4443)
+++ core/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java	2009-10-30 13:18:26 UTC (rev 4444)
@@ -28,7 +28,7 @@
  * @author David Allen
  * 
  */
-class TransactionalObserverMethodImpl<X, T> extends ObserverMethodImpl<X, T>
+class TransactionalObserverMethodImpl<T, X> extends ObserverMethodImpl<T, X>
 {
 
    /**



More information about the weld-commits mailing list