[jboss-cvs] JBossAS SVN: r64344 - in projects/microcontainer/trunk/kernel/src: tests/org/jboss/test/kernel/inject/support and 1 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Mon Jul 30 08:29:06 EDT 2007
Author: alesj
Date: 2007-07-30 08:29:06 -0400 (Mon, 30 Jul 2007)
New Revision: 64344
Removed:
projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Callback.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/CallbackType.java
Modified:
projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Install.java
projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Uninstall.java
projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/support/AnnotationAdditionCallbackTestObjectImpl.java
projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/test/ContextualInjectionTestSuite.java
Log:
Removed @Callback - should use @Install or @Uninstall.
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Callback.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Callback.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Callback.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -1,66 +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.beans.metadata.plugins.annotations;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
- at Retention(RetentionPolicy.RUNTIME)
- at Target({ElementType.METHOD})
-public @interface Callback
-{
- /**
- * Define callback type - install or uninstall.
- *
- * @return type
- */
- CallbackType type();
-
- /**
- * Get the cardinality.
- * Default is no cardinality.
- *
- * @return cardinality
- */
- String cardinality() default "";
-
- /**
- * Get when required.
- * Default is Configured.
- *
- * @return when required.
- */
- String whenRequired() default "Configured";
-
- /**
- * Get dependent state.
- * Default is Installed.
- *
- * @return dependent state.
- */
- String dependentState() default "Installed";
-}
Deleted: projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/CallbackType.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/CallbackType.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/CallbackType.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -1,50 +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.beans.metadata.plugins.annotations;
-
-/**
- * Callback type - Install or Uninstall.
- *
- * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
- */
-public enum CallbackType
-{
- INSTALL(true),
- UNINSTALL(false);
-
- private boolean type;
-
- CallbackType(boolean type)
- {
- this.type = type;
- }
-
- /**
- * Is install or uninstall.
- *
- * @return true for install, false for uninstall
- */
- public boolean isInstallPhase()
- {
- return type;
- }
-}
Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Install.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Install.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Install.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -28,7 +28,6 @@
/**
* Install callback.
- * @see org.jboss.beans.metadata.plugins.annotations.Callback
*
* @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
*/
Modified: projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Uninstall.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Uninstall.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/main/org/jboss/beans/metadata/plugins/annotations/Uninstall.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -28,7 +28,6 @@
/**
* Uninstall callback.
- * @see org.jboss.beans.metadata.plugins.annotations.Callback
*
* @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
*/
Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/support/AnnotationAdditionCallbackTestObjectImpl.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/support/AnnotationAdditionCallbackTestObjectImpl.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/support/AnnotationAdditionCallbackTestObjectImpl.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -24,8 +24,8 @@
import java.util.HashSet;
import java.util.Set;
-import org.jboss.beans.metadata.plugins.annotations.Callback;
-import org.jboss.beans.metadata.plugins.annotations.CallbackType;
+import org.jboss.beans.metadata.plugins.annotations.Install;
+import org.jboss.beans.metadata.plugins.annotations.Uninstall;
/**
* @author <a href="mailto:ales.justin at gmail.com">Ales Justin</a>
@@ -42,14 +42,14 @@
}
}
- @Callback(type = CallbackType.INSTALL)
+ @Install
public void addTesterInterface(TesterInterface tester)
{
init();
testerInterfaces.add(tester);
}
- @Callback(type = CallbackType.UNINSTALL)
+ @Uninstall
public void removeTesterInterface(TesterInterface tester)
{
init();
Modified: projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/test/ContextualInjectionTestSuite.java
===================================================================
--- projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/test/ContextualInjectionTestSuite.java 2007-07-30 11:13:36 UTC (rev 64343)
+++ projects/microcontainer/trunk/kernel/src/tests/org/jboss/test/kernel/inject/test/ContextualInjectionTestSuite.java 2007-07-30 12:29:06 UTC (rev 64344)
@@ -51,12 +51,9 @@
suite.addTest(CardinalityCallbackTestCase.suite());
suite.addTest(BadCardinalityCallbackTestCase.suite());
suite.addTest(CandidateContextualInjectionTestCase.suite());
-/*
- TODO
suite.addTest(AdditionAnnotationCallbackTestCase.suite());
suite.addTest(CollectionAnnotationCallbackTestCase.suite());
suite.addTest(CardinalityAnnotationCallbackTestCase.suite());
-*/
suite.addTest(GenericsContextualInjectionTestCase.suite());
return suite;
More information about the jboss-cvs-commits
mailing list