[jboss-cvs] JBossAS SVN: r71018 - in projects/microcontainer/trunk/kernel/src: tests/org/jboss/test/kernel/annotations/support and 2 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Mar 19 12:39:09 EDT 2008


Author: adrian at jboss.org
Date: 2008-03-19 12:39:09 -0400 (Wed, 19 Mar 2008)
New Revision: 71018

Added:
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/support/AfterInstallVerifier.java
Removed:
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AfterInstallVerifier.java
Modified:
   projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/InjectableMemberAnnotationPlugin.java
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractRunAnnotationsTest.java
   projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/field/BasicFieldAnnotationSupportTestCase.java
Log:
Support classes go in support, and other source tidyup

Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/InjectableMemberAnnotationPlugin.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/InjectableMemberAnnotationPlugin.java	2008-03-19 16:32:35 UTC (rev 71017)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/kernel/plugins/annotations/InjectableMemberAnnotationPlugin.java	2008-03-19 16:39:09 UTC (rev 71018)
@@ -38,6 +38,7 @@
 /**
  * Injectable member annotation plugin.
  *
+ * @param <T> the annotated info
  * @param <C> annotation type
  * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
  */

Copied: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/support/AfterInstallVerifier.java (from rev 71016, projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AfterInstallVerifier.java)
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/support/AfterInstallVerifier.java	                        (rev 0)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/support/AfterInstallVerifier.java	2008-03-19 16:39:09 UTC (rev 71018)
@@ -0,0 +1,35 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.test.kernel.annotations.support;
+
+/**
+ * Abstract annotation runner test.
+ *
+ * @param <T> exact type
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface AfterInstallVerifier<T>
+{
+   void verify(T target);
+
+   Class<T> getTargetClass();
+}

Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractRunAnnotationsTest.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractRunAnnotationsTest.java	2008-03-19 16:32:35 UTC (rev 71017)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AbstractRunAnnotationsTest.java	2008-03-19 16:39:09 UTC (rev 71018)
@@ -32,6 +32,7 @@
 import org.jboss.kernel.spi.dependency.KernelController;
 import org.jboss.kernel.spi.dependency.KernelControllerContext;
 import org.jboss.test.BaseTestCase;
+import org.jboss.test.kernel.annotations.support.AfterInstallVerifier;
 import org.jboss.dependency.spi.ControllerState;
 
 /**
@@ -42,7 +43,7 @@
 public abstract class AbstractRunAnnotationsTest extends BaseTestCase
 {
    private KernelController controller;
-   private Map<Class<?>, AfterInstallVerifier> verifiers = new HashMap<Class<?>, AfterInstallVerifier>();
+   private Map<Class<?>, AfterInstallVerifier<?>> verifiers = new HashMap<Class<?>, AfterInstallVerifier<?>>();
    
    protected AbstractRunAnnotationsTest(String name)
    {
@@ -131,13 +132,14 @@
     * Useful for single tests.
     * Else determine the test by parameters.
     *
+    * @param <T> the type
     * @param clazz the class
     * @param target the target
     */
    @SuppressWarnings("unchecked")
    protected <T> void doTestAfterInstall(Class<T> clazz, T target)
    {
-      AfterInstallVerifier<T> verifier = verifiers.get(clazz);
+      AfterInstallVerifier<T> verifier = (AfterInstallVerifier) verifiers.get(clazz);
       if (verifier != null)
          verifier.verify(target);
       else

Deleted: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AfterInstallVerifier.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AfterInstallVerifier.java	2008-03-19 16:32:35 UTC (rev 71017)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/AfterInstallVerifier.java	2008-03-19 16:39:09 UTC (rev 71018)
@@ -1,35 +0,0 @@
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2006, JBoss Inc., and individual contributors as indicated
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* This is free software; you can redistribute it and/or modify it
-* under the terms of the GNU Lesser General Public License as
-* published by the Free Software Foundation; either version 2.1 of
-* the License, or (at your option) any later version.
-*
-* This software is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-* Lesser General Public License for more details.
-*
-* You should have received a copy of the GNU Lesser General Public
-* License along with this software; if not, write to the Free
-* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
-* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-*/
-package org.jboss.test.kernel.annotations.test;
-
-/**
- * Abstract annotation runner test.
- *
- * @param <T> exact type
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public interface AfterInstallVerifier<T>
-{
-   void verify(T target);
-
-   Class<T> getTargetClass();
-}

Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/field/BasicFieldAnnotationSupportTestCase.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/field/BasicFieldAnnotationSupportTestCase.java	2008-03-19 16:32:35 UTC (rev 71017)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/annotations/test/field/BasicFieldAnnotationSupportTestCase.java	2008-03-19 16:39:09 UTC (rev 71018)
@@ -22,7 +22,7 @@
 package org.jboss.test.kernel.annotations.test.field;
 
 import org.jboss.test.kernel.annotations.test.AbstractBeanAnnotationAdapterTest;
-import org.jboss.test.kernel.annotations.test.AfterInstallVerifier;
+import org.jboss.test.kernel.annotations.support.AfterInstallVerifier;
 import org.jboss.test.kernel.annotations.support.TestBean;
 import org.jboss.test.kernel.annotations.support.MyDeployer;
 import org.jboss.test.kernel.annotations.support.InjectTester;




More information about the jboss-cvs-commits mailing list