[jboss-svn-commits] JBoss Common SVN: r2701 - in jbossxb/trunk/src: main/java/org/jboss/xb/builder/runtime and 3 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Jan 18 11:55:54 EST 2008


Author: alex.loubyansky at jboss.com
Date: 2008-01-18 11:55:54 -0500 (Fri, 18 Jan 2008)
New Revision: 2701

Added:
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyAttributeValueEntryContent.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueAttributes.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueSequence.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntry.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWrappedKeyValueSequence.java
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyAttributeValueEntryContent.xml
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueAttributes.xml
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueSequence.xml
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntry.xml
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.xml
   jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWrappedKeyValueSequence.xml
Modified:
   jbossxb/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java
   jbossxb/trunk/src/main/java/org/jboss/xb/builder/runtime/MapPropertyHandler.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/Root.java
   jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntryUnitTestCase.java
Log:
JBXB-117 support for @JBossXmlMapXXX annotations on the Map type

Modified: jbossxb/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java
===================================================================
--- jbossxb/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java	2008-01-15 14:32:49 UTC (rev 2700)
+++ jbossxb/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -642,7 +642,7 @@
     */
    public TypeBinding generateMap(ClassInfo typeInfo)
    {
-      // TODO generateMap
+      // the map is bound in bindProperty method currently
       return generateBean(typeInfo);
    }
 
@@ -1685,21 +1685,31 @@
                localPropertyType = findActualType((ClassInfo) localPropertyType, parameterizedType,
                      java.util.Collection.class, 0);
             }
