[seam-commits] Seam SVN: r12425 - in modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml: annotations and 1 other directories.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Fri Apr 9 18:55:06 EDT 2010
Author: swd847
Date: 2010-04-09 18:55:06 -0400 (Fri, 09 Apr 2010)
New Revision: 12425
Added:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/XmlConfigured.java
Modified:
modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
Log:
Added @XmlConfigured annotation
Added: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/XmlConfigured.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/XmlConfigured.java (rev 0)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/annotations/XmlConfigured.java 2010-04-09 22:55:06 UTC (rev 12425)
@@ -0,0 +1,19 @@
+package org.jboss.seam.xml.annotations;
+
+import java.lang.annotation.Documented;
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+/**
+ * Signifies that a bean is designed to be configured through XML, and
+ * should therefore not be installed by default.
+ * @author Stuart Douglas
+ *
+ */
+ at Target(ElementType.TYPE)
+ at Retention(RetentionPolicy.RUNTIME)
+ at Documented
+public @interface XmlConfigured {
+
+}
Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-09 20:51:42 UTC (rev 12424)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/XmlExtension.java 2010-04-09 22:55:06 UTC (rev 12425)
@@ -23,6 +23,7 @@
import javax.enterprise.inject.spi.ProcessAnnotatedType;
import javax.enterprise.inject.spi.ProcessInjectionTarget;
+import org.jboss.seam.xml.annotations.XmlConfigured;
import org.jboss.seam.xml.core.BeanResult;
import org.jboss.seam.xml.core.XmlId;
import org.jboss.seam.xml.core.XmlResult;
@@ -143,7 +144,14 @@
{
log.info("Preventing installation of default bean: " + event.getAnnotatedType().getJavaClass().getName());
event.veto();
+ return;
}
+ if(event.getAnnotatedType().isAnnotationPresent(XmlConfigured.class))
+ {
+ log.info("Preventing installation of @XmlConfigured bean: " + event.getAnnotatedType().getJavaClass().getName());
+ event.veto();
+ return;
+ }
boolean found = false;
NewAnnotatedTypeBuilder builder = new NewAnnotatedTypeBuilder(event.getAnnotatedType());
for (XmlResult r : results)
More information about the seam-commits
mailing list