[seam-commits] Seam SVN: r13358 - in modules/xml/trunk/impl/src: main/java/org/jboss/seam/xml/model and 3 other directories.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Sat Jul 10 20:40:20 EDT 2010


Author: swd847
Date: 2010-07-10 20:40:19 -0400 (Sat, 10 Jul 2010)
New Revision: 13358

Added:
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModifiesXmlItem.java
Removed:
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ExtendsXmlItem.java
Modified:
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/XmlItemType.java
   modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java
   modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
   modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/simple/simple-beans.xml
Log:
rename extends to modifies



Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/bootstrap/ResourceLoaderXmlDocumentProvider.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -97,8 +97,8 @@
       {
          Set<URL> e = getResources(i);
          docs.addAll(e);
-         iterator = docs.listIterator();
       }
+      iterator = docs.listIterator();
    }
 
    protected Set<URL> getResources(String resource)

Deleted: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ExtendsXmlItem.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ExtendsXmlItem.java	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ExtendsXmlItem.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2010, Red Hat, Inc., and individual contributors
- * 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.seam.xml.model;
-
-import java.util.Collections;
-import java.util.Set;
-
-public class ExtendsXmlItem extends AbstractXmlItem
-{
-
-   public ExtendsXmlItem(XmlItem parent, String document, int lineno)
-   {
-      super(XmlItemType.EXTENDS, parent, null, null, null, document, lineno);
-
-   }
-
-   public Set<XmlItemType> getAllowedItem()
-   {
-      return Collections.emptySet();
-   }
-
-}

Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModelBuilder.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -302,7 +302,7 @@
    BeanResult<?> buildAnnotatedType(ClassXmlItem rb)
    {
       boolean override = !rb.getChildrenOfType(OverrideXmlItem.class).isEmpty();
-      boolean extend = !rb.getChildrenOfType(ExtendsXmlItem.class).isEmpty();
+      boolean extend = !rb.getChildrenOfType(ModifiesXmlItem.class).isEmpty();
       BeanResultType beanType = BeanResultType.ADD;
       if (override && extend)
       {

Copied: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModifiesXmlItem.java (from rev 13307, modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ExtendsXmlItem.java)
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModifiesXmlItem.java	                        (rev 0)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/ModifiesXmlItem.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -0,0 +1,41 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, Red Hat, Inc., and individual contributors
+ * 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.seam.xml.model;
+
+import java.util.Collections;
+import java.util.Set;
+
+public class ModifiesXmlItem extends AbstractXmlItem
+{
+
+   public ModifiesXmlItem(XmlItem parent, String document, int lineno)
+   {
+      super(XmlItemType.MODIFIES, parent, null, null, null, document, lineno);
+
+   }
+
+   public Set<XmlItemType> getAllowedItem()
+   {
+      return Collections.emptySet();
+   }
+
+}

Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/XmlItemType.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/XmlItemType.java	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/model/XmlItemType.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -23,5 +23,5 @@
 
 public enum XmlItemType
 {
-   CLASS, METHOD, FIELD, ANNOTATION, VALUE, ENTRY, KEY, DEPENDENCY, PARAMETERS, PARAMETER, ARRAY, OVERRIDE, EXTENDS, TYPE, GENERIC_BEAN;
+   CLASS, METHOD, FIELD, ANNOTATION, VALUE, ENTRY, KEY, DEPENDENCY, PARAMETERS, PARAMETER, ARRAY, OVERRIDE, MODIFIES, TYPE, GENERIC_BEAN;
 }

Modified: modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java
===================================================================
--- modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/main/java/org/jboss/seam/xml/parser/namespace/RootNamespaceElementResolver.java	2010-07-11 00:40:19 UTC (rev 13358)
@@ -26,10 +26,10 @@
 import org.jboss.seam.xml.model.EntryXmlItem;
 import org.jboss.seam.xml.model.GenericBeanXmlItem;
 import org.jboss.seam.xml.model.KeyXmlItem;
+import org.jboss.seam.xml.model.ModifiesXmlItem;
 import org.jboss.seam.xml.model.OverrideXmlItem;
 import org.jboss.seam.xml.model.ParameterXmlItem;
 import org.jboss.seam.xml.model.ParametersXmlItem;
-import org.jboss.seam.xml.model.ExtendsXmlItem;
 import org.jboss.seam.xml.model.TypeXmlItem;
 import org.jboss.seam.xml.model.ValueXmlItem;
 import org.jboss.seam.xml.model.XmlItem;
@@ -79,9 +79,9 @@
       {
          return new OverrideXmlItem(parent, node.getDocument(), node.getLineNo());
       }
-      else if (item.equals("extends"))
+      else if (item.equals("modifies"))
       {
-         return new ExtendsXmlItem(parent, node.getDocument(), node.getLineNo());
+         return new ModifiesXmlItem(parent, node.getDocument(), node.getLineNo());
       }
       else if (item.equals("parameters"))
       {

Modified: modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml
===================================================================
--- modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/generic/generic-beans.xml	2010-07-11 00:40:19 UTC (rev 13358)
@@ -5,19 +5,21 @@
 	<genericBean class="org.jboss.seam.xml.test.generic.GenericMain" >
 		<test:GenericDependant>
 			<ApplyQualifiers/>
-			<extends/>
+			<modifies/>
 			<test:instance>
 				<ApplyQualifiers/>
 			</test:instance>
 		</test:GenericDependant>
 	</genericBean>
 	
-	<test:GenericMain><extends/>
+	<test:GenericMain>
+	    <modifies/>
 		<test:HighGenericQualifier/>
 		<test:configuredValue><value>100</value></test:configuredValue>
 	</test:GenericMain>
 	
-	<test:GenericMain><extends/>
+	<test:GenericMain>
+	    <modifies/>
 		<test:LowGenericQualifier/>
 		<test:configuredValue><value>10</value></test:configuredValue>
 	</test:GenericMain>

Modified: modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/simple/simple-beans.xml
===================================================================
--- modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/simple/simple-beans.xml	2010-07-09 23:56:38 UTC (rev 13357)
+++ modules/xml/trunk/impl/src/test/resources/org/jboss/seam/xml/test/simple/simple-beans.xml	2010-07-11 00:40:19 UTC (rev 13358)
@@ -29,7 +29,7 @@
     </test:OverriddenBean>
     
     <test:ExtendedBean>
-         <extends/>
+         <modifies/>
          <test:ExtendedQualifier2/>
     </test:ExtendedBean>
           



More information about the seam-commits mailing list