onami-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1425471 - in /incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle: AbstractLifeCycleModule.java AfterInjectionModule.java DisposeModule.java
Date Sun, 23 Dec 2012 14:58:19 GMT
Author: simonetripodi
Date: Sun Dec 23 14:58:19 2012
New Revision: 1425471

URL: http://svn.apache.org/viewvc?rev=1425471&view=rev
Log:
[ONAMI-29] Fix generics bounds for Matcher - patch submitted by Mikhail Mazursky

Modified:
    incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
    incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AfterInjectionModule.java
    incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/DisposeModule.java

Modified: incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java?rev=1425471&r1=1425470&r2=1425471&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
(original)
+++ incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AbstractLifeCycleModule.java
Sun Dec 23 14:58:19 2012
@@ -24,6 +24,7 @@ import static com.google.inject.matcher.
 import java.lang.annotation.Annotation;
 
 import com.google.inject.AbstractModule;
+import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matcher;
 
 /**
@@ -41,7 +42,7 @@ abstract class AbstractLifeCycleModule
     /**
      * The type matcher to filter classes where looking for lifecycle annotations.
      */
-    private final Matcher<Object> typeMatcher;
+    private final Matcher<? super TypeLiteral<?>> typeMatcher;
 
     /**
      * Creates a new module which looks for the input lifecycle annotation on methods in
any type.
@@ -61,7 +62,7 @@ abstract class AbstractLifeCycleModule
      * @param typeMatcher the filter for injectee types.
      */
     public <A extends Annotation> AbstractLifeCycleModule( Class<A> annotationType,
-                                                           Matcher<Object> typeMatcher
)
+                                                           Matcher<? super TypeLiteral<?>>
typeMatcher )
     {
         if ( annotationType == null )
         {
@@ -90,7 +91,7 @@ abstract class AbstractLifeCycleModule
      *
      * @return the type matcher to filter classes where looking for lifecycle annotations.
      */
-    protected final Matcher<Object> getTypeMatcher()
+    protected final Matcher<? super TypeLiteral<?>> getTypeMatcher()
     {
         return typeMatcher;
     }

Modified: incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AfterInjectionModule.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AfterInjectionModule.java?rev=1425471&r1=1425470&r2=1425471&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AfterInjectionModule.java
(original)
+++ incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/AfterInjectionModule.java
Sun Dec 23 14:58:19 2012
@@ -26,6 +26,7 @@ import java.lang.reflect.InvocationTarge
 import java.lang.reflect.Method;
 
 import com.google.inject.ProvisionException;
+import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matcher;
 import com.google.inject.spi.InjectionListener;
 import com.google.inject.spi.TypeEncounter;
@@ -53,7 +54,7 @@ public final class AfterInjectionModule
      * @param typeMatcher the filter for injectee types.
      */
     public <A extends Annotation> AfterInjectionModule( Class<A> afterInjectionAnnotationType,
-                                                        Matcher<Object> typeMatcher
)
+                                                        Matcher<? super TypeLiteral<?>>
typeMatcher )
     {
         super( afterInjectionAnnotationType, typeMatcher );
     }

Modified: incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/DisposeModule.java
URL: http://svn.apache.org/viewvc/incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/DisposeModule.java?rev=1425471&r1=1425470&r2=1425471&view=diff
==============================================================================
--- incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/DisposeModule.java
(original)
+++ incubator/onami/trunk/lifecycle/src/main/java/org/apache/onami/lifecycle/DisposeModule.java
Sun Dec 23 14:58:19 2012
@@ -22,6 +22,7 @@ package org.apache.onami.lifecycle;
 import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 
+import com.google.inject.TypeLiteral;
 import com.google.inject.matcher.Matcher;
 import com.google.inject.spi.InjectionListener;
 import com.google.inject.spi.TypeEncounter;
@@ -49,7 +50,7 @@ public final class DisposeModule
      * @param typeMatcher the filter for injectee types.
      */
     public <A extends Annotation> DisposeModule( Class<A> disposeAnnotationType,
-                                                 Matcher<Object> typeMatcher )
+                                                 Matcher<? super TypeLiteral<?>>
typeMatcher )
     {
         super( disposeAnnotationType, typeMatcher );
     }



Mime
View raw message