Skip to content

Commit

Permalink
Updated InjectionPorcessor to work with update injection impl
Browse files Browse the repository at this point in the history
  • Loading branch information
baileyje committed Mar 23, 2010
1 parent 8f47675 commit e8bc174
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
import org.jboss.injection.inject.pojo.FieldInjectionPoint; import org.jboss.injection.inject.pojo.FieldInjectionPoint;
import org.jboss.injection.inject.pojo.MethodInjectionPoint; import org.jboss.injection.inject.pojo.MethodInjectionPoint;
import org.jboss.injection.inject.spi.InjectionPoint; import org.jboss.injection.inject.spi.InjectionPoint;
import org.jboss.injection.inject.spi.Injector; import org.jboss.injection.inject.Injector;
import org.jboss.injection.inject.spi.ValueRetriever; import org.jboss.injection.inject.spi.ValueRetriever;
import org.jboss.metadata.javaee.spec.Environment; import org.jboss.metadata.javaee.spec.Environment;
import org.jboss.metadata.javaee.spec.ResourceInjectionMetaData; import org.jboss.metadata.javaee.spec.ResourceInjectionMetaData;
Expand Down Expand Up @@ -66,7 +66,7 @@ public class InjectionProcessor
* @param enc The ENC of the component to which the <code>environment</code> belongs * @param enc The ENC of the component to which the <code>environment</code> belongs
* @param cl The classloader of the component being processed * @param cl The classloader of the component being processed
* @param environment Environment being processed for injection targets * @param environment Environment being processed for injection targets
* @return * @return The injectors for the environment
* @throws Exception * @throws Exception
*/ */
public List<Injector<Object>> process(Context enc, ClassLoader cl, Environment environment) public List<Injector<Object>> process(Context enc, ClassLoader cl, Environment environment)
Expand Down Expand Up @@ -140,7 +140,7 @@ private <M extends Iterable<T>, T extends ResourceInjectionMetaData> List<Inject
// find the correct injection point (field or method) // find the correct injection point (field or method)
InjectionPoint<Object, Object> injectionPoint = getInjectionPoint(targetClass, targetName); InjectionPoint<Object, Object> injectionPoint = getInjectionPoint(targetClass, targetName);
// create an injector // create an injector
Injector<Object> injector = InjectorFactory.create(injectionPoint, encValRetriever); Injector<Object> injector = new Injector<Object>(injectionPoint, encValRetriever);


// add this injector to the injectors to be returned // add this injector to the injectors to be returned
injectors.add(injector); injectors.add(injector);
Expand Down Expand Up @@ -177,15 +177,15 @@ private InjectionPoint<Object, Object> getInjectionPoint(Class<?> injectionTarge
} }
if (m.getName().equals(methodName)) if (m.getName().equals(methodName))
{ {
return new MethodInjectionPoint(m); return new MethodInjectionPoint<Object, Object>(m);
} }
} }
// the target is not a method, so let's try a field // the target is not a method, so let's try a field
// now // now
try try
{ {
Field field = injectionTargetClass.getDeclaredField(injectionTargetName); Field field = injectionTargetClass.getDeclaredField(injectionTargetName);
return new FieldInjectionPoint(field); return new FieldInjectionPoint<Object, Object>(field);
} }
catch (SecurityException e) catch (SecurityException e)
{ {
Expand Down

0 comments on commit e8bc174

Please sign in to comment.