(no commit message)
[utils] / test / enterprise / src / main / java / org / wamblee / test / inject / JavaEETestInjector.java
index 8fe52ac10203de9030c599709c430d8b4fd85584..853d312c893cbdd8099e8c5c2d9c943e0f6509ee 100644 (file)
@@ -37,10 +37,11 @@ import org.wamblee.reflection.ObjectTraversal.ObjectVisitor;
  * </p>
  * 
  * <p>
- * It works by first delegating to the default injector (typically CDI). Afterwards it traverses the
- * object graph of the injected object and performs custom injection of test objects as specified by the
- * {@link Binding} class. This approach makes sure that test dependencies also find their way into 
- * objects that were created by the injection framework. 
+ * It works by first delegating to the default injector (typically CDI).
+ * Afterwards it traverses the object graph of the injected object and performs
+ * custom injection of test objects as specified by the {@link Binding} class.
+ * This approach makes sure that test dependencies also find their way into
+ * objects that were created by the injection framework.
  * </p>
  * 
  * @author Erik Brakkee
@@ -50,37 +51,44 @@ public class JavaEETestInjector implements Injector {
     private class InjectionVisitor implements ObjectVisitor {
         @Override
         public boolean mustVisit(Class aClass) {
-            if (EntityManager.class.isAssignableFrom(aClass)) { 
+            if (EntityManager.class.isAssignableFrom(aClass)) {
                 return false;
             }
             return true;
         }
+
         @Override
         public boolean mustVisit(Field aField) {
             // just process any field with annotations
-            return aField.getAnnotations().length > 0;  
+            return aField.getAnnotations().length > 0;
         }
+
         @Override
         public boolean mustVisit(Method aMethod) {
             return false;
         }
+
         @Override
         public boolean visitArray(Object aArray) {
             return true;
         }
+
         @Override
         public boolean visitList(List aObject) {
             return true;
         }
+
         @Override
         public boolean visitMap(Map aObject) {
             return true;
         }
+
         @Override
         public boolean visitPlainObject(Object aObject) {
             performTestInjections(aObject);
             return true;
         }
+
         @Override
         public boolean visitSet(Set aSet) {
             return true;
@@ -110,7 +118,7 @@ public class JavaEETestInjector implements Injector {
     public void inject(Object aComponent) {
         // basic injection
         delegate.inject(aComponent);
-        
+
         // Now perform test injections.
         ObjectTraversal traversal = new ObjectTraversal(new InjectionVisitor());
         traversal.accept(aComponent);