-            else if (propertyType.isMap() && ((ClassInfo) propertyType).getUnderlyingAnnotation(XmlType.class) == null)
+            else if (propertyType.isMap() /*&& ((ClassInfo) propertyType).getUnderlyingAnnotation(XmlType.class) == null*/)
             {
                JBossXmlMapEntry entryElement = property.getUnderlyingAnnotation(JBossXmlMapEntry.class);
+               if(entryElement == null)
+                  entryElement = ((ClassInfo)localPropertyType).getUnderlyingAnnotation(JBossXmlMapEntry.class);
                JBossXmlMapKeyElement keyElement = property.getUnderlyingAnnotation(JBossXmlMapKeyElement.class);
+               if(keyElement == null)
+                  keyElement = ((ClassInfo)localPropertyType).getUnderlyingAnnotation(JBossXmlMapKeyElement.class);
                JBossXmlMapKeyAttribute keyAttribute = property.getUnderlyingAnnotation(JBossXmlMapKeyAttribute.class);
+               if(keyAttribute == null)
+                  keyAttribute = ((ClassInfo)localPropertyType).getUnderlyingAnnotation(JBossXmlMapKeyAttribute.class);
                
                if(keyElement != null || keyAttribute != null)
                {
                   // further assuming the map is bound
 
                   JBossXmlMapValueElement valueElement = property.getUnderlyingAnnotation(JBossXmlMapValueElement.class);
+                  if(valueElement == null)
+                     valueElement = ((ClassInfo)localPropertyType).getUnderlyingAnnotation(JBossXmlMapValueElement.class);
                   JBossXmlMapValueAttribute valueAttribute = property.getUnderlyingAnnotation(JBossXmlMapValueAttribute.class);
+                  if(valueAttribute == null)
+                     valueAttribute = ((ClassInfo)localPropertyType).getUnderlyingAnnotation(JBossXmlMapValueAttribute.class);
 
-                  TypeInfo keyType = ((ClassInfo)propertyType).getKeyType();
-                  TypeInfo valueType = ((ClassInfo)propertyType).getValueType();
+                  TypeInfo keyType = ((ClassInfo)localPropertyType).getKeyType();
+                  TypeInfo valueType = ((ClassInfo)localPropertyType).getValueType();
 
                   // entry handler
                   BeanAdapterFactory entryAdapterFactory = null;

Modified: jbossxb/trunk/src/main/java/org/jboss/xb/builder/runtime/MapPropertyHandler.java
===================================================================
--- jbossxb/trunk/src/main/java/org/jboss/xb/builder/runtime/MapPropertyHandler.java	2008-01-15 14:32:49 UTC (rev 2700)
+++ jbossxb/trunk/src/main/java/org/jboss/xb/builder/runtime/MapPropertyHandler.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -89,6 +89,9 @@
       }
       
       JBossXmlMapEntry entry = propertyInfo.getUnderlyingAnnotation(JBossXmlMapEntry.class);
+      if(entry == null)
+         entry =((ClassInfo)propertyType).getUnderlyingAnnotation(JBossXmlMapEntry.class);
+      
       if(entry != null && !JBossXmlMapEntry.DEFAULT.class.equals(entry.type()))
       {
          BeanInfo entryBean = config.getBeanInfo(entry.type());

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyAttributeValueEntryContent.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyAttributeValueEntryContent.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyAttributeValueEntryContent.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import org.jboss.xb.annotations.JBossXmlMapEntry;
+import org.jboss.xb.annotations.JBossXmlMapKeyAttribute;
+
+
+/**
+ * A AnnotatedMapKeyAttributeValueEntryContent.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlMapEntry(name = "annotated-map-key-attr-value-entry-content")
+ at JBossXmlMapKeyAttribute(name = "key")
+public class AnnotatedMapKeyAttributeValueEntryContent extends HashMap<String,Integer>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+}

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueAttributes.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueAttributes.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueAttributes.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,44 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import org.jboss.xb.annotations.JBossXmlMapEntry;
+import org.jboss.xb.annotations.JBossXmlMapKeyAttribute;
+import org.jboss.xb.annotations.JBossXmlMapValueAttribute;
+
+
+/**
+ * A AnnotatedMapKeyValueAttributes.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlMapEntry(name = "annotated-map-key-value-attr")
+ at JBossXmlMapKeyAttribute(name = "key")
+ at JBossXmlMapValueAttribute(name = "value")
+public class AnnotatedMapKeyValueAttributes<K,V> extends HashMap<K,V>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+}

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueSequence.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueSequence.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapKeyValueSequence.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import org.jboss.xb.annotations.JBossXmlMapKeyElement;
+import org.jboss.xb.annotations.JBossXmlMapValueElement;
+
+
+/**
+ * A AnnotatedMapKeyValueSequence.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlMapKeyElement(name = "key-kvs")
+ at JBossXmlMapValueElement(name = "value-kvs")
+public class AnnotatedMapKeyValueSequence extends HashMap<String, Integer>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+}

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntry.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntry.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntry.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.xb.annotations.JBossXmlMapEntry;
+
+
+/**
+ * A AnnotatedMapWithEntryTypeKeyAttributeValueEntry.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType
+ at JBossXmlMapEntry(name = "annotated-map-entry-type-key-attr-value-entry", type=EntryTypeKeyAttributeValueEntry.class)
+public class AnnotatedMapWithEntryTypeKeyAttributeValueEntry extends HashMap<String, EntryTypeKeyAttributeValueEntry>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+}

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import org.jboss.xb.annotations.JBossXmlMapEntry;
+
+
+/**
+ * A AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlMapEntry(name = "annotated-map-with-entry-type-key-attr-value-entry-content", type=EntryTypeKeyAttributeValueEntryContent.class)
+public class AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent extends HashMap<String,Integer>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+}

Added: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWrappedKeyValueSequence.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWrappedKeyValueSequence.java	                        (rev 0)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/AnnotatedMapWrappedKeyValueSequence.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.xb.builder.object.jbossxmlmapentry.support;
+
+import java.util.HashMap;
+
+import org.jboss.xb.annotations.JBossXmlMapEntry;
+import org.jboss.xb.annotations.JBossXmlMapKeyElement;
+import org.jboss.xb.annotations.JBossXmlMapValueElement;
+
+
+/**
+ * A AnnotatedMapWrappedKeyValueSequence.
+ * 
+ * @author <a href="alex at jboss.com">Alexey Loubyansky</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlMapEntry(name = "annotated-map-wrapped-key-value")
+ at JBossXmlMapKeyElement(name = "key")
+ at JBossXmlMapValueElement(name = "value")
+public class AnnotatedMapWrappedKeyValueSequence extends HashMap<String, Integer>
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1L;
+
+}

Modified: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/Root.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/Root.java	2008-01-15 14:32:49 UTC (rev 2700)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/support/Root.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -23,6 +23,7 @@
 
 import java.util.Map;
 
+import javax.xml.bind.annotation.XmlElement;
 import javax.xml.bind.annotation.XmlRootElement;
 
 import org.jboss.xb.annotations.JBossXmlMapEntry;
@@ -43,6 +44,12 @@
 {
    private Map<String, Integer> stringToInteger;
    private Map<String, EntryTypeKeyAttributeValueEntry> entryTypeMap;
+   private AnnotatedMapKeyValueSequence annotatedMapKeyValueSequence;
+   private AnnotatedMapWrappedKeyValueSequence annotatedWrappedMapKeyValueSequence;
+   private AnnotatedMapKeyValueAttributes<String,Integer> annotatedMapKeyValueAttributes;
+   private AnnotatedMapKeyAttributeValueEntryContent annotatedMapKeyAttributeValueEntryContent;
+   private AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent annotatedMapWithEntryTypeKeyAttributeValueEntryContent;
+   private Map<String, EntryTypeKeyAttributeValueEntry> annotatedMapWithEntryTypeKeyAttributeValueEntry;
    
    @JBossXmlMapKeyElement(name = "key")
    @JBossXmlMapValueElement(name = "value")
@@ -56,6 +63,16 @@
       this.stringToInteger = value;
    }
 
+   public AnnotatedMapKeyValueSequence getAnnotatedMapKeyValueSequence()
+   {
+      return this.annotatedMapKeyValueSequence;
+   }
+
+   public void setAnnotatedMapKeyValueSequence(AnnotatedMapKeyValueSequence value)
+   {
+      this.annotatedMapKeyValueSequence = value;
+   }
+
    @JBossXmlMapEntry(name = "wrapped-key-value")
    @JBossXmlMapKeyElement(name = "key")
    @JBossXmlMapValueElement(name = "value")
@@ -69,6 +86,16 @@
       this.stringToInteger = value;
    }
 
+   public AnnotatedMapWrappedKeyValueSequence getAnnotatedMapWrappedKeyValueSequence()
+   {
+      return this.annotatedWrappedMapKeyValueSequence;
+   }
+   
+   public void setAnnotatedMapWrappedKeyValueSequence(AnnotatedMapWrappedKeyValueSequence value)
+   {
+      this.annotatedWrappedMapKeyValueSequence = value;
+   }
+
    @JBossXmlMapEntry(name = "key-value-attr")
    @JBossXmlMapKeyAttribute(name = "key")
    @JBossXmlMapValueAttribute(name = "value")
@@ -82,6 +109,16 @@
       this.stringToInteger = value;
    }
 
+   public AnnotatedMapKeyValueAttributes<String, Integer> getAnnotatedMapKeyValueAttributes()
+   {
+      return this.annotatedMapKeyValueAttributes;
+   }
+   
+   public void setAnnotatedMapKeyValueAttributes(AnnotatedMapKeyValueAttributes<String,Integer> value)
+   {
+      this.annotatedMapKeyValueAttributes = value;
+   }
+
    @JBossXmlMapEntry(name = "key-attr-value-entry-content")
    @JBossXmlMapKeyAttribute(name = "key")
    public Map<String, Integer> getKeyAttributeValueEntryContent()
@@ -89,11 +126,21 @@
       return this.stringToInteger;
    }
    
-   public void setKeyAttributeValueEntryContent(Map<String, Integer> value)
+   public void setKeyAttributeValueEntryContent(Map<String,Integer> value)
    {
       this.stringToInteger = value;
    }
 
+   public AnnotatedMapKeyAttributeValueEntryContent getAnnotatedMapKeyAttributeValueEntryContent()
+   {
+      return this.annotatedMapKeyAttributeValueEntryContent;
+   }
+   
+   public void setAnnotatedMapKeyAttributeValueEntryContent(AnnotatedMapKeyAttributeValueEntryContent value)
+   {
+      this.annotatedMapKeyAttributeValueEntryContent = value;
+   }
+
    @JBossXmlMapEntry(name = "entry-type-key-attr-value-entry-content", type=EntryTypeKeyAttributeValueEntryContent.class)
    public Map<String, Integer> getEntryTypeKeyAttributeValueEntryContent()
    {
@@ -105,6 +152,16 @@
       this.stringToInteger = value;
    }
 
+   public AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent getAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent()
+   {
+      return this.annotatedMapWithEntryTypeKeyAttributeValueEntryContent;
+   }
+   
+   public void setAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent(AnnotatedMapWithEntryTypeKeyAttributeValueEntryContent value)
+   {
+      this.annotatedMapWithEntryTypeKeyAttributeValueEntryContent = value;
+   }
+
    @JBossXmlMapEntry(name = "entry-type-key-attr-value-entry", type=EntryTypeKeyAttributeValueEntry.class)
    public Map<String, EntryTypeKeyAttributeValueEntry> getEntryTypeKeyAttributeValueEntry()
    {
@@ -115,4 +172,15 @@
    {
       this.entryTypeMap = value;
    }
+
+   @XmlElement(type=AnnotatedMapWithEntryTypeKeyAttributeValueEntry.class)
+   public Map<String, EntryTypeKeyAttributeValueEntry> getAnnotatedMapWithEntryTypeKeyAttributeValueEntry()
+   {
+      return this.annotatedMapWithEntryTypeKeyAttributeValueEntry;
+   }
+   
+   public void setAnnotatedMapWithEntryTypeKeyAttributeValueEntry(Map<String, EntryTypeKeyAttributeValueEntry> value)
+   {
+      this.annotatedMapWithEntryTypeKeyAttributeValueEntry = value;
+   }
 }

Modified: jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntryUnitTestCase.java
===================================================================
--- jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntryUnitTestCase.java	2008-01-15 14:32:49 UTC (rev 2700)
+++ jbossxb/trunk/src/test/java/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntryUnitTestCase.java	2008-01-18 16:55:54 UTC (rev 2701)
@@ -48,34 +48,76 @@
       assertMap(root.getKeyValueSequence());
    }
 
+   public void testAnnotatedMapKeyValueSequence() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      assertMap(root.getAnnotatedMapKeyValueSequence());
+   }
+
    public void testWrappedKeyValueSequence() throws Exception
    {
       Root root = unmarshalObject(Root.class);
       assertMap(root.getWrappedKeyValueSequence());
    }
 
+   public void testAnnotatedMapWrappedKeyValueSequence() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      assertMap(root.getAnnotatedMapWrappedKeyValueSequence());
+   }
+
    public void testKeyValueAttributes() throws Exception
    {
       Root root = unmarshalObject(Root.class);
       assertMap(root.getKeyValueAttributes());
    }
 
+   public void testAnnotatedMapKeyValueAttributes() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      assertMap(root.getAnnotatedMapKeyValueAttributes());
+   }
+
    public void testKeyAttributeValueEntryContent() throws Exception
    {
       Root root = unmarshalObject(Root.class);
       assertMap(root.getKeyAttributeValueEntryContent());
    }
 
+   public void testAnnotatedMapKeyAttributeValueEntryContent() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      assertMap(root.getAnnotatedMapKeyAttributeValueEntryContent());
+   }
+
    public void testEntryTypeKeyAttributeValueEntryContent() throws Exception
    {
       Root root = unmarshalObject(Root.class);
       assertMap(root.getEntryTypeKeyAttributeValueEntryContent());
    }
 
+   public void testAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      assertMap(root.getAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent());
+   }
+
    public void testEntryTypeKeyAttributeValueEntry() throws Exception
    {
       Root root = unmarshalObject(Root.class);
       Map<String, EntryTypeKeyAttributeValueEntry> map = root.getEntryTypeKeyAttributeValueEntry();
+      assertMapWithEntry(map);
+   }
+
+   public void testAnnotatedMapWithEntryTypeKeyAttributeValueEntry() throws Exception
+   {
+      Root root = unmarshalObject(Root.class);
+      Map<String, EntryTypeKeyAttributeValueEntry> map = root.getAnnotatedMapWithEntryTypeKeyAttributeValueEntry();
+      assertMapWithEntry(map);
+   }
+
+   private void assertMapWithEntry(Map<String, EntryTypeKeyAttributeValueEntry> map)
+   {
       assertNotNull(map);
       assertEquals(3, map.size());
       

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyAttributeValueEntryContent.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyAttributeValueEntryContent.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyAttributeValueEntryContent.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <annotated-map-key-attr-value-entry-content key="key1">1</annotated-map-key-attr-value-entry-content>
+  <annotated-map-key-attr-value-entry-content key="key2">22</annotated-map-key-attr-value-entry-content>
+  <annotated-map-key-attr-value-entry-content key="key3">333</annotated-map-key-attr-value-entry-content>
+</root>

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueAttributes.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueAttributes.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueAttributes.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <annotated-map-key-value-attr key="key1" value="1"/>
+  <annotated-map-key-value-attr key="key2" value="22"/>
+  <annotated-map-key-value-attr key="key3" value="333"/>
+</root>

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueSequence.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueSequence.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapKeyValueSequence.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <key-kvs>key1</key-kvs><value-kvs>1</value-kvs>
+  <key-kvs>key2</key-kvs><value-kvs>22</value-kvs>
+  <key-kvs>key3</key-kvs><value-kvs>333</value-kvs>
+</root>

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntry.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntry.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntry.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <annotated-map-entry-type-key-attr-value-entry key="key1" attr="attr1">
+     <value>1</value>
+  </annotated-map-entry-type-key-attr-value-entry>
+  <annotated-map-entry-type-key-attr-value-entry key="key2" attr="attr2">
+     <value>22</value>
+  </annotated-map-entry-type-key-attr-value-entry>
+  <annotated-map-entry-type-key-attr-value-entry key="key3" attr="attr3">
+     <value>333</value>
+  </annotated-map-entry-type-key-attr-value-entry>
+</root>

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWithEntryTypeKeyAttributeValueEntryContent.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <annotated-map-with-entry-type-key-attr-value-entry-content key="key1">1</annotated-map-with-entry-type-key-attr-value-entry-content>
+  <annotated-map-with-entry-type-key-attr-value-entry-content key="key2">22</annotated-map-with-entry-type-key-attr-value-entry-content>
+  <annotated-map-with-entry-type-key-attr-value-entry-content key="key3">333</annotated-map-with-entry-type-key-attr-value-entry-content>
+</root>

Added: jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWrappedKeyValueSequence.xml
===================================================================
--- jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWrappedKeyValueSequence.xml	                        (rev 0)
+++ jbossxb/trunk/src/test/resources/org/jboss/test/xb/builder/object/jbossxmlmapentry/test/JBossXmlMapEntry_testAnnotatedMapWrappedKeyValueSequence.xml	2008-01-18 16:55:54 UTC (rev 2701)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<root>
+  <annotated-map-wrapped-key-value>
+    <key>key1</key><value>1</value>
+  </annotated-map-wrapped-key-value>
+  <annotated-map-wrapped-key-value>
+    <key>key2</key><value>22</value>
+  </annotated-map-wrapped-key-value>
+  <annotated-map-wrapped-key-value>
+    <key>key3</key><value>333</value>
+  </annotated-map-wrapped-key-value>
+</root>




More information about the jboss-svn-commits mailing list