Author: pete.muir(a)jboss.org
Date: 2009-03-15 11:45:52 -0400 (Sun, 15 Mar 2009)
New Revision: 2002
Added:
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/NonContextualInjector.java
Removed:
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
Log:
minor
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-15 15:43:00
UTC (rev 2001)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/ManagerImpl.java 2009-03-15 15:45:52
UTC (rev 2002)
@@ -70,7 +70,7 @@
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.injection.ResolvableAnnotatedClass;
import org.jboss.webbeans.injection.Resolver;
-import org.jboss.webbeans.injection.ServletInjector;
+import org.jboss.webbeans.injection.NonContextualInjector;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedMethod;
@@ -134,7 +134,7 @@
private final transient Map<Bean<?>, Bean<?>> specializedBeans;
- private final transient ServletInjector servletInjector;
+ private final transient NonContextualInjector nonContextualInjector;
/**
* Create a new manager
@@ -162,7 +162,7 @@
}
};
this.specializedBeans = new HashMap<Bean<?>, Bean<?>>();
- this.servletInjector = new ServletInjector(this);
+ this.nonContextualInjector = new NonContextualInjector(this);
List<Class<? extends Annotation>> defaultEnabledDeploymentTypes = new
ArrayList<Class<? extends Annotation>>();
defaultEnabledDeploymentTypes.add(0, Standard.class);
defaultEnabledDeploymentTypes.add(1, Production.class);
@@ -617,7 +617,7 @@
public void injectNonContextualInstance(Object instance)
{
- servletInjector.inject(instance);
+ nonContextualInjector.inject(instance);
}
@SuppressWarnings("unchecked")
Copied:
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/NonContextualInjector.java (from
rev 2001, ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/NonContextualInjector.java
(rev 0)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/NonContextualInjector.java 2009-03-15
15:45:52 UTC (rev 2002)
@@ -0,0 +1,41 @@
+package org.jboss.webbeans.injection;
+
+import java.util.Set;
+import java.util.concurrent.Callable;
+
+import org.jboss.webbeans.ManagerImpl;
+import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
+import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.collections.ConcurrentCache;
+
+public class NonContextualInjector
+{
+
+ private final ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>> instances;
+ private final ManagerImpl manager;
+
+ public NonContextualInjector(ManagerImpl manager)
+ {
+ this.manager = manager;
+ this.instances = new ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>>();
+ }
+
+ public void inject(final Object instance)
+ {
+ Set<FieldInjectionPoint<?>> injectionPoints =
instances.putIfAbsent(instance.getClass(), new
Callable<Set<FieldInjectionPoint<?>>>()
+ {
+
+ public Set<FieldInjectionPoint<?>> call() throws Exception
+ {
+ return
Beans.getFieldInjectionPoints(AnnotatedClassImpl.of(instance.getClass()), null);
+ }
+
+ }
+ );
+ for (FieldInjectionPoint<?> injectionPoint : injectionPoints)
+ {
+ injectionPoint.inject(instance, manager, null);
+ }
+ }
+
+}
Property changes on:
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/NonContextualInjector.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java
===================================================================
---
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java 2009-03-15
15:43:00 UTC (rev 2001)
+++
ri/trunk/impl/src/main/java/org/jboss/webbeans/injection/ServletInjector.java 2009-03-15
15:45:52 UTC (rev 2002)
@@ -1,41 +0,0 @@
-package org.jboss.webbeans.injection;
-
-import java.util.Set;
-import java.util.concurrent.Callable;
-
-import org.jboss.webbeans.ManagerImpl;
-import org.jboss.webbeans.introspector.jlr.AnnotatedClassImpl;
-import org.jboss.webbeans.util.Beans;
-import org.jboss.webbeans.util.collections.ConcurrentCache;
-
-public class ServletInjector
-{
-
- private final ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>> instances;
- private final ManagerImpl manager;
-
- public ServletInjector(ManagerImpl manager)
- {
- this.manager = manager;
- this.instances = new ConcurrentCache<Class<?>,
Set<FieldInjectionPoint<?>>>();
- }
-
- public void inject(final Object instance)
- {
- Set<FieldInjectionPoint<?>> injectionPoints =
instances.putIfAbsent(instance.getClass(), new
Callable<Set<FieldInjectionPoint<?>>>()
- {
-
- public Set<FieldInjectionPoint<?>> call() throws Exception
- {
- return
Beans.getFieldInjectionPoints(AnnotatedClassImpl.of(instance.getClass()), null);
- }
-
- }
- );
- for (FieldInjectionPoint<?> injectionPoint : injectionPoints)
- {
- injectionPoint.inject(instance, manager, null);
- }
- }
-
-}
Show replies by date