openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1175152 - /openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
Date Sat, 24 Sep 2011 10:47:31 GMT
Author: struberg
Date: Sat Sep 24 10:47:31 2011
New Revision: 1175152

URL: http://svn.apache.org/viewvc?rev=1175152&view=rev
Log:
OWB-617 we provide a Bean for Instance<T> and not only Provider<T>

Previously only Providers could be found, now we also find Instances

Modified:
    openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java

Modified: openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
URL: http://svn.apache.org/viewvc/openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java?rev=1175152&r1=1175151&r2=1175152&view=diff
==============================================================================
--- openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
(original)
+++ openwebbeans/trunk/webbeans-impl/src/main/java/org/apache/webbeans/component/InstanceBean.java
Sat Sep 24 10:47:31 2011
@@ -26,12 +26,11 @@ import javax.enterprise.context.spi.Crea
 import javax.enterprise.inject.Instance;
 import javax.enterprise.inject.spi.InjectionPoint;
 import javax.enterprise.util.TypeLiteral;
-import javax.inject.Provider;
 
 import org.apache.webbeans.config.WebBeansContext;
 import org.apache.webbeans.inject.instance.InstanceFactory;
 
-public class InstanceBean<T> extends AbstractOwbBean<Provider<T>>
+public class InstanceBean<T> extends AbstractOwbBean<Instance<T>>
 {
     // TODO refactor. public static variables are uterly ugly
     public static ThreadLocal<InjectionPoint> local = new ThreadLocal<InjectionPoint>();
@@ -39,12 +38,12 @@ public class InstanceBean<T> extends Abs
     @SuppressWarnings("serial")
     public InstanceBean(WebBeansContext webBeansContext)
     {
-        super(WebBeansType.INSTANCE, new TypeLiteral<Provider<T>>(){}.getRawType(),
webBeansContext);
+        super(WebBeansType.INSTANCE, new TypeLiteral<Instance<T>>(){}.getRawType(),
webBeansContext);
     }
     
          
     @Override
-    protected Provider<T> createInstance(CreationalContext<Provider<T>>
creationalContext)
+    protected Instance<T> createInstance(CreationalContext<Instance<T>>
creationalContext)
     {
         try
         {
@@ -76,4 +75,4 @@ public class InstanceBean<T> extends Abs
     
     
     
-}
\ No newline at end of file
+}



Mime
View raw message