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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri May 25 09:24:41 EDT 2007


Author: adrian at jboss.org
Date: 2007-05-25 09:24:40 -0400 (Fri, 25 May 2007)
New Revision: 2398

Added:
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedType.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedTypes.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAttribute.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChild.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildWildcard.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildren.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroup.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupText.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupWildcard.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlNoElements.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlType.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionInterceptor.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionWildcardHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildWildcardHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/NoopPropertyHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyInterceptor.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapter.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapterFactory.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapter.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterBuilder.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterFactory.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapter.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterBuilder.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/SchemaPrinter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/ObjectJavaBeanTestSuite.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestParameterInstantiate.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestProperty.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestPropertyWildcard.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestSimpleInstantiate.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiate.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiator.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticMethodInstantiate.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestWildcard.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Constructor.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBean.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanBuilder.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Parameter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Property.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/AbstractJavaBeanTest.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiateUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcardUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiateUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiateUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiateUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/ObjectMCTestSuite.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation1.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation2.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation3.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttribute.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttributes.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/SerializableObject.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory1.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory2.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAliasMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAnnotationMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractArrayMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractBeanMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractClassLoaderMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCollectionMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractConstructorMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDemandMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractFeatureMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInjectionValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInstallMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractKernelDeployment.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleCallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractListMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractMapMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractParameterMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertiesMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSetMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSupplyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractTypeMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AliasMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AnnotationMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaDataFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/Cardinality.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CardinalityValueAdapter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ClassLoaderMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ConstructorMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerMode.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerModeValueAdapter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerState.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerStateValueAdapter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DemandMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DependencyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/FeatureMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionOption.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionType.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallCallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/KernelDeployment.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleCallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MapEntry.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MetaDataVisitorNode.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MutableParameterizedMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterizedMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/PropertyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/StringValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/SupplyMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ThisValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/UninstallCallbackMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaDataAware.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/BeanFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/GenericBeanFactoryMetaData.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/package.html
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/package-info.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AbstractMCTest.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AliasTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AnnotationTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ArrayTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanFactoryTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CallbackTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ClassLoaderTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CollectionTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ConstructorTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DemandTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DependencyTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DeploymentTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/FactoryTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InjectionTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InstallTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/LifecycleTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ListTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/MapTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ParameterTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/PropertyTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SetTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SupplyTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ValueTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/XMLTestDelegate.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/Adapted.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/AdaptedSubclass.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapter.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterBuilder.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterFactory.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapterUnitTestCase.java
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/Property.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Alias.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithBeanFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithNoReplace.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithReplace.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent2.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoLeadingAt.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationSimple.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttribute.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttributes.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Array.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithElementClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrConstructor.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactoryMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrConstructor.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactoryMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClassLoader.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithConstructor.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithCreate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemand.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemands.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependencies.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependency.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstall.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallback.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallbacks.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstalls.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithMode.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperties.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithStart.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupplies.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupply.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstall.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallback.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallbacks.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstalls.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClassLoader.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithConstructor.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithCreate.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemand.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemands.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependencies.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependency.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDestroy.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstall.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallback.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallbacks.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstalls.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithMode.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperties.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStart.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStop.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupplies.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupply.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstall.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallback.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallbacks.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstalls.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithComplexValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithNoName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithPlainValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallBadMethodProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithCardinality.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithSignature.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithState.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallBadMethodProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithCardinality.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithSignature.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithState.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderBadNoValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithInject.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Collection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithElementClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Constructor.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryClassNoFactoryMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryNoFactoryMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameter.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameters.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Demand.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandBadNoValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandWithWhenRequired.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Dependency.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DependencyBadNoValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Deployment.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanMetaDataFactory.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithClassLoader.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMixed.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanFactorys.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanMetaDataFactorys.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeans.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryBadNoBeanOrWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithState.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionBadNoBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithProperty.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithState.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallBadNoMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameter.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameters.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithState.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Lifecycle.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithIgnored.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithMethod.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameter.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameters.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/List.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithElementClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Map.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithKeyClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValueClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MultipleAlias.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Parameter.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithPlainValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Policy.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithBindings.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithExtends.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithScope.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Property.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyBadNoName.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotation.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotations.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithBean.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithPlainValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Scope.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithLevel.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithQualifier.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Set.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithArray.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithCollection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithElementClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithInjection.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithList.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithMap.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithNull.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithSet.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithThis.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithWildcard.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Supply.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SupplyBadNoValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Value.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithClass.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithValue.xml
   jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapter.xml
Removed:
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/test/NotSpecifiedValueUnitTestCase.java
Modified:
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlSchema.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBBuilder.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/AbstractPropertyHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BeanHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BuilderUtil.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyWildcardHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyWildcardHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/SimplePropertyHandler.java
   jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ValueHandler.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/AbstractBuilderTest.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/TestSchemaResolver.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/ObjectTestSuite.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/ObjectTypeValueTestSuite.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/IntegerValue.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/StringValue.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ArrayObjectWildcardUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ListObjectWildcardUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/SimpleObjectWildcardUnitTestCase.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/ObjectTypeXmlTypeTestSuite.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/AbstractDefaultsTest.java
   jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/NonDefaultsUnitTestCase.java
Log:
Complete the testing of the JBossXB implementation of JAXB annotations.
Enough features exist now to handle two different kind of holders:
1) The javabean schema which creates a "factory" to construct the object
2) The microcontainer schema which includes polymorphism and wrapping objects

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedType.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedType.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedType.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
+
+/**
+ * JBossXmlAdaptedType.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.PACKAGE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlAdaptedType
+{
+   /** The namespace **/
+   String namespace() default JBossXmlConstants.DEFAULT;
+
+   /** The name **/
+   String name() default JBossXmlConstants.DEFAULT;
+   
+   /** The type */
+   Class<?> type();
+   
+   /** The value adapter */
+   Class<? extends ValueAdapter> valueAdapter();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedTypes.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedTypes.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAdaptedTypes.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossXmlAdaptedTypes.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.PACKAGE, ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlAdaptedTypes
+{
+   JBossXmlAdaptedType[] value();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAttribute.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAttribute.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlAttribute.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossXmlAttribute.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.METHOD, ElementType.FIELD})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlAttribute
+{
+   /** The attribute type */
+   Class<?> type() default Object.class;
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChild.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChild.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChild.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,47 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossChild.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlChild
+{
+   /** The namespace **/
+   String namespace() default JBossXmlConstants.DEFAULT;
+
+   /** The name **/
+   String name();
+   
+   /** The type */
+   Class<?> type();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildWildcard.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildWildcard.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildWildcard.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossChildWildcard.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlChildWildcard
+{
+   boolean lax() default false;
+   
+   Class<?> wrapper() default Object.class;
+   
+   String property() default "value";
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildren.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildren.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlChildren.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossChildren.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlChildren
+{
+   JBossXmlChild[] value();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroup.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroup.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroup.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossGroup.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlGroup
+{
+   JBossXmlChild[] value();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupText.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupText.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupText.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,42 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossGroupText.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlGroupText
+{
+   Class<?> wrapper() default Object.class;
+   
+   String property() default "value";
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupWildcard.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupWildcard.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlGroupWildcard.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossGroupWildcard.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlGroupWildcard
+{
+   boolean lax() default false;
+   
+   Class<?> wrapper() default Object.class;
+   
+   String property() default "value";
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlNoElements.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlNoElements.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlNoElements.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * JBossNoElements.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlNoElements
+{
+}

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlSchema.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlSchema.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlSchema.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -21,19 +21,19 @@
 */
 package org.jboss.xb.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;
 
+import javax.xml.bind.annotation.XmlNsForm;
+
 /**
  * JBossXmlSchema.
  * 
  * @author <a href="adrian at jboss.com">Adrian Brock</a>
  * @version $Revision: 1.1 $
  */
- at Documented
 @Target({ElementType.TYPE, ElementType.PACKAGE})
 @Retention(RetentionPolicy.RUNTIME)
 public @interface JBossXmlSchema
@@ -41,6 +41,12 @@
    /** The namespace **/
    String namespace() default JBossXmlConstants.DEFAULT;
    
+   /** The element form default */
+   XmlNsForm elementFormDefault() default XmlNsForm.UNSET;
+
+   /** The attribute form default */
+   XmlNsForm attributeFormDefault() default XmlNsForm.UNSET;
+   
    /** Whether to ignore unresolved field and class names, default true */
    boolean ignoreUnresolvedFieldOrClass() default true;
 
@@ -52,4 +58,7 @@
 
    /** The package name to resolve classes, default is package or the package of the type */
    String packageName() default JBossXmlConstants.DEFAULT;
+   
+   /** Whether the schema is strict */
+   boolean strict() default true;
 }

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlType.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlType.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/annotations/JBossXmlType.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,48 @@
+/*
+* 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.xb.annotations;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.DefaultBeanAdapterBuilder;
+
+/**
+ * JBossXmlType.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at Target({ElementType.TYPE})
+ at Retention(RetentionPolicy.RUNTIME)
+public @interface JBossXmlType
+{
+   /**
+    * The bean adapter builder
+    * 
+    * @return the builder
+    */
+   Class<? extends BeanAdapterBuilder> beanAdapterBuilder() default DefaultBeanAdapterBuilder.class;
+}

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBBuilder.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -51,6 +51,9 @@
    /** The string type */
    static final ClassInfo STRING = configuration.getClassInfo(String.class);
    
+   /** The object type */
+   static final ClassInfo OBJECT = configuration.getClassInfo(Object.class);
+   
    /**
     * Create a new schema binding initializer
     * 
@@ -159,6 +162,7 @@
       schemaBinding.setIgnoreUnresolvedFieldOrClass(schema.ignoreUnresolvedFieldOrClass());
       schemaBinding.setIgnoreLowLine(schema.ignoreLowLine());
       schemaBinding.setReplacePropertyRefs(schema.replacePropertyRefs());
+      schemaBinding.setStrictSchema(schema.strict());
    }
 
    /**

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/JBossXBNoSchemaBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -57,13 +57,26 @@
 import org.jboss.reflect.spi.MethodInfo;
 import org.jboss.reflect.spi.PackageInfo;
 import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlAdaptedType;
+import org.jboss.xb.annotations.JBossXmlAdaptedTypes;
+import org.jboss.xb.annotations.JBossXmlAttribute;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildWildcard;
+import org.jboss.xb.annotations.JBossXmlChildren;
 import org.jboss.xb.annotations.JBossXmlConstants;
+import org.jboss.xb.annotations.JBossXmlGroup;
+import org.jboss.xb.annotations.JBossXmlGroupText;
+import org.jboss.xb.annotations.JBossXmlGroupWildcard;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+import org.jboss.xb.annotations.JBossXmlSchema;
+import org.jboss.xb.annotations.JBossXmlType;
 import org.jboss.xb.binding.SimpleTypeBindings;
 import org.jboss.xb.binding.sunday.unmarshalling.AllBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler;
 import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
 import org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
 import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
@@ -71,19 +84,28 @@
 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
 import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
 import org.jboss.xb.builder.runtime.AbstractPropertyHandler;
 import org.jboss.xb.builder.runtime.ArraySequenceBinding;
 import org.jboss.xb.builder.runtime.BeanHandler;
 import org.jboss.xb.builder.runtime.BuilderParticleHandler;
 import org.jboss.xb.builder.runtime.BuilderSimpleParticleHandler;
+import org.jboss.xb.builder.runtime.ChildCollectionInterceptor;
+import org.jboss.xb.builder.runtime.ChildCollectionWildcardHandler;
+import org.jboss.xb.builder.runtime.ChildWildcardHandler;
 import org.jboss.xb.builder.runtime.CollectionPropertyHandler;
 import org.jboss.xb.builder.runtime.CollectionPropertyWildcardHandler;
 import org.jboss.xb.builder.runtime.DOMHandler;
 import org.jboss.xb.builder.runtime.EnumValueAdapter;
+import org.jboss.xb.builder.runtime.NoopPropertyHandler;
 import org.jboss.xb.builder.runtime.PropertyHandler;
+import org.jboss.xb.builder.runtime.PropertyInterceptor;
 import org.jboss.xb.builder.runtime.PropertyWildcardHandler;
 import org.jboss.xb.builder.runtime.ValueHandler;
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.BeanAdapterFactory;
+import org.jboss.xb.spi.DefaultBeanAdapterBuilder;
 import org.w3c.dom.Element;
 
 /**
@@ -164,10 +186,26 @@
       // Remember the default namespace
       defaultNamespace = (String) schemaBinding.getNamespaces().iterator().next();
       
+      JBossXmlSchema jbossXmlSchema = root.getUnderlyingAnnotation(JBossXmlSchema.class);
+      if (jbossXmlSchema != null)
+      {
+         attributeForm = jbossXmlSchema.attributeFormDefault();
+         elementForm = jbossXmlSchema.elementFormDefault();
+      }
+      
       // Look for an annotation
       PackageInfo packageInfo = root.getPackage();
       if (packageInfo != null)
       {
+         jbossXmlSchema = root.getUnderlyingAnnotation(JBossXmlSchema.class);
+         if (jbossXmlSchema != null)
+         {
+            if (attributeForm == XmlNsForm.UNSET)
+               attributeForm = jbossXmlSchema.attributeFormDefault();
+            if (elementForm == XmlNsForm.UNSET);
+               elementForm = jbossXmlSchema.elementFormDefault();
+         }
+         
          XmlSchema xmlSchema = packageInfo.getUnderlyingAnnotation(XmlSchema.class);
          if (xmlSchema != null)
          {
@@ -178,9 +216,22 @@
                addNamespace(defaultNamespace, true);
             }
             
-            attributeForm = xmlSchema.attributeFormDefault();
-            elementForm = xmlSchema.elementFormDefault();
+            if (attributeForm == XmlNsForm.UNSET)
+               attributeForm = xmlSchema.attributeFormDefault();
+            if (elementForm == XmlNsForm.UNSET);
+               elementForm = xmlSchema.elementFormDefault();
          }
+         
+         // Check for adapted types
+         JBossXmlAdaptedTypes adaptedTypes = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedTypes.class);
+         if (adaptedTypes != null)
+         {
+            for (JBossXmlAdaptedType adaptedType : adaptedTypes.value())
+               generateAdaptedType(adaptedType);
+         }
+         JBossXmlAdaptedType adaptedType = packageInfo.getUnderlyingAnnotation(JBossXmlAdaptedType.class);
+         if (adaptedType != null)
+            generateAdaptedType(adaptedType);
       }
    }
    
@@ -300,6 +351,9 @@
       if (root)
       {
          schemaBinding.addElement(elementBinding);
+         ParticleBinding particleBinding = schemaBinding.getElementParticle(qName);
+         particleBinding.setMinOccurs(1);
+         particleBinding.setMaxOccurs(1);
          rootCache.put(typeInfo, elementBinding);
       }
       
@@ -473,6 +527,48 @@
    }
    
    /**
+    * Generate an adapted type
+    * 
+    * @param adaptedType the information about the adaption
+    * @return the type binding
+    */
+   public TypeBinding generateAdaptedType(JBossXmlAdaptedType adaptedType)
+   {
+      // Determine the parameters
+      String overrideNamespace = adaptedType.namespace();
+      String overrideName = adaptedType.name();
+      Class<?> type = adaptedType.type();
+      Class<? extends ValueAdapter> adapter = adaptedType.valueAdapter();
+      try
+      {
+         
+         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
+         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);
+      
+         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();
+
+         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);
+
+         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
+         TypeBinding parent = getSimpleType(parentType);
+
+         TypeBinding typeBinding = new TypeBinding(qName, parent);
+         typeBinding.setValueAdapter(valueAdapter);
+         if (trace)
+            log.trace("Created adapted type=" + typeInfo.getName() + " typeBinding=" + typeBinding + " adapter=" + adapter.getName());
+
+         typeCache.put(typeInfo, typeBinding);
+         schemaBinding.addType(typeBinding);
+
+         return typeBinding;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Unable to adapt type " + type.getName() + " with " + adapter.getName(), t);
+      }
+   }
+   
+   /**
     * Generate an annotation type binding
     * 
     * @param typeInfo the type info
@@ -511,7 +607,9 @@
          return resolveTypeBinding(elementType);
       }
       else
-         throw new RuntimeException("Unable to determine element type for " + typeInfo);
+      {
+         return generateBean(typeInfo);
+      }
    }
    
    /**
@@ -523,7 +621,7 @@
    public TypeBinding generateMap(ClassInfo typeInfo)
    {
       // TODO generateMap
-      throw new UnsupportedOperationException("generateMap");
+      return generateBean(typeInfo);
    }
    
    /**
@@ -598,6 +696,7 @@
       String factoryMethod = null;
       String[] propertyOrder = {""};
       XmlAccessOrder accessOrder = XmlAccessOrder.UNDEFINED;
+      Class<? extends BeanAdapterBuilder> beanAdapterBuilderClass = DefaultBeanAdapterBuilder.class;
       XmlType xmlType = typeInfo.getUnderlyingAnnotation(XmlType.class);
       if (xmlType != null)
       {
@@ -613,6 +712,11 @@
          factoryMethod = xmlType.factoryMethod();
          propertyOrder = xmlType.propOrder();
       }
+      JBossXmlType jbossXmlType = typeInfo.getUnderlyingAnnotation(JBossXmlType.class);
+      if (jbossXmlType != null)
+      {
+         beanAdapterBuilderClass = jbossXmlType.beanAdapterBuilder();
+      }
       // Determine the property access order
       XmlAccessorOrder accessorOrder = typeInfo.getUnderlyingAnnotation(XmlAccessorOrder.class);
       if (accessorOrder == null)
@@ -646,12 +750,25 @@
       
       // Create the handler
       BeanInfo beanInfo = JBossXBBuilder.configuration.getBeanInfo(typeInfo);
-      BeanHandler handler = new BeanHandler(beanInfo, factory);
+      BeanAdapterFactory beanAdapterFactory = null;
+      try
+      {
+         BeanInfo beanAdapterBuilderInfo = JBossXBBuilder.configuration.getBeanInfo(beanAdapterBuilderClass);
+         BeanAdapterBuilder beanAdapterBuilder = (BeanAdapterBuilder) beanAdapterBuilderInfo.newInstance();
+         beanAdapterFactory = beanAdapterBuilder.newFactory(beanInfo, factory);
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error creating BeanAdapterFactory for " + beanAdapterBuilderClass.getName(), t); 
+      }
+      BeanHandler handler = new BeanHandler(beanInfo.getName(), beanAdapterFactory);
       typeBinding.setHandler(handler);
       if (trace)
          log.trace("Created BeanHandler for type=" + beanInfo.getName() + " factory=" + factory);
 
       // Look through the properties
+      JBossXmlNoElements jbossXmlNoElements = typeInfo.getUnderlyingAnnotation(JBossXmlNoElements.class);
+      boolean noElements = jbossXmlNoElements != null;
       PropertyInfo valueProperty = null;
       PropertyInfo wildcardProperty = null;
       boolean allBinding = propertyOrder.length == 0;
@@ -664,6 +781,9 @@
          {
             push(typeInfo, property.getName());
             
+            if (trace)
+               log.trace("Checking property " + property.getName() + " for " + beanInfo.getName() + " type=" + property.getType().getName());
+            
             // Is this the value property?
             XmlValue xmlValue = property.getUnderlyingAnnotation(XmlValue.class);
             if (xmlValue != null)
@@ -690,18 +810,22 @@
             XmlAttribute xmlAttribute = property.getUnderlyingAnnotation(XmlAttribute.class);
             if (xmlAttribute != null)
             {
+               JBossXmlAttribute jbossXmlAttribute = property.getUnderlyingAnnotation(JBossXmlAttribute.class);
                // Determine the name
                QName qName = generateXmlName(property.getName(), attributeForm, xmlAttribute.namespace(), xmlAttribute.name());
                // Resolve the type
-               TypeBinding attributeType = resolveTypeBinding(property.getType());
+               TypeInfo attributeTypeInfo = property.getType();
+               if (jbossXmlAttribute != null && jbossXmlAttribute.type() != Object.class)
+                  attributeTypeInfo = attributeTypeInfo.getTypeInfoFactory().getTypeInfo(jbossXmlAttribute.type());
+               TypeBinding attributeType = resolveTypeBinding(attributeTypeInfo);
                // Create the attribute handler
-               AttributeHandler attributeHandler = new PropertyHandler(property, property.getType());
+               AttributeHandler attributeHandler = new PropertyHandler(property, attributeTypeInfo);
                // Create the attributre and bind it to the type
                AttributeBinding attribute = new AttributeBinding(schemaBinding, qName, attributeType, attributeHandler);
                attribute.setRequired(xmlAttribute.required());
                typeBinding.addAttribute(attribute);
                if (trace)
-                  log.trace("Bound attribute " + qName + " type=" + beanInfo.getName() + " property=" + property.getName() +" propertyType=" + property.getType());
+                  log.trace("Bound attribute " + qName + " type=" + beanInfo.getName() + " property=" + property.getName() +" propertyType=" + attributeTypeInfo);
             }
 
             // Are we determining the property order?
@@ -737,17 +861,28 @@
                {
                   if (trace)
                      log.trace("Ignore not element @XmlTransient for type=" + beanInfo.getName() + " property=" + property.getName());
+                  pop();
                   continue;
                }
                // Ignore the class property
                String name = property.getName();
                if ("class".equals(name))
+               {
+                  pop();
                   continue;
+               }
                
+               if (noElements)
+               {
+                  pop();
+                  continue;
+               }
+               
                if (trace)
                   log.trace("Element for type=" + beanInfo.getName() + " property=" + property.getName());
                propertyNames.add(property.getName());
             }
+            pop();
          }
          // Apply any access order
          if (determinePropertyOrder)
@@ -759,17 +894,17 @@
       }
 
       // No value property, see if we have a default one
-      if (valueProperty == null)
-      {
-         try
-         {
-            valueProperty = beanInfo.getProperty("value");
-         }
-         catch (Exception ignored)
-         {
+      //if (valueProperty == null)
+      //{
+      //   try
+      //   {
+      //      valueProperty = beanInfo.getProperty("value");
+      //   }
+      //   catch (Exception ignored)
+      //   {
             // Nope.
-         }
-      }
+      //   }
+      //}
       
       // Bind the value
       if (valueProperty != null)
@@ -783,79 +918,37 @@
       if (trace)
          log.trace("PropertyOrder " + Arrays.asList(propertyOrder) + " for type=" + beanInfo.getName());
       
-      // Determine the model (we don't need one if there are no properties)
+      // Determine the model
       // TODO simple types/content when no properties other than @XmlValue and @XmlAttribute
       typeBinding.setSimple(false);
       ModelGroupBinding model = null;
-      if (propertyOrder.length > 0 || wildcardProperty != null)
+      if (allBinding)
       {
-         if (allBinding)
-         {
-            if (trace)
-               log.trace("AllBinding for type=" + beanInfo.getName());
-            model = new AllBinding(schemaBinding);
-         }
-         else
-         {
-            if (trace)
-               log.trace("SequenceBinding for type=" + beanInfo.getName());
-            model = new SequenceBinding(schemaBinding);
-         }
-         model.setHandler(BuilderParticleHandler.INSTANCE);
-         typeBinding.setParticle(new ParticleBinding(model));
+         if (trace)
+            log.trace("AllBinding for type=" + beanInfo.getName());
+         model = new AllBinding(schemaBinding);
       }
-
-      // Bind the wildcard
+      else
+      {
+         if (trace)
+            log.trace("SequenceBinding for type=" + beanInfo.getName());
+         model = new SequenceBinding(schemaBinding);
+      }
+      model.setHandler(BuilderParticleHandler.INSTANCE);
+      ParticleBinding typeParticle = new ParticleBinding(model);
+      typeParticle.setMinOccurs(1);
+      typeParticle.setMaxOccurs(1);
+      typeBinding.setParticle(typeParticle);
+      
+      // Determine the wildcard handler
+      AbstractPropertyHandler wildcardHandler = null;
       if (wildcardProperty != null)
       {
-         ModelGroupBinding localModel = model;
          TypeInfo wildcardType = wildcardProperty.getType();
-         TypeInfo type = wildcardType;
-         
-         // Setup any new model and determine the wildcard type
-         if (wildcardType.isArray())
-         {
-            localModel = createArray(localModel);
-            type = ((ArrayInfo) wildcardType).getComponentType();
-         }
-         else if (wildcardType.isCollection())
-         {
-            localModel = createCollection(localModel);
-            if (type instanceof ParameterizedClassInfo)
-            {
-               ParameterizedClassInfo pinfo = (ParameterizedClassInfo) type;
-               type = pinfo.getActualTypeArguments()[0];
-            }
-            else
-            {
-               type = type.getTypeInfoFactory().getTypeInfo(Object.class);
-            }
-         }
-         
-         XmlAnyElement xmlAnyElement = wildcardProperty.getUnderlyingAnnotation(XmlAnyElement.class);
-         WildcardBinding wildcard = new WildcardBinding(schemaBinding);
-         if (xmlAnyElement.lax())
-            wildcard.setProcessContents((short) 3); // Lax
-         else
-            wildcard.setProcessContents((short) 1); // Strict
-
-         // Dom element?
-         if (Element.class.getName().equals(type.getName()))
-         {
-            wildcard.setUnresolvedElementHandler(DOMHandler.INSTANCE);
-            wildcard.setUnresolvedCharactersHandler(DOMHandler.INSTANCE);
-         }
-         
-         // Bind the particle to the model
-         ParticleBinding particleBinding = new ParticleBinding(wildcard);
-         localModel.addParticle(particleBinding);
-         ParticleHandler wildcardHandler = null;
          if (wildcardType.isCollection())
             wildcardHandler = new CollectionPropertyWildcardHandler(wildcardProperty, wildcardType); 
          else
             wildcardHandler = new PropertyWildcardHandler(wildcardProperty, wildcardType);
-         typeBinding.getWildcard().setWildcardHandler(wildcardHandler);
-         handler.setWildcardHandler((AbstractPropertyHandler) wildcardHandler);
       }
       
       // Look through the properties
@@ -880,9 +973,17 @@
 
          // Setup any new model
          if (propertyType.isArray())
+         {
+            if (trace)
+               log.trace("Property " + property.getName() + " is an array");
             localModel = createArray(localModel);
+         }
          else if (propertyType.isCollection())
+         {
+            if (trace)
+               log.trace("Property " + property.getName() + " is a collection");
             localModel = createCollection(localModel);
+         }
          
          // So this is element(s)
          XmlElement[] elements = null;
@@ -894,23 +995,29 @@
          }
          else
          {
-            // Mutlple elements annotated, setup a choice
+            // Mutlple elements
             XmlElements xmlElements = property.getUnderlyingAnnotation(XmlElements.class);
             if (xmlElements != null)
-            {
                elements = xmlElements.value();
-               ChoiceBinding choice = new ChoiceBinding(schemaBinding);
-               choice.setHandler(BuilderParticleHandler.INSTANCE);
-               localModel.addParticle(new ParticleBinding(choice));
-               localModel = model;
-               if (trace)
-                  log.trace("XmlElements seen adding choice for type=" + beanInfo.getName() + " property=" + property.getName());
-            }
          }
          
          // A single element not annotated
          if (elements == null || elements.length == 0)
             elements = new XmlElement[1];
+
+         // Setup a choice
+         if (elements.length > 1)
+         {
+            ChoiceBinding choice = new ChoiceBinding(schemaBinding);
+            choice.setHandler(BuilderParticleHandler.INSTANCE);
+            ParticleBinding particleBinding = new ParticleBinding(choice);
+            particleBinding.setMinOccurs(0);
+            particleBinding.setMaxOccurs(1);
+            localModel.addParticle(particleBinding);
+            localModel = choice;
+            if (trace)
+               log.trace("XmlElements seen adding choice for type=" + beanInfo.getName() + " property=" + property.getName());
+         }
          
          for (int i = 0; i < elements.length; ++i)
          {
@@ -923,6 +1030,8 @@
             boolean nillable = false;
             boolean required = false;
             
+            TypeInfo localPropertyType = propertyType;
+            
             XmlElement element = elements[i];
             if (element != null)
             {
@@ -932,34 +1041,263 @@
                required = element.required();
                Class<?> elementType = element.type();
                if (elementType != XmlElement.DEFAULT.class)
-                  propertyType = propertyType.getTypeInfoFactory().getTypeInfo(elementType);
+                  localPropertyType = propertyType.getTypeInfoFactory().getTypeInfo(elementType);
             }
             
             // Determine the name
             QName qName = generateXmlName(property.getName(), elementForm, overrideNamespace, overrideName);
 
             // Create the element
-            TypeBinding elementTypeBinding = resolveTypeBinding(propertyType);
-            ElementBinding elementBinding = createElementBinding(propertyType, elementTypeBinding, qName, false);
-            elementBinding.setNillable(nillable);
+            JBossXmlGroup jbossXmlGroup = null;
+            if (propertyType instanceof ClassInfo)
+               jbossXmlGroup = ((ClassInfo) propertyType).getUnderlyingAnnotation(JBossXmlGroup.class);
+            if (element == null && jbossXmlGroup != null)
+            {
+               if (trace)
+                  log.trace("Processing group for property " + property.getName() + " in " + typeInfo.getName() + " " + jbossXmlGroup);
+               JBossXmlChild[] children = jbossXmlGroup.value();
+               if (children != null && children.length > 0)
+               {
+                  TypeBinding elementTypeBinding = new TypeBinding();
+                  elementTypeBinding.setSchemaBinding(schemaBinding);
+                  elementTypeBinding.setHandler(BuilderParticleHandler.INSTANCE);
+                  ElementBinding elementBinding = createElementBinding(localPropertyType, elementTypeBinding, qName, false);
+                  
+                  // Bind it to the model
+                  ParticleBinding particle = new ParticleBinding(elementBinding, 1, 1, false);
+                  if (required == false)
+                     particle.setMinOccurs(0);
+                  localModel.addParticle(particle);
+
+                  // Can it take text?
+                  JBossXmlGroupText groupText = ((ClassInfo) propertyType).getUnderlyingAnnotation(JBossXmlGroupText.class);
+                  if (groupText != null)
+                  {
+                     CharactersHandler textHandler;
+                     if (groupText.wrapper() != Object.class)
+                     {
+                        BeanInfo wrapperInfo = JBossXBBuilder.configuration.getBeanInfo(groupText.wrapper());
+                        textHandler = new ValueHandler(property, wrapperInfo, groupText.property());
+                     }
+                     else
+                        textHandler = new ValueHandler(property);
+                     elementTypeBinding.setCharactersHandler(textHandler);
+                  }
+                  
+                  // Setup the child model
+                  ChoiceBinding childModel = new ChoiceBinding(schemaBinding);
+                  childModel.setHandler(BuilderParticleHandler.INSTANCE);
+                  ParticleBinding particleBinding = new ParticleBinding(childModel);
+                  particleBinding.setMinOccurs(0);
+                  particleBinding.setMaxOccurs(1);
+                  elementTypeBinding.setParticle(particleBinding);
+
+                  for (JBossXmlChild child : children)
+                  {
+                     QName childName = generateXmlName(child.name(), elementForm, child.namespace(), child.name());
+                     TypeInfo childType = JBossXBBuilder.configuration.getTypeInfo(child.type());
+
+                     TypeBinding childTypeBinding = resolveTypeBinding(childType);
+                     ElementBinding childBinding = createElementBinding(childType, childTypeBinding, childName, false);
+                     childBinding.setNillable(nillable);
+                     
+                     // Bind it to the model
+                     particle = new ParticleBinding(childBinding, 1, 1, false);
+                     particle.setMinOccurs(0);
+                     childModel.addParticle(particle);
+
+                     DefaultElementInterceptor interceptor = new PropertyInterceptor(property, propertyType);
+                     elementTypeBinding.pushInterceptor(childName, interceptor);
+                     if (trace)
+                        log.trace("Added interceptor " + childName + " for type=" + beanInfo.getName() + " property=" + property.getName() + " interceptor=" + interceptor);
+
+                     beanAdapterFactory.addProperty(qName, new NoopPropertyHandler(property, propertyType));
+
+                     JBossXmlGroupWildcard groupWildcard = ((ClassInfo) propertyType).getUnderlyingAnnotation(JBossXmlGroupWildcard.class);
+
+                     if (groupWildcard != null)
+                     {
+                        ChildWildcardHandler groupWildcardHandler;
+                        if (groupWildcard.wrapper() != Object.class)
+                        {
+                           BeanInfo wrapperInfo = JBossXBBuilder.configuration.getBeanInfo(groupWildcard.wrapper());
+                           groupWildcardHandler = new ChildWildcardHandler(property, wrapperInfo, groupWildcard.property());
+                        }
+                        else
+                           groupWildcardHandler = new ChildWildcardHandler(property);
+                        
+                        WildcardBinding wildcard = new WildcardBinding(schemaBinding);
+                        if (groupWildcard.lax())
+                           wildcard.setProcessContents((short) 3); // Lax
+                        else
+                           wildcard.setProcessContents((short) 1); // Strict
+
+                        particleBinding = new ParticleBinding(wildcard);
+                        particleBinding.setMinOccurs(0);
+                        particleBinding.setMaxOccurs(1);
+                        childModel.addParticle(particleBinding);
+                        
+                        elementTypeBinding.getWildcard().setWildcardHandler(groupWildcardHandler);
+                     }
+                  }
+               }
+            }
+            else
+            {
+               TypeBinding elementTypeBinding = resolveTypeBinding(localPropertyType);
+               ElementBinding elementBinding = createElementBinding(localPropertyType, elementTypeBinding, qName, false);
+               elementBinding.setNillable(nillable);
+               
+               // Bind it to the model
+               ParticleBinding particle = new ParticleBinding(elementBinding, 1, 1, false);
+               if (required == false)
+                  particle.setMinOccurs(0);
+               localModel.addParticle(particle);
+
+               // Create the handler
+               AbstractPropertyHandler propertyHandler;
+               // handled by wildcard
+               if (wildcardProperty == property)
+               {
+                  propertyHandler = wildcardHandler;
+               }
+               else if (propertyType.isCollection())
+                  propertyHandler = new CollectionPropertyHandler(property, propertyType);
+               else
+                  propertyHandler = new PropertyHandler(property, localPropertyType);
+               beanAdapterFactory.addProperty(qName, propertyHandler);
+               if (trace)
+                  log.trace("Added property " + qName + " for type=" + beanInfo.getName() + " property=" + property.getName() + " handler=" + propertyHandler);
+            }
+         }
+         pop();
+      }
+      
+      // Bind the children
+      JBossXmlChild[] children = null;
+      JBossXmlChildren jbossXmlChildren = typeInfo.getUnderlyingAnnotation(JBossXmlChildren.class);
+      if (jbossXmlChildren != null)
+         children = jbossXmlChildren.value();
+      else
+      {
+         JBossXmlChild jbossXmlChild = typeInfo.getUnderlyingAnnotation(JBossXmlChild.class);
+         if (jbossXmlChild != null)
+            children = new JBossXmlChild[] { jbossXmlChild };
+      }
+      
+      if (children != null && children.length > 0)
+      {
+         for (JBossXmlChild child : children)
+         {
+            QName qName = generateXmlName(child.name(), elementForm, child.namespace(), child.name());
+            TypeInfo childType = JBossXBBuilder.configuration.getTypeInfo(child.type());
+
+            TypeBinding elementTypeBinding = resolveTypeBinding(childType);
+            ElementBinding elementBinding = createElementBinding(childType, elementTypeBinding, qName, false);
             
             // Bind it to the model
-            ParticleBinding particle = new ParticleBinding(elementBinding);
-            if (required == false)
-               particle.setMinOccurs(0);
-            localModel.addParticle(particle);
-            
-            // Create the handler
-            AbstractPropertyHandler propertyHandler = null;
-            if (propertyType.isCollection())
-               propertyHandler = new CollectionPropertyHandler(property, propertyType);
+            ParticleBinding particle = new ParticleBinding(elementBinding, 0, 1, false);
+            model.addParticle(particle);
+
+            DefaultElementInterceptor interceptor = null;
+            if (typeInfo.isCollection())
+               interceptor = ChildCollectionInterceptor.SINGLETON;
             else
-               propertyHandler = new PropertyHandler(property, propertyType);
-            handler.addProperty(qName, propertyHandler);
+               throw new UnsupportedOperationException("TODO");
+            typeBinding.pushInterceptor(qName, interceptor);
          }
-         pop();
       }
+
+      // Bind the wildcard
+      if (wildcardProperty != null)
+      {
+         if (trace)
+            log.trace("Processing WildcardProperty for type=" + beanInfo.getName() + " property=" + wildcardProperty.getName());
+         ModelGroupBinding localModel = model;
+         TypeInfo wildcardType = wildcardProperty.getType();
+         TypeInfo type = wildcardType;
+         
+         // Setup any new model and determine the wildcard type
+         if (wildcardType.isArray())
+         {
+            localModel = createArray(localModel);
+            type = ((ArrayInfo) wildcardType).getComponentType();
+            if (trace)
+               log.trace("Wildcard " + wildcardProperty.getName() + " is an array of type " + type.getName());
+         }
+         else if (wildcardType.isCollection())
+         {
+            localModel = createCollection(localModel);
+            if (type instanceof ParameterizedClassInfo)
+            {
+               ParameterizedClassInfo pinfo = (ParameterizedClassInfo) type;
+               type = pinfo.getActualTypeArguments()[0];
+            }
+            else
+            {
+               type = type.getTypeInfoFactory().getTypeInfo(Object.class);
+            }
+            if (trace)
+               log.trace("Wildcard " + wildcardProperty.getName() + " is a collection of type " + type.getName());
+         }
+         
+         XmlAnyElement xmlAnyElement = wildcardProperty.getUnderlyingAnnotation(XmlAnyElement.class);
+         WildcardBinding wildcard = new WildcardBinding(schemaBinding);
+         if (xmlAnyElement.lax())
+            wildcard.setProcessContents((short) 3); // Lax
+         else
+            wildcard.setProcessContents((short) 1); // Strict
+
+         // Dom element?
+         if (Element.class.getName().equals(type.getName()))
+         {
+            wildcard.setUnresolvedElementHandler(DOMHandler.INSTANCE);
+            wildcard.setUnresolvedCharactersHandler(DOMHandler.INSTANCE);
+         }
+         
+         // Bind the particle to the model
+         ParticleBinding particleBinding = new ParticleBinding(wildcard);
+         particleBinding.setMinOccurs(0);
+         particleBinding.setMaxOccurs(1);
+         localModel.addParticle(particleBinding);
+         typeBinding.getWildcard().setWildcardHandler((ParticleHandler) wildcardHandler);
+         beanAdapterFactory.setWildcardHandler(wildcardHandler);
+      }
       
+      JBossXmlChildWildcard childWildcard = typeInfo.getUnderlyingAnnotation(JBossXmlChildWildcard.class);
+      if (childWildcard != null)
+      {
+         if (wildcardProperty != null)
+            throw new RuntimeException("Cannot have both @JBossXmlChildWildcard and @XmlAnyElement");
+         
+         ParticleHandler childWildcardHandler = null;
+         if (typeInfo.isCollection())
+         {
+            if (childWildcard.wrapper() != Object.class)
+            {
+               BeanInfo wrapperInfo = JBossXBBuilder.configuration.getBeanInfo(childWildcard.wrapper());
+               childWildcardHandler = new ChildCollectionWildcardHandler(wrapperInfo, childWildcard.property());
+            }
+            else
+               childWildcardHandler = ChildCollectionWildcardHandler.SINGLETON;
+         }
+         else
+            throw new UnsupportedOperationException("TODO");
+
+         WildcardBinding wildcard = new WildcardBinding(schemaBinding);
+         if (childWildcard.lax())
+            wildcard.setProcessContents((short) 3); // Lax
+         else
+            wildcard.setProcessContents((short) 1); // Strict
+
+         ParticleBinding particleBinding = new ParticleBinding(wildcard);
+         particleBinding.setMinOccurs(0);
+         particleBinding.setMaxOccurs(1);
+         model.addParticle(particleBinding);
+         
+         typeBinding.getWildcard().setWildcardHandler(childWildcardHandler);
+      }
+      
       if (trace)
          log.trace("Created type=" + typeInfo.getName() + " typeBinding=" + typeBinding + " rootType=" + root);
 
@@ -985,6 +1323,7 @@
       ArraySequenceBinding arraySequenceBinding = new ArraySequenceBinding(schemaBinding);
       arraySequenceBinding.setHandler(BuilderParticleHandler.INSTANCE);
       ParticleBinding particle = new ParticleBinding(sequenceBinding);
+      particle.setMinOccurs(0);
       particle.setMaxOccursUnbounded(true);
       arraySequenceBinding.addParticle(particle);
       particle = new ParticleBinding(arraySequenceBinding);
@@ -1003,6 +1342,7 @@
       SequenceBinding sequenceBinding = new SequenceBinding(schemaBinding);
       sequenceBinding.setHandler(BuilderParticleHandler.INSTANCE);
       ParticleBinding particle = new ParticleBinding(sequenceBinding);
+      particle.setMinOccurs(0);
       particle.setMaxOccursUnbounded(true);
       localModel.addParticle(particle);
       return sequenceBinding;
@@ -1085,8 +1425,8 @@
       {
          Location location = locations.pop();
          location.append(message);
-         if (locations.isEmpty() == false);
-         message.append('\n');
+         if (locations.isEmpty() == false)
+            message.append('\n');
       }
       throw new RuntimeException(message.toString(), t);
    }

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/AbstractPropertyHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/AbstractPropertyHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/AbstractPropertyHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -28,6 +28,8 @@
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.AttributeHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
+import org.jboss.xb.spi.BeanAdapter;
 
 /**
  * AbstractPropertyHandler
@@ -108,7 +110,12 @@
    @Override
    public void attribute(QName elemName, QName attrName, AttributeBinding binding, Object owner, Object value)
    {
-      doHandle(owner, value, attrName);
+      ValueAdapter valueAdapter = binding.getValueAdapter();
+      if (valueAdapter != null)
+         value = valueAdapter.cast(value, null);
+      
+      BeanAdapter parent = (BeanAdapter) owner;
+      doHandle(parent, value, attrName);
    }
 
    /**

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BeanHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BeanHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BeanHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -21,16 +21,15 @@
 */
 package org.jboss.xb.builder.runtime;
 
-import java.util.HashMap;
-import java.util.Map;
-
 import javax.xml.namespace.QName;
 
-import org.jboss.beans.info.spi.BeanInfo;
 import org.jboss.logging.Logger;
-import org.jboss.reflect.spi.MethodInfo;
 import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementHandler;
 import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
 
 /**
  * BeanHandler.
@@ -46,128 +45,105 @@
    /** Whether trace is enabled */
    private boolean trace = log.isTraceEnabled();
 
-   /** The bean info */
-   private BeanInfo beanInfo;
-
-   /** Any factory  */
-   private MethodInfo factory;
-
-   /** The properties */
-   private Map<QName, AbstractPropertyHandler> properties;
+   /** The bean name */
+   private String name;
    
-   /** The wildcard handler */
-   private AbstractPropertyHandler wildcardHandler;
+   /** The BeanAdapter */
+   private BeanAdapterFactory beanAdapterFactory;
    
    /**
     * Create a new bean info element handler
     * 
-    * @param beanInfo the bean info
-    * @param factory the factory
+    * @param name the bean name
+    * @param beanAdapterFactory the bean adapterFactory
+    * @throws IllegalArgumentException for a null parameter
     */
-   public BeanHandler(BeanInfo beanInfo, MethodInfo factory)
+   public BeanHandler(String name, BeanAdapterFactory beanAdapterFactory)
    {
-      if (beanInfo == null)
-         throw new IllegalArgumentException("Null beanInfo");
-      this.beanInfo = beanInfo;
-      this.factory = factory;
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+      if (beanAdapterFactory == null)
+         throw new IllegalArgumentException("Null bean adapter factory");
+      this.name = name;
+      this.beanAdapterFactory = beanAdapterFactory;
    }
-
-   /**
-    * Get the bean info
-    * 
-    * @return the bean info
-    */
-   public BeanInfo getBeanInfo()
-   {
-      return beanInfo;
-   }
    
    /**
-    * Get the properties
+    * Get the beanAdapterFactory.
     * 
-    * @return the properties
+    * @return the beanAdapterFactory.
     */
-   public Map<QName, AbstractPropertyHandler> getProperties()
+   public BeanAdapterFactory getBeanAdapterFactory()
    {
-      return properties;
+      return beanAdapterFactory;
    }
-   
-   /**
-    * Add a property
-    * 
-    * @param qName the qName
-    * @param propertyHandler the property handler
-    */
-   public void addProperty(QName qName, AbstractPropertyHandler propertyHandler)
-   {
-      if (qName == null)
-         throw new IllegalArgumentException("Null qName");
-      if (propertyHandler == null)
-         throw new IllegalArgumentException("Null property handler");
 
-      if (properties == null)
-         properties = new HashMap<QName, AbstractPropertyHandler>();
-      properties.put(qName, propertyHandler);
-   }
-   
-   /**
-    * Get the wildcardHandler.
-    * 
-    * @return the wildcardHandler.
-    */
-   public AbstractPropertyHandler getWildcardHandler()
-   {
-      return wildcardHandler;
-   }
-
-   /**
-    * Set the wildcardHandler.
-    * 
-    * @param wildcardHandler the wildcardHandler.
-    */
-   public void setWildcardHandler(AbstractPropertyHandler wildcardHandler)
-   {
-      this.wildcardHandler = wildcardHandler;
-   }
-
    @Override
    public Object startElement(Object parent, QName qName, ElementBinding element)
    {
+      if (trace)
+         log.trace(" startElement " + qName + " bean=" + name + " parent=" + BuilderUtil.toDebugString(parent));
       try
       {
-         if (factory != null)
-            return factory.invoke(null, null);
-         return beanInfo.newInstance();
+         return beanAdapterFactory.newInstance();
       }
       catch (Throwable t)
       {
-         throw new RuntimeException("QName " + qName + " error instantiating " + beanInfo.getName(), t);
+         throw new RuntimeException("QName " + qName + " error invoking beanAdapterFactory.newInstance() for bean=" + name, t);
       }
    }
 
    @Override
-   public void setParent(Object parent, Object o, QName qName, ElementBinding element, ElementBinding parentElement)
+   public void setParent(Object parent, Object o, QName qName,  ParticleBinding particle, ParticleBinding parentParticle)
    {
-      AbstractPropertyHandler propertyHandler = null;
-      if (properties != null)
-         propertyHandler = properties.get(qName);
+      if (trace)
+         log.trace("setParent " + qName + " parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
+
+      if (parent != null && parent instanceof ArrayWrapper)
+      {
+         ArrayWrapper wrapper = (ArrayWrapper) parent;
+         wrapper.add(o);
+         wrapper.setChildParticle(particle);
+         wrapper.setParentParticle(parentParticle);
+         return;
+      }
+
+      BeanAdapter beanAdapter;
+      if (parent instanceof ArrayWrapper)
+         beanAdapter = (BeanAdapter) ((ArrayWrapper) parent).getParent();
+      else
+         beanAdapter = (BeanAdapter) parent;
+      AbstractPropertyHandler propertyHandler = beanAdapter.getPropertyHandler(qName);
       if (propertyHandler == null)
       {
+         AbstractPropertyHandler wildcardHandler = beanAdapter.getWildcardHandler();
          if (wildcardHandler != null)
          {
             if (o != null && o instanceof ArrayWrapper)
             {
                ArrayWrapper wrapper = (ArrayWrapper) o;
-               wildcardHandler.doHandle(parent, wrapper, wrapper.getElementName());
+               wildcardHandler.doHandle(beanAdapter, wrapper, wrapper.getElementName());
                return;
             }
          }
+         TermBinding element = particle.getTerm();
          if (element.getSchema().isStrictSchema())
-            throw new RuntimeException("QName " + qName + " unknown property parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
+         {
+            throw new RuntimeException("QName " + qName + " unknown property parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o) + " available=" + beanAdapter.getAvailable());
+         }
          if (trace)
             log.trace("QName " + qName + " unknown property parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
          return;
       }
-      propertyHandler.doHandle(parent, o, qName);
+      propertyHandler.doHandle(beanAdapter, o, qName);
    }
+
+   @Override
+   public Object endElement(Object o, QName qName, ElementBinding element)
+   {
+      if (trace)
+         log.trace("endElement " + qName + " o=" + BuilderUtil.toDebugString(o));
+      BeanAdapter beanAdapter = (BeanAdapter) o;
+      return beanAdapter.getValue();
+   }
 }

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BuilderUtil.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BuilderUtil.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/BuilderUtil.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -22,6 +22,7 @@
 package org.jboss.xb.builder.runtime;
 
 import org.jboss.util.Strings;
+import org.jboss.xb.spi.AbstractBeanAdapter;
 import org.w3c.dom.Element;
 
 /**
@@ -53,6 +54,9 @@
           object instanceof Short)
          return object.toString();
       
+      if (object instanceof AbstractBeanAdapter)
+         return ((AbstractBeanAdapter) object).getBeanInfo().getName() + "@" + System.identityHashCode(object);
+      
       if (object instanceof Element)
       {
          Element element = (Element) object;

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionInterceptor.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionInterceptor.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionInterceptor.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,50 @@
+/*
+* 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.xb.builder.runtime;
+
+import java.util.Collection;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+import org.jboss.xb.spi.BeanAdapter;
+
+/**
+ * ChildCollectionInterceptor.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ChildCollectionInterceptor extends DefaultElementInterceptor
+{
+   /** The instance */
+   public static final ChildCollectionInterceptor SINGLETON = new ChildCollectionInterceptor();
+   
+   @Override
+   @SuppressWarnings("unchecked")
+   public void add(Object parent, Object child, QName qName)
+   {
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      Collection collection = (Collection) beanAdapter.getValue();
+      collection.add(child);
+   } 
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionWildcardHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionWildcardHandler.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildCollectionWildcardHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,114 @@
+/*
+* 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.xb.builder.runtime;
+
+import java.util.Collection;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.spi.BeanAdapter;
+import org.xml.sax.Attributes;
+
+/**
+ * CollectionPropertyWildcardHandler.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ChildCollectionWildcardHandler  implements ParticleHandler
+{
+   /** Singleton */
+   public static ChildCollectionWildcardHandler SINGLETON = new ChildCollectionWildcardHandler();
+   
+   /** The wrapper type */
+   private BeanInfo beanInfo;
+   
+   /** The wrapper property */
+   private String property;
+
+   /**
+    * Create a new ChildCollectionWildcardHandler.
+    */
+   public ChildCollectionWildcardHandler()
+   {
+   }
+
+   /**
+    * Create a new ChildCollectionWildcardHandler.
+    * 
+    * @param beanInfo the wrapper class
+    * @param property the wrapper property
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public ChildCollectionWildcardHandler(BeanInfo beanInfo, String property)
+   {
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null beanInfo");
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      this.beanInfo = beanInfo;
+      this.property = property;
+   }
+   
+   public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
+   {
+      return parent;
+   }
+
+   @SuppressWarnings("unchecked")
+   public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, ParticleBinding parentParticle)
+   {
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      Collection collection = (Collection) beanAdapter.getValue();
+      
+      if (beanInfo != null)
+      {
+         try
+         {
+            ClassInfo classInfo = beanInfo.getClassInfo();
+            TypeInfo valueType = classInfo.getTypeInfoFactory().getTypeInfo(o.getClass());
+            if (classInfo.isAssignableFrom(valueType) == false)
+            {
+               Object wrapper = beanInfo.newInstance();
+               beanInfo.setProperty(wrapper, property, o);
+               o = wrapper;
+            }
+         }
+         catch (Throwable t)
+         {
+            throw new RuntimeException("Error wrapping object in " + beanInfo.getName()); 
+         }
+      }
+      collection.add(o);
+   }
+
+   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
+   {
+      return o;
+   }
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildWildcardHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildWildcardHandler.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ChildWildcardHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,128 @@
+/*
+* 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.xb.builder.runtime;
+
+import javax.xml.namespace.NamespaceContext;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.reflect.spi.ClassInfo;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.spi.BeanAdapter;
+import org.xml.sax.Attributes;
+
+/**
+ * CollectionPropertyWildcardHandler.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ChildWildcardHandler  implements ParticleHandler
+{
+   /** The property */
+   private PropertyInfo propertyInfo;
+   
+   /** The wrapper type */
+   private BeanInfo beanInfo;
+   
+   /** The wrapper property */
+   private String property;
+
+   /**
+    * Create a new ChildCollectionWildcardHandler.
+    * 
+    * @param propertyInfo the property info
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public ChildWildcardHandler(PropertyInfo propertyInfo)
+   {
+      if (propertyInfo == null)
+         throw new IllegalArgumentException("Null propertyInfo");
+      this.propertyInfo = propertyInfo;
+   }
+
+   /**
+    * Create a new ChildCollectionWildcardHandler.
+    * 
+    * @param propertyInfo the property info
+    * @param beanInfo the wrapper class
+    * @param property the wrapper property
+    * @throws IllegalArgumentException for a null parameter
+    */
+   public ChildWildcardHandler(PropertyInfo propertyInfo, BeanInfo beanInfo, String property)
+   {
+      if (propertyInfo == null)
+         throw new IllegalArgumentException("Null propertyInfo");
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null beanInfo");
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      this.propertyInfo = propertyInfo;
+      this.beanInfo = beanInfo;
+      this.property = property;
+   }
+   
+   public Object startParticle(Object parent, QName elementName, ParticleBinding particle, Attributes attrs, NamespaceContext nsCtx)
+   {
+      return parent;
+   }
+
+   @SuppressWarnings("unchecked")
+   public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, ParticleBinding parentParticle)
+   {
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      if (beanInfo != null)
+      {
+         try
+         {
+            ClassInfo classInfo = beanInfo.getClassInfo();
+            TypeInfo valueType = classInfo.getTypeInfoFactory().getTypeInfo(o.getClass());
+            if (classInfo.isAssignableFrom(valueType) == false)
+            {
+               Object wrapper = beanInfo.newInstance();
+               beanInfo.setProperty(wrapper, property, o);
+               o = wrapper;
+            }
+         }
+         catch (Throwable t)
+         {
+            throw new RuntimeException("Error wrapping object in " + beanInfo.getName()); 
+         }
+      }
+      try
+      {
+         beanAdapter.set(propertyInfo, o);
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error setting wildcard property " + propertyInfo.getName() + " parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(o));
+      }
+   }
+
+   public Object endParticle(Object o, QName elementName, ParticleBinding particle)
+   {
+      return o;
+   }
+}

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -33,6 +33,7 @@
 import org.jboss.reflect.spi.ClassInfo;
 import org.jboss.reflect.spi.ConstructorInfo;
 import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.spi.BeanAdapter;
 
 /**
  * CollectionPropertyHandler.
@@ -65,11 +66,13 @@
    @SuppressWarnings("unchecked")
    public void handle(PropertyInfo propertyInfo, TypeInfo propertyType, Object parent, Object child, QName qName)
    {
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      
       Collection<Object> c = null;
       try
       {
          if (propertyInfo.getGetter() != null)
-            c = (Collection) propertyInfo.get(parent);
+            c = (Collection) beanAdapter.get(propertyInfo);
       }
       catch (Throwable t)
       {
@@ -99,7 +102,7 @@
 
          try
          {
-            propertyInfo.set(parent, c);
+            beanAdapter.set(propertyInfo, c);
          }
          catch (Throwable t)
          {

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyWildcardHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyWildcardHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/CollectionPropertyWildcardHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -28,6 +28,7 @@
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.spi.BeanAdapter;
 import org.xml.sax.Attributes;
 
 /**
@@ -57,7 +58,12 @@
 
    public void setParent(Object parent, Object o, QName elementName, ParticleBinding particle, ParticleBinding parentParticle)
    {
-      doHandle(parent, o, elementName);
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      AbstractPropertyHandler propertyHandler = beanAdapter.getPropertyHandler(elementName);
+      if (propertyHandler != null)
+         propertyHandler.doHandle(parent, o, elementName);
+      else
+         doHandle(parent, o, elementName);
    }
 
    public Object endParticle(Object o, QName elementName, ParticleBinding particle)

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/NoopPropertyHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/NoopPropertyHandler.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/NoopPropertyHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* 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.xb.builder.runtime;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.reflect.spi.TypeInfo;
+
+/**
+ * NoopPropertyHandler.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class NoopPropertyHandler extends AbstractPropertyHandler
+{
+   /**
+    * Create a new NoopPropertyHandler.
+    * 
+    * @param propertyInfo the property info
+    * @param propertyType the property type
+    */
+   public NoopPropertyHandler(PropertyInfo propertyInfo, TypeInfo propertyType)
+   {
+      super(propertyInfo, propertyType);
+   }
+
+   public void handle(PropertyInfo propertyInfo, TypeInfo propertyType, Object parent, Object child, QName qName)
+   {
+      // Nothing
+   }
+}
\ No newline at end of file

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -25,6 +25,7 @@
 
 import org.jboss.beans.info.spi.PropertyInfo;
 import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.spi.BeanAdapter;
 
 /**
  * PropertyHandler.
@@ -56,7 +57,8 @@
             ArrayWrapper wrapper = (ArrayWrapper) child;
             child = wrapper.getArray(propertyType);
          }
-         propertyInfo.set(parent, child);
+         BeanAdapter beanAdapter = (BeanAdapter) parent;
+         beanAdapter.set(propertyInfo, child);
       }
       catch (Throwable t)
       {

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyInterceptor.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyInterceptor.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyInterceptor.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,90 @@
+/*
+* 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.xb.builder.runtime;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.logging.Logger;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.binding.sunday.unmarshalling.DefaultElementInterceptor;
+import org.jboss.xb.spi.BeanAdapter;
+
+/**
+ * PropertyInterceptor.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyInterceptor extends DefaultElementInterceptor
+{
+   /** The log */
+   private static final Logger log = Logger.getLogger(PropertyInterceptor.class);
+   
+   /** Whether trace is enabled */
+   private boolean trace = log.isTraceEnabled();
+   
+   /** The property info */
+   private PropertyInfo propertyInfo;
+   
+   /** The property type */
+   private TypeInfo propertyType;
+   
+   /**
+    * Create a new PropertyHandler.
+    * 
+    * @param propertyInfo the property
+    * @param propertyType the property type
+    * @throws IllegalArgumentException for a null property
+    */
+   public PropertyInterceptor(PropertyInfo propertyInfo, TypeInfo propertyType)
+   {
+      if (propertyInfo == null)
+         throw new IllegalArgumentException("Null property info");
+      if (propertyType == null)
+         throw new IllegalArgumentException("Null property type");
+      this.propertyInfo = propertyInfo;
+      this.propertyType = propertyType;
+   }
+   
+   @Override
+   @SuppressWarnings("unchecked")
+   public void add(Object parent, Object child, QName qName)
+   {
+      if (trace)
+         log.trace("setParent " + qName + " parent=" + BuilderUtil.toDebugString(parent) + " child=" + BuilderUtil.toDebugString(child) +" property=" + propertyInfo.getName());
+      try
+      {
+         if (propertyType.isArray())
+         {
+            ArrayWrapper wrapper = (ArrayWrapper) child;
+            child = wrapper.getArray(propertyType);
+         }
+         BeanAdapter beanAdapter = (BeanAdapter) parent;
+         beanAdapter.set(propertyInfo, child);
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("QName " + qName + " error setting property " + propertyInfo.getName() + " with value " + BuilderUtil.toDebugString(child) + " to " + BuilderUtil.toDebugString(parent), t);
+      }
+   } 
+}

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyWildcardHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyWildcardHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/PropertyWildcardHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -28,6 +28,7 @@
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.spi.BeanAdapter;
 import org.xml.sax.Attributes;
 
 /**
@@ -65,7 +66,12 @@
          wrapper.setParentParticle(parentParticle);
          return;
       }
-      doHandle(parent, o, elementName);
+      BeanAdapter beanAdapter = (BeanAdapter) parent;
+      AbstractPropertyHandler propertyHandler = beanAdapter.getPropertyHandler(elementName);
+      if (propertyHandler != null)
+         propertyHandler.doHandle(parent, o, elementName);
+      else
+         doHandle(parent, o, elementName);
    }
 
    public Object endParticle(Object o, QName elementName, ParticleBinding particle)

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/SimplePropertyHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/SimplePropertyHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/SimplePropertyHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -25,6 +25,7 @@
 
 import org.jboss.beans.info.spi.PropertyInfo;
 import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.spi.BeanAdapter;
 
 /**
  * SimplePropertyHandler.
@@ -51,7 +52,8 @@
    {
       try
       {
-         propertyInfo.set(parent, child);
+         BeanAdapter beanAdapter = (BeanAdapter) parent;
+         beanAdapter.set(propertyInfo, child);
       }
       catch (Throwable t)
       {

Modified: jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ValueHandler.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ValueHandler.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/builder/runtime/ValueHandler.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -23,11 +23,14 @@
 
 import javax.xml.namespace.QName;
 
+import org.jboss.beans.info.spi.BeanInfo;
 import org.jboss.beans.info.spi.PropertyInfo;
 import org.jboss.logging.Logger;
+import org.jboss.reflect.spi.ClassInfo;
 import org.jboss.reflect.spi.TypeInfo;
 import org.jboss.xb.binding.sunday.unmarshalling.CharactersHandler;
 import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.spi.BeanAdapter;
 
 /**
  * ValueHandler.
@@ -46,11 +49,17 @@
    /** The property info */
    private PropertyInfo propertyInfo;
    
+   /** The wrapper type */
+   private BeanInfo beanInfo;
+   
+   /** The wrapper property */
+   private String property;
+   
    /**
     * Create a new AbstractPropertyHandler
     * 
     * @param propertyInfo the property
-    * @throws IllegalArgumentException for a null qName or property
+    * @throws IllegalArgumentException for a null parameter
     */
    public ValueHandler(PropertyInfo propertyInfo)
    {
@@ -58,6 +67,27 @@
          throw new IllegalArgumentException("Null propertyInfo");
       this.propertyInfo = propertyInfo;
    }
+   
+   /**
+    * Create a new AbstractPropertyHandler
+    * 
+    * @param propertyInfo the property
+    * @param beanInfo the wrapper class
+    * @param property the wrapper property
+    * @throws IllegalArgumentException for a null qName or property
+    */
+   public ValueHandler(PropertyInfo propertyInfo, BeanInfo beanInfo, String property)
+   {
+      if (propertyInfo == null)
+         throw new IllegalArgumentException("Null propertyInfo");
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null beanInfo");
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      this.propertyInfo = propertyInfo;
+      this.beanInfo = beanInfo;
+      this.property = property;
+   }
 
    /**
     * Get the property info
@@ -78,7 +108,19 @@
       {
          TypeInfo typeInfo = propertyInfo.getType();
          value = typeInfo.convertValue(value, false);
-         propertyInfo.set(owner, value);
+         if (beanInfo != null)
+         {
+            ClassInfo classInfo = beanInfo.getClassInfo();
+            TypeInfo valueType = classInfo.getTypeInfoFactory().getTypeInfo(value.getClass());
+            if (classInfo.isAssignableFrom(valueType) == false)
+            {
+               Object wrapper = beanInfo.newInstance();
+               beanInfo.setProperty(wrapper, property, value);
+               value = wrapper;
+            }
+         }
+         BeanAdapter beanAdapter = (BeanAdapter) owner;
+         beanAdapter.set(propertyInfo, value);
       }
       catch (Throwable t)
       {

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,132 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.xb.spi.BeanAdapter;
+
+/**
+ * AbstractBeanAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractBeanAdapter extends BeanAdapter
+{
+   /** The bean info */
+   private BeanInfo beanInfo;
+
+   /** Any factory  */
+   private MethodInfo factory;
+
+   /** Whether the value is constructed */
+   private boolean constructed = false;
+   
+   /** The value */
+   private Object value;
+   
+   /**
+    * Create a new AbstractBeanAdapter.
+    *  
+    * @param beanAdapterFactory the bean adapter factory
+    * @param beanInfo the bean info
+    * @param factory the factory
+    * @throws IllegalArgumentException for null bean adapter factory or bean info
+    */
+   public AbstractBeanAdapter(BeanAdapterFactory beanAdapterFactory, BeanInfo beanInfo, MethodInfo factory)
+   {
+      super(beanAdapterFactory);
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null bean info");
+      this.beanInfo = beanInfo;
+      this.factory = factory;
+   }
+
+   /**
+    * Get the bean info
+    * 
+    * @return the bean info
+    */
+   public BeanInfo getBeanInfo()
+   {
+      return beanInfo;
+   }
+
+   /**
+    * Get the factory
+    * 
+    * @return the factgory
+    */
+   public MethodInfo getFactory()
+   {
+      return factory;
+   }
+   
+   public Object get(PropertyInfo propertyInfo) throws Throwable
+   {
+      ensureConstructed();
+      return propertyInfo.get(value);
+   }
+   
+   public void set(PropertyInfo propertyInfo, Object child) throws Throwable
+   {
+      ensureConstructed();
+      propertyInfo.set(value, child);
+   }
+
+   public Object getValue()
+   {
+      ensureConstructed();
+      return value;
+   }
+
+   /**
+    * Construct the object
+    * 
+    * @return the value
+    */
+   protected Object construct()
+   {
+      try
+      {
+         if (factory != null)
+            return factory.invoke(null, null);
+         return beanInfo.newInstance();
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error instantiating bean for " + beanInfo.getName(), t);
+      }
+   }
+   
+   /**
+    * Ensure the object has been constructed
+    */
+   protected void ensureConstructed()
+   {
+      if (constructed == false)
+         value = construct();
+      constructed = true;
+   }
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapterFactory.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapterFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/AbstractBeanAdapterFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,80 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+
+/**
+ * AbstractBeanAdapterFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractBeanAdapterFactory extends BeanAdapterFactory
+{
+   /** The bean info */
+   private BeanInfo beanInfo;
+
+   /** Any factory  */
+   private MethodInfo factory;
+
+   /**
+    * Create a new bean adapter factory
+    * 
+    * @param beanInfo the bean info
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null bean info
+    */
+   public AbstractBeanAdapterFactory(BeanInfo beanInfo, MethodInfo factory)
+   {
+      if (beanInfo == null)
+         throw new IllegalArgumentException("Null beanInfo");
+      this.beanInfo = beanInfo;
+      this.factory = factory;
+   }
+
+   /**
+    * Get the bean info
+    * 
+    * @return the bean info
+    */
+   public BeanInfo getBeanInfo()
+   {
+      return beanInfo;
+   }
+
+   /**
+    * Get the factory.
+    * 
+    * @return the factory.
+    */
+   public MethodInfo getFactory()
+   {
+      return factory;
+   }
+
+   public AbstractBeanAdapter newInstance()
+   {
+      return new AbstractBeanAdapter(this, getBeanInfo(), getFactory());
+   }
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,112 @@
+/*
+* 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.xb.spi;
+
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.namespace.QName;
+
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.xb.builder.runtime.AbstractPropertyHandler;
+
+/**
+ * BeanAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class BeanAdapter
+{
+   /** The bean adapter factory */
+   private BeanAdapterFactory beanAdapterFactory;
+   
+   /**
+    * Create a new BeanAdapter.
+    * 
+    * @param beanAdapterFactory the bean adapter factory
+    * @throws IllegalArgumentException for a null bean adapter factory
+    */
+   public BeanAdapter(BeanAdapterFactory beanAdapterFactory)
+   {
+      if (beanAdapterFactory == null)
+         throw new IllegalArgumentException("Null bean adapter factory");
+      this.beanAdapterFactory = beanAdapterFactory;
+   }
+   
+   /**
+    * Get the property handler for an element name
+    * 
+    * @param qName the element name
+    * @return the property handler
+    */
+   public AbstractPropertyHandler getPropertyHandler(QName qName)
+   {
+      return beanAdapterFactory.getPropertyHandler(qName);
+   }
+   
+   /**
+    * Get the wildcardHandler.
+    * 
+    * @return the wildcardHandler.
+    */
+   @XmlTransient
+   public AbstractPropertyHandler getWildcardHandler()
+   {
+      return beanAdapterFactory.getWildcardHandler();
+   }
+
+   /**
+    * Get the available properties as a string
+    * 
+    * @return the available properties
+    */
+   @XmlTransient
+   public String getAvailable()
+   {
+      return beanAdapterFactory.getAvailable();
+   }
+   
+   /**
+    * Get a property
+    * 
+    * @param propertyInfo the property info
+    * @return the property value
+    * @throws Throwable for any error
+    */
+   public abstract Object get(PropertyInfo propertyInfo) throws Throwable;
+
+   /**
+    * Set a property
+    * 
+    * @param propertyInfo the property info
+    * @param child the value
+    * @throws Throwable for any error
+    */
+   public abstract void set(PropertyInfo propertyInfo, Object child) throws Throwable;
+   
+   /**
+    * Get the value
+    * 
+    * @return the value
+    */
+   @XmlTransient
+   public abstract Object getValue();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterBuilder.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+
+/**
+ * BeanAdapterBuilder.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface BeanAdapterBuilder
+{
+   /**
+    * Create a new bean adapter factory
+    * 
+    * @param beanInfo the bean info
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null bean info
+    * @return the factory
+    */
+    BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory);
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterFactory.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/BeanAdapterFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,124 @@
+/*
+* 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.xb.spi;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.xml.namespace.QName;
+
+import org.jboss.xb.builder.runtime.AbstractPropertyHandler;
+
+/**
+ * BeanAdapterFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public abstract class BeanAdapterFactory
+{
+   /** The properties */
+   private Map<QName, AbstractPropertyHandler> properties;
+   
+   /** The wildcard handler */
+   private AbstractPropertyHandler wildcardHandler;
+
+   /**
+    * Get the property handler for an element name
+    * 
+    * @param qName the element name
+    * @return the property handler
+    */
+   public AbstractPropertyHandler getPropertyHandler(QName qName)
+   {
+      if (properties == null)
+         return null;
+      return properties.get(qName);
+   }
+
+   /**
+    * Get the properties
+    * 
+    * @return the properties
+    */
+   public Map<QName, AbstractPropertyHandler> getProperties()
+   {
+      return properties;
+   }
+   
+   /**
+    * Add a property
+    * 
+    * @param qName the qName
+    * @param propertyHandler the property handler
+    */
+   public void addProperty(QName qName, AbstractPropertyHandler propertyHandler)
+   {
+      if (qName == null)
+         throw new IllegalArgumentException("Null qName");
+      if (propertyHandler == null)
+         throw new IllegalArgumentException("Null property handler");
+
+      if (properties == null)
+         properties = new HashMap<QName, AbstractPropertyHandler>();
+      properties.put(qName, propertyHandler);
+   }
+   /**
+    * Get the available properties as a string
+    * 
+    * @return the available properties
+    */
+   public String getAvailable()
+   {
+      if (properties == null)
+         return "<nothing>";
+      else
+         return properties.keySet().toString();
+   }
+   
+   /**
+    * Get the wildcardHandler.
+    * 
+    * @return the wildcardHandler.
+    */
+   public AbstractPropertyHandler getWildcardHandler()
+   {
+      return wildcardHandler;
+   }
+
+   /**
+    * Set the wildcardHandler.
+    * 
+    * @param wildcardHandler the wildcardHandler.
+    */
+   public void setWildcardHandler(AbstractPropertyHandler wildcardHandler)
+   {
+      this.wildcardHandler = wildcardHandler;
+   }
+
+   /**
+    * Create a new BeanAdapter
+    * 
+    * @return the new bean adapter
+    */
+   public abstract BeanAdapter newInstance();
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,48 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+
+/**
+ * DefaultBeanAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class DefaultBeanAdapter extends AbstractBeanAdapter
+{
+   /**
+    * Create a new bean adapter
+    * 
+    * @param beanAdapterFactory the bean adapter factory
+    * @param beanInfo the bean info
+    * @param factory the factory
+    * @throws IllegalArgumentException for null bean adapter factory or bean info
+    */
+   public DefaultBeanAdapter(BeanAdapterFactory beanAdapterFactory, BeanInfo beanInfo, MethodInfo factory)
+   {
+      super(beanAdapterFactory, beanInfo, factory);
+      ensureConstructed();
+   }
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterBuilder.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+
+/**
+ * DefaultBeanAdapterBuilder.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class DefaultBeanAdapterBuilder implements BeanAdapterBuilder
+{
+   public DefaultBeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
+   {
+      return new DefaultBeanAdapterFactory(beanInfo, factory);
+   }
+}

Added: jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterFactory.java
===================================================================
--- jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/main/java/org/jboss/xb/spi/DefaultBeanAdapterFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,51 @@
+/*
+* 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.xb.spi;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+
+/**
+ * DefaultBeanAdapterFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class DefaultBeanAdapterFactory extends AbstractBeanAdapterFactory
+{
+   /**
+    * Create a new bean adapter factory
+    * 
+    * @param beanInfo the bean info
+    * @param factory the factory
+    * @throws IllegalArgumentException for a null bean info
+    */
+   public DefaultBeanAdapterFactory(BeanInfo beanInfo, MethodInfo factory)
+   {
+      super(beanInfo, factory);
+   }
+
+   public DefaultBeanAdapter newInstance()
+   {
+      return new DefaultBeanAdapter(this, getBeanInfo(), getFactory());
+   }
+}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/AbstractBuilderTest.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/AbstractBuilderTest.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/AbstractBuilderTest.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -107,11 +107,11 @@
       return expected.cast(o);
    }
    
-   protected <T> T unmarshalObject(Class<T> expected, Class... others) throws Exception
+   protected <T, U> T unmarshalObject(Class<T> expected, Class<U> reference, Class... others) throws Exception
    {
       TestSchemaResolver resolver = new TestSchemaResolver();
       
-      SchemaBinding schemaBinding = JBossXBBuilder.build(expected);
+      SchemaBinding schemaBinding = JBossXBBuilder.build(reference);
       resolver.addSchemaBinding(schemaBinding);
       if (others != null)
       {
@@ -151,9 +151,14 @@
       return getJBossXBDelegate().unmarshal(url, schema);
    }
 
+   protected <T, U> T unmarshalObject(Class<T> expected, Class<U> reference) throws Exception
+   {
+      return unmarshalObject(expected, reference, null);
+   }
+
    protected <T> T unmarshalObject(Class<T> expected) throws Exception
    {
-      return unmarshalObject(expected, null);
+      return unmarshalObject(expected, expected, null);
    }
    
    /**
@@ -244,6 +249,7 @@
    @Override
    public void configureLogging()
    {
-      enableTrace("org.jboss.xb");
+      //enableTrace("org.jboss.xb");
+      //enableTrace("org.jboss.test.xb");
    }
 }

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/SchemaPrinter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/SchemaPrinter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/SchemaPrinter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,276 @@
+/*
+* 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.xb.builder;
+
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.xml.XMLConstants;
+
+import org.jboss.xb.binding.sunday.unmarshalling.AllBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.AttributeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ChoiceBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ModelGroupBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.SequenceBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TermBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.WildcardBinding;
+
+/**
+ * SchemaPrinter.
+ *
+ * TODO finish this off properly
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class SchemaPrinter
+{
+   @SuppressWarnings("unchecked")
+   public static String printSchema(SchemaBinding schemaBinding)
+   {
+      String nsURI = (String) schemaBinding.getNamespaces().iterator().next();
+      StringBuilder builder = new StringBuilder();
+      builder.append("<xsd:schema xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\"\n");
+      if (XMLConstants.NULL_NS_URI.equals(nsURI) == false)
+      {
+         builder.append("            targetNamespace=\"").append(nsURI).append("\"\n");
+         builder.append("            xmlns=\"").append(nsURI).append("\"\n");
+      }
+      builder.append(">\n");
+      int pad=3;
+      Iterator<ParticleBinding> elements = schemaBinding.getElementParticles();
+      while (elements != null && elements.hasNext())
+         printElement(builder, pad, elements.next());
+      Iterator<TypeBinding> types = schemaBinding.getTypes();
+      while (types != null && types.hasNext())
+         printType(builder, pad, types.next());
+      builder.append("</xsd:schema>");
+      return builder.toString();
+   }
+   
+   public static void printElement(StringBuilder builder, int pad, ParticleBinding particle)
+   {
+      ElementBinding element = (ElementBinding) particle.getTerm();
+      pad(builder, pad);
+      builder.append("<element name=\"").append(element.getQName()).append("\"");
+      int minOccurs = particle.getMinOccurs();
+      if (minOccurs != 1)
+         builder.append(" minOccurs=\"").append(minOccurs).append("\"");
+      int maxOccurs = particle.getMaxOccurs();
+      if (maxOccurs != 1)
+      {
+         builder.append(" maxOccurs=\"");
+         if (maxOccurs == -1)
+            builder.append("unbounded");
+         else
+            builder.append(maxOccurs);
+         builder.append("\"");
+      }
+      TypeBinding type = element.getType();
+      if (type != null && type.getQName() != null)
+         builder.append(" type=\"").append(type.getQName()).append("\"");
+      builder.append(">");
+      if (type != null && type.getQName() == null)
+         printAnonymousType(builder, pad + 3, type);
+      pad(builder, pad);
+      builder.append("</element>");
+   }
+
+   public static void printAnonymousType(StringBuilder builder, int pad, TypeBinding type)
+   {
+      pad(builder, pad);
+      builder.append("<complexType>");
+      TypeBinding baseTypeBinding = type.getBaseType();
+      String qName;
+      if (baseTypeBinding != null)
+         qName = baseTypeBinding.getQName().toString();
+      else
+         qName = "xsd:anyType";
+      pad(builder, pad);
+      builder.append("   <restriction base=\"").append(qName).append("\">");
+      printTypeInfo(builder, pad+6, type);
+      pad(builder, pad);
+      builder.append("   </restriction>");
+      pad(builder, pad);
+      builder.append("</complexType>");
+   }
+   
+   public static void printType(StringBuilder builder, int pad, TypeBinding type)
+   {
+      if (type.isSimple())
+         printSimpleType(builder, pad, type);
+      else
+         printComplexType(builder, pad, type);
+   }
+   
+   public static void printSimpleType(StringBuilder builder, int pad, TypeBinding type)
+   {
+      pad(builder, pad);
+      builder.append("<simpleType name=\"").append(type.getQName()).append("\"");
+      TypeBinding baseTypeBinding = type.getBaseType();
+      String qName = null;
+      if (baseTypeBinding != null)
+         qName = baseTypeBinding.getQName().toString();
+      else
+         qName = "xsd:anySimpleType";
+      builder.append(" base=\"").append(qName).append("\">");
+      printTypeInfo(builder, pad+3, type);
+      pad(builder, pad);
+      builder.append("</simpleType>");
+   }
+   
+   public static void printComplexType(StringBuilder builder, int pad, TypeBinding type)
+   {
+      pad(builder, pad);
+      builder.append("<complexType name=\"").append(type.getQName()).append("\"");
+      TypeBinding baseTypeBinding = type.getBaseType();
+      String qName = null;
+      if (baseTypeBinding != null)
+         qName = baseTypeBinding.getQName().toString();
+      else
+         qName = "xsd:anyType";
+      builder.append(" base=\"").append(qName).append("\">");
+      printTypeInfo(builder, pad+3, type);
+      pad(builder, pad);
+      builder.append("</complexType>");
+   }
+   
+   @SuppressWarnings("unchecked")
+   public static void printTypeInfo(StringBuilder builder, int pad, TypeBinding type)
+   {
+      ParticleBinding particle = type.getParticle();
+      if (particle != null)
+      {
+         printParticle(builder, pad, particle);
+      }
+      
+      Collection<AttributeBinding> attributes = type.getAttributes();
+      if (attributes != null)
+      {
+         for (AttributeBinding attribute : attributes)
+         {
+            printAttribute(builder, pad, attribute);
+         }
+      }
+   }
+
+   public static void printParticle(StringBuilder builder, int pad, ParticleBinding particle)
+   {
+      TermBinding term = particle.getTerm();
+      if (term instanceof ElementBinding)
+         printElement(builder, pad, particle);
+      else if (term instanceof WildcardBinding)
+         printWildcard(builder, pad, particle);
+      else if (term instanceof SequenceBinding)
+         printModel(builder, pad, particle, "sequence");
+      else if (term instanceof AllBinding)
+         printModel(builder, pad, particle, "all");
+      else if (term instanceof ChoiceBinding)
+         printModel(builder, pad, particle, "choice");
+   }
+
+   @SuppressWarnings("unchecked")
+   public static void printModel(StringBuilder builder, int pad, ParticleBinding particle, String prefix)
+   {
+      pad(builder, pad);
+      builder.append("<").append(prefix);
+      int minOccurs = particle.getMinOccurs();
+      if (minOccurs != 1)
+         builder.append(" minOccurs=\"").append(minOccurs).append("\"");
+      int maxOccurs = particle.getMaxOccurs();
+      if (maxOccurs != 1)
+      {
+         builder.append(" maxOccurs=\"");
+         if (maxOccurs == -1)
+            builder.append("unbounded");
+         else
+            builder.append(maxOccurs);
+         builder.append("\"");
+      }
+      builder.append(">");
+      ModelGroupBinding model = (ModelGroupBinding) particle.getTerm();
+      Collection<ParticleBinding> particles = model.getParticles();
+      boolean newLine = true;
+      if (particles != null)
+      {
+         for (ParticleBinding component : particles)
+            printParticle(builder, pad+3, component);
+      }
+      else
+      {
+         newLine = false;
+      }
+      pad(builder, pad, newLine);
+      builder.append("</").append(prefix).append(">");
+   }
+
+   public static void printWildcard(StringBuilder builder, int pad, ParticleBinding particle)
+   {
+      pad(builder, pad);
+      builder.append("<any");
+      int minOccurs = particle.getMinOccurs();
+      if (minOccurs != 1)
+         builder.append(" minOccurs=\"").append(minOccurs).append("\"");
+      int maxOccurs = particle.getMaxOccurs();
+      if (maxOccurs != 1)
+      {
+         builder.append(" maxOccurs=\"");
+         if (maxOccurs == -1)
+            builder.append("unbounded");
+         else
+            builder.append(maxOccurs);
+         builder.append("\"");
+      }
+      builder.append("/>");
+   }
+   
+   public static void printAttribute(StringBuilder builder, int pad, AttributeBinding attribute)
+   {
+      pad(builder, pad);
+      TypeBinding typeBinding = attribute.getType();
+      String qName = null;
+      if (typeBinding != null && typeBinding.getQName() != null)
+         qName = typeBinding.getQName().toString();
+      else
+         qName = "CDATA";
+      builder.append("<attribute name=\"").append(attribute.getQName().getLocalPart()).append("\"");
+      builder.append(" type=\"").append(qName).append("\"");
+      if (attribute.getRequired() == false)
+         builder.append(" optional=\"true\"/>");
+   }
+   
+   public static void pad(StringBuilder builder, int pad)
+   {
+      pad(builder, pad, true);
+   }
+   
+   public static void pad(StringBuilder builder, int pad, boolean newLine)
+   {
+      if (newLine)
+         builder.append("\n");
+      for (int i = 0; i < pad; ++ i)
+         builder.append(' ');
+   }
+}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/TestSchemaResolver.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/TestSchemaResolver.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/TestSchemaResolver.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -23,6 +23,7 @@
 
 import java.util.HashMap;
 
+import org.jboss.logging.Logger;
 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
 import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
 import org.w3c.dom.ls.LSInput;
@@ -35,6 +36,8 @@
  */
 public class TestSchemaResolver implements SchemaBindingResolver
 {
+   private static final Logger log = Logger.getLogger(TestSchemaResolver.class);
+   
    private HashMap<String, SchemaBinding> bindings = new HashMap<String, SchemaBinding>();
    
    public String getBaseURI()
@@ -47,6 +50,11 @@
       schemaBinding.setSchemaResolver(this);
       String nsURI = (String) schemaBinding.getNamespaces().iterator().next();
       bindings.put(nsURI, schemaBinding);
+      if (log.isTraceEnabled())
+      {
+         String schema = SchemaPrinter.printSchema(schemaBinding);
+         log.trace("Bound: " + nsURI + "\n" + schema);
+      }
    }
    
    public SchemaBinding resolve(String nsUri, String baseURI, String schemaLocation)

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/ObjectTestSuite.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/ObjectTestSuite.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/ObjectTestSuite.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -27,6 +27,8 @@
 
 import org.jboss.test.xb.builder.object.attribute.ObjectAttributeTestSuite;
 import org.jboss.test.xb.builder.object.element.ObjectElementTestSuite;
+import org.jboss.test.xb.builder.object.javabean.ObjectJavaBeanTestSuite;
+import org.jboss.test.xb.builder.object.mc.ObjectMCTestSuite;
 import org.jboss.test.xb.builder.object.schema.ObjectSchemaTestSuite;
 import org.jboss.test.xb.builder.object.type.ObjectTypeTestSuite;
 
@@ -51,6 +53,8 @@
       suite.addTest(ObjectElementTestSuite.suite());
       suite.addTest(ObjectTypeTestSuite.suite());
       suite.addTest(ObjectAttributeTestSuite.suite());
+      suite.addTest(ObjectJavaBeanTestSuite.suite());
+      suite.addTest(ObjectMCTestSuite.suite());
 
       return suite;
    }

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/ObjectJavaBeanTestSuite.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/ObjectJavaBeanTestSuite.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/ObjectJavaBeanTestSuite.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,61 @@
+/*
+* 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.xb.builder.object.javabean;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.jboss.test.xb.builder.object.javabean.test.ParameterInstantiateUnitTestCase;
+import org.jboss.test.xb.builder.object.javabean.test.PropertyUnitTestCase;
+import org.jboss.test.xb.builder.object.javabean.test.PropertyWildcardUnitTestCase;
+import org.jboss.test.xb.builder.object.javabean.test.SimpleInstantiateUnitTestCase;
+import org.jboss.test.xb.builder.object.javabean.test.StaticClassMethodInstantiateUnitTestCase;
+import org.jboss.test.xb.builder.object.javabean.test.StaticMethodInstantiateUnitTestCase;
+
+/**
+ * ObjectJavaBeanTestSuite.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ObjectJavaBeanTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("Object JavaBean Tests");
+
+      suite.addTest(SimpleInstantiateUnitTestCase.suite());
+      suite.addTest(StaticMethodInstantiateUnitTestCase.suite());
+      suite.addTest(StaticClassMethodInstantiateUnitTestCase.suite());
+      suite.addTest(ParameterInstantiateUnitTestCase.suite());
+      suite.addTest(PropertyUnitTestCase.suite());
+      suite.addTest(PropertyWildcardUnitTestCase.suite());
+      
+      return suite;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestParameterInstantiate.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestParameterInstantiate.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestParameterInstantiate.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,38 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * TestSimpleInstantiate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestParameterInstantiate
+{
+   public String constructorUsed;
+   
+   public TestParameterInstantiate(String string, int integer)
+   {
+      constructorUsed = string + integer;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestProperty.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestProperty.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestProperty.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,364 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.util.Date;
+
+/**
+ * TestStaticMethodInstantiate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestProperty
+{
+   /** Object */
+   private Object anObject;
+   
+   /** A string */
+   private String aString;
+
+   /** Byte */
+   private Byte aByte;
+
+   /** Boolean */
+   private Boolean aBoolean;
+
+   /** Character */
+   private Character aCharacter;
+
+   /** Short */
+   private Short aShort;
+
+   /** Int */
+   private Integer anInt;
+
+   /** Long */
+   private Long aLong;
+
+   /** Float */
+   private Float aFloat;
+
+   /** Double */
+   private Double aDouble;
+
+   /** Date */
+   private Date aDate;
+
+   /** BigDecimal */
+   private BigDecimal aBigDecimal;
+
+   /** BigDecimal */
+   private BigInteger aBigInteger;
+
+   /** byte */
+   private byte abyte;
+
+   /** boolean */
+   private boolean aboolean;
+
+   /** char */
+   private char achar;
+
+   /** short */
+   private short ashort;
+
+   /** int */
+   private int anint;
+
+   /** long */
+   private long along;
+
+   /** float */
+   private float afloat;
+
+   /** double */
+   private double adouble;
+
+   /** number */
+   private Number aNumber;
+   
+   /** Overloaded property */
+   private String overloadedProperty;
+   private String xyz;
+   private String abc;
+
+   public Object getAnObject()
+   {
+      return anObject;
+   }
+
+   public void setAnObject(Object object)
+   {
+      anObject = object;
+   }
+
+   public BigDecimal getABigDecimal()
+   {
+      return aBigDecimal;
+   }
+
+   public void setABigDecimal(BigDecimal bigDecimal)
+   {
+      aBigDecimal = bigDecimal;
+   }
+
+   public BigInteger getABigInteger()
+   {
+      return aBigInteger;
+   }
+
+   public void setABigInteger(BigInteger bigInteger)
+   {
+      aBigInteger = bigInteger;
+   }
+
+   public boolean isAboolean()
+   {
+      return aboolean;
+   }
+
+   public void setAboolean(boolean aboolean)
+   {
+      this.aboolean = aboolean;
+   }
+
+   public Boolean getABoolean()
+   {
+      return aBoolean;
+   }
+
+   public void setABoolean(Boolean boolean1)
+   {
+      aBoolean = boolean1;
+   }
+
+   public Number getANumber()
+   {
+      return aNumber;
+   }
+
+   public void setANumber(Number number)
+   {
+      aNumber = number;
+   }
+
+   public byte getAbyte()
+   {
+      return abyte;
+   }
+
+   public void setAbyte(byte abyte)
+   {
+      this.abyte = abyte;
+   }
+
+   public Byte getAByte()
+   {
+      return aByte;
+   }
+
+   public void setAByte(Byte byte1)
+   {
+      aByte = byte1;
+   }
+
+   public char getAchar()
+   {
+      return achar;
+   }
+
+   public void setAchar(char achar)
+   {
+      this.achar = achar;
+   }
+
+   public Character getACharacter()
+   {
+      return aCharacter;
+   }
+
+   public void setACharacter(Character character)
+   {
+      aCharacter = character;
+   }
+
+   public Date getADate()
+   {
+      return aDate;
+   }
+
+   public void setADate(Date date)
+   {
+      aDate = date;
+   }
+
+   public double getAdouble()
+   {
+      return adouble;
+   }
+
+   public void setAdouble(double adouble)
+   {
+      this.adouble = adouble;
+   }
+
+   public Double getADouble()
+   {
+      return aDouble;
+   }
+
+   public void setADouble(Double double1)
+   {
+      aDouble = double1;
+   }
+
+   public float getAfloat()
+   {
+      return afloat;
+   }
+
+   public void setAfloat(float afloat)
+   {
+      this.afloat = afloat;
+   }
+
+   public Float getAFloat()
+   {
+      return aFloat;
+   }
+
+   public void setAFloat(Float float1)
+   {
+      aFloat = float1;
+   }
+
+   public long getAlong()
+   {
+      return along;
+   }
+
+   public void setAlong(long along)
+   {
+      this.along = along;
+   }
+
+   public Long getALong()
+   {
+      return aLong;
+   }
+
+   public void setALong(Long long1)
+   {
+      aLong = long1;
+   }
+
+   public int getAnint()
+   {
+      return anint;
+   }
+
+   public void setAnint(int anint)
+   {
+      this.anint = anint;
+   }
+
+   public Integer getAnInt()
+   {
+      return anInt;
+   }
+
+   public void setAnInt(Integer anInt)
+   {
+      this.anInt = anInt;
+   }
+
+   public short getAshort()
+   {
+      return ashort;
+   }
+
+   public void setAshort(short ashort)
+   {
+      this.ashort = ashort;
+   }
+
+   public Short getAShort()
+   {
+      return aShort;
+   }
+
+   public void setAShort(Short short1)
+   {
+      aShort = short1;
+   }
+
+   public String getAString()
+   {
+      return aString;
+   }
+
+   public void setAString(String string)
+   {
+      aString = string;
+   }
+   
+   public String getOverloadedProperty()
+   {
+      return overloadedProperty;
+   }
+   
+   public void setOverloadedProperty(Long broken)
+   {
+      throw new RuntimeException("Invoked the wrong setter");
+   }
+   
+   public void setOverloadedProperty(String overloadedProperty)
+   {
+      this.overloadedProperty = overloadedProperty;
+   }
+   
+   public void setOverloadedProperty(Integer broken)
+   {
+      throw new RuntimeException("Invoked the wrong setter");
+   }
+
+   public String getXYZ()
+   {
+      return xyz;
+   }
+   public void setXYZ(String xyz)
+   {
+      this.xyz = xyz;
+   }
+
+   public String getAbc()
+   {
+      return abc;
+   }
+   public void setAbc(String abc)
+   {
+      this.abc = abc;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestPropertyWildcard.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestPropertyWildcard.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestPropertyWildcard.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * 
+ * TestPropertyWildcard.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestPropertyWildcard
+{
+   private TestWildcard bean;
+
+   public TestWildcard getBean()
+   {
+      return bean;
+   }
+
+   public void setBean(TestWildcard bean)
+   {
+      this.bean = bean;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestSimpleInstantiate.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestSimpleInstantiate.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestSimpleInstantiate.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,33 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * TestSimpleInstantiate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestSimpleInstantiate
+{
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiate.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiate.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiate.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -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.xb.builder.object.javabean.support;
+
+/**
+ * TestStaticClassMethodInstantiate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestStaticClassMethodInstantiate
+{
+   TestStaticClassMethodInstantiate()
+   {
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiator.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiator.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticClassMethodInstantiator.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,36 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * TestStaticClassMethodInstantiator.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestStaticClassMethodInstantiator
+{
+   public static TestStaticClassMethodInstantiate instantiate()
+   {
+      return new TestStaticClassMethodInstantiate();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticMethodInstantiate.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticMethodInstantiate.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestStaticMethodInstantiate.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * TestStaticMethodInstantiate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestStaticMethodInstantiate
+{
+   public static TestStaticMethodInstantiate instantiate()
+   {
+      return new TestStaticMethodInstantiate();
+   }
+   
+   private TestStaticMethodInstantiate()
+   {
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestWildcard.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestWildcard.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/TestWildcard.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,34 @@
+/*
+* 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.xb.builder.object.javabean.support;
+
+/**
+ * 
+ * TestPropertyWildcard.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestWildcard
+{
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Constructor.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Constructor.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Constructor.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,75 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlRootElement;
+
+/**
+ * Constructor.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlRootElement(name="constructor")
+public class Constructor
+{
+   private String factoryClass;
+   
+   private String factoryMethod;
+
+   private Parameter[] parameters;
+   
+   public String getFactoryClass()
+   {
+      return factoryClass;
+   }
+
+   @XmlAttribute(name="factoryClass")
+   public void setFactoryClass(String factoryClass)
+   {
+      this.factoryClass = factoryClass;
+   }
+
+   public String getFactoryMethod()
+   {
+      return factoryMethod;
+   }
+
+   @XmlAttribute(name="factoryMethod")
+   public void setFactoryMethod(String factoryMethod)
+   {
+      this.factoryMethod = factoryMethod;
+   }
+
+   public Parameter[] getParameters()
+   {
+      return parameters;
+   }
+
+   @XmlElement(name="parameter")
+   public void setParameters(Parameter[] parameters)
+   {
+      this.parameters = parameters;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBean.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBean.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBean.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,207 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.config.plugins.property.PropertyConfiguration;
+import org.jboss.config.spi.Configuration;
+import org.jboss.joinpoint.plugins.Config;
+import org.jboss.reflect.spi.ConstructorInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlSchema;
+import org.jboss.xb.annotations.JBossXmlType;
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBean.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at JBossXmlSchema(namespace="test:javabean", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="javabean")
+ at XmlType(name="javabean")
+ at JBossXmlType(beanAdapterBuilder=JavaBeanBuilder.class)
+public class JavaBean extends BeanAdapter
+{
+   static Configuration configuration = new PropertyConfiguration();
+
+   private String className;
+   
+   private Constructor constructor;
+   
+   private Property[] properties;
+   
+   public JavaBean(BeanAdapterFactory beanAdapterFactory)
+   {
+      super(beanAdapterFactory);
+   }
+
+   public String getClassName()
+   {
+      return className;
+   }
+
+   @XmlAttribute(name="class")
+   public void setClassName(String className)
+   {
+      this.className = className;
+   }
+
+   public Constructor getConstructor()
+   {
+      return constructor;
+   }
+
+   public void setConstructor(Constructor constructor)
+   {
+      this.constructor = constructor;
+   }
+
+   public Property[] getProperties()
+   {
+      return properties;
+   }
+
+   @XmlElement(name="property")
+   public void setProperties(Property[] properties)
+   {
+      this.properties = properties;
+   }
+
+   @XmlTransient
+   public Object getValue()
+   {
+      ClassLoader cl = Thread.currentThread().getContextClassLoader();
+      try
+      {
+         Object result = null;
+         
+         BeanInfo beanInfo = null;
+         if (className != null)
+            beanInfo = configuration.getBeanInfo(className, cl);
+         if (constructor != null)
+         {
+            String factoryMethod = constructor.getFactoryMethod();
+            if (factoryMethod != null)
+            {
+               String factoryClass = constructor.getFactoryClass();
+               BeanInfo factoryBeanInfo = beanInfo;
+               if (factoryClass != null)
+                  factoryBeanInfo = configuration.getBeanInfo(factoryClass, cl);
+               
+               String[] signature = getSignature(constructor.getParameters());
+               MethodInfo factory = Config.findMethodInfo(factoryBeanInfo.getClassInfo(), factoryMethod, signature, true, true);
+               Object[] params = getParams(constructor.getParameters(), factory.getParameterTypes());
+               result = factory.invoke(null, params); 
+            }
+            else
+            {
+               String[] signature = getSignature(constructor.getParameters());
+               ConstructorInfo constructorInfo = Config.findConstructorInfo(beanInfo.getClassInfo(), signature);
+               Object[] params = getParams(constructor.getParameters(), constructorInfo.getParameterTypes());
+               result = constructorInfo.newInstance(params);
+            }
+         }
+         else
+         {
+            result = beanInfo.newInstance();
+         }
+         if (beanInfo == null)
+            beanInfo = configuration.getBeanInfo(result.getClass());
+
+         if (properties != null)
+         {
+            for (Property property : properties)
+            {
+               Object value = property.getValue();
+               if (value != null)
+               {
+                  PropertyInfo propertyInfo = beanInfo.getProperty(property.getName());
+                  TypeInfo typeInfo = propertyInfo.getType();
+                  String type = property.getType();
+                  if (type != null)
+                     typeInfo = typeInfo.getTypeInfoFactory().getTypeInfo(type, cl);
+                  value = typeInfo.convertValue(value, false);
+                  propertyInfo.set(result, value);
+               }
+            }
+         }
+         
+         return result;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error constructing javabean", t);
+      }
+   }
+   
+   public Object get(PropertyInfo propertyInfo) throws Throwable
+   {
+      return propertyInfo.get(this);
+   }
+
+   public void set(PropertyInfo propertyInfo, Object child) throws Throwable
+   {
+      propertyInfo.set(this, child);
+   }
+
+   private String[] getSignature(Parameter[] parameters)
+   {
+      if (parameters == null)
+         return new String[0];
+      String[] signature = new String[parameters.length];
+      for (int i = 0; i < signature.length; ++i)
+         signature[i] = parameters[i].getType();
+      return signature;
+   }
+
+   private Object[] getParams(Parameter[] parameters, TypeInfo[] paramTypes)
+   {
+      if (parameters == null)
+         return new String[0];
+      Object[] params = new Object[parameters.length];
+      for (int i = 0; i < params.length; ++i)
+      {
+         Object value = parameters[i].getValue();
+         try
+         {
+            params[i] = paramTypes[i].convertValue(value, false);
+         }
+         catch (Throwable t)
+         {
+            throw new RuntimeException("Error converting parameter #" + i + " value=" + value + " to type " + paramTypes[i]);
+         }
+      }
+      return params;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanBuilder.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanBuilder.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanBuilder implements BeanAdapterBuilder
+{
+   public BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
+   {
+      return new JavaBeanFactory();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanFactory.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/JavaBeanFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * JavaBeanBuilder.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class JavaBeanFactory extends BeanAdapterFactory
+{
+   public BeanAdapter newInstance()
+   {
+      return new JavaBean(this);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Parameter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Parameter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Parameter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,62 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlValue;
+
+/**
+ * Parameter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class Parameter
+{
+   private String type;
+   
+   private Object value;
+
+   public String getType()
+   {
+      return type;
+   }
+
+   @XmlAttribute(name="class")
+   public void setType(String type)
+   {
+      this.type = type;
+   }
+
+   public Object getValue()
+   {
+      return value;
+   }
+
+   @XmlValue
+   @XmlAnyElement
+   public void setValue(Object value)
+   {
+      this.value = value;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Property.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Property.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/support/model/Property.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,46 @@
+/*
+* 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.xb.builder.object.javabean.support.model;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+/**
+ * Property.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class Property extends Parameter
+{
+   private String name;
+
+   public String getName()
+   {
+      return name;
+   }
+
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/AbstractJavaBeanTest.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/AbstractJavaBeanTest.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/AbstractJavaBeanTest.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,44 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import org.jboss.test.xb.builder.AbstractBuilderTest;
+import org.jboss.test.xb.builder.object.javabean.support.model.JavaBean;
+
+/**
+ * AbstractMCTest.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractJavaBeanTest extends AbstractBuilderTest
+{
+   public AbstractJavaBeanTest(String name)
+   {
+      super(name);
+   }
+
+   protected <T> T unmarshalJavaBean(Class<T> expected, Class... others) throws Exception
+   {
+      return unmarshalObject(expected, JavaBean.class, others);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiateUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiateUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiateUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,51 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestParameterInstantiate;
+
+/**
+ * ParameterInstantiateUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ParameterInstantiateUnitTestCase extends AbstractJavaBeanTest
+{
+   public static Test suite()
+   {
+      return suite(ParameterInstantiateUnitTestCase.class);
+   }
+   
+   public ParameterInstantiateUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testParameterInstantiate() throws Exception
+   {
+      TestParameterInstantiate result = unmarshalJavaBean(TestParameterInstantiate.class);
+      assertEquals("Hello5", result.constructorUsed);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,115 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import java.math.BigDecimal;
+import java.math.BigInteger;
+import java.text.DateFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestProperty;
+
+/**
+ * PropertyInstantiateUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyUnitTestCase extends AbstractJavaBeanTest
+{
+   private static DateFormat dateFormat = new SimpleDateFormat("MMM d HH:mm:ss z yyyy");
+
+   String stringValue =  "StringValue";
+   Byte byteValue = new Byte("12");
+   Boolean booleanValue = Boolean.TRUE;
+   // TODO character
+   // Character characterValue = new Character('a');
+   Short shortValue = new Short("123");
+   Integer integerValue = new Integer("1234");
+   Long longValue = new Long("12345");
+   Float floatValue = new Float("3.14");
+   Double doubleValue = new Double("3.14e12");
+//   Date dateValue = createDate("Mon Jan 01 00:00:00 CET 2001");
+//   Date dateValue = createDate("Jan 01 00:00:00 CET 2001");
+   BigDecimal bigDecimalValue = new BigDecimal("12e4");
+   BigInteger bigIntegerValue = new BigInteger("123456");
+
+   public static Test suite()
+   {
+      return suite(PropertyUnitTestCase.class);
+   }
+   
+   public PropertyUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testProperty() throws Exception
+   {
+      TestProperty bean = unmarshalJavaBean(TestProperty.class);
+
+      assertEquals(stringValue, bean.getAString());
+      assertEquals(byteValue, bean.getAByte());
+      assertEquals(booleanValue, bean.getABoolean());
+      // TODO character
+      // assertEquals(characterValue, bean.getACharacter());
+      assertEquals(shortValue, bean.getAShort());
+      assertEquals(integerValue, bean.getAnInt());
+      assertEquals(longValue, bean.getALong());
+      assertEquals(floatValue, bean.getAFloat());
+      assertEquals(doubleValue, bean.getADouble());
+      // TODO assertEquals(dateValue, bean.getADate());
+      assertEquals(bigDecimalValue, bean.getABigDecimal());
+      assertEquals(bigIntegerValue, bean.getABigInteger());
+      assertEquals(byteValue.byteValue(), bean.getAbyte());
+      assertEquals(booleanValue.booleanValue(), bean.isAboolean());
+      // TODO character
+      // assertEquals(characterValue.charValue(), bean.getAchar());
+      assertEquals(shortValue.shortValue(), bean.getAshort());
+      assertEquals(integerValue.intValue(), bean.getAnint());
+      assertEquals(longValue.longValue(), bean.getAlong());
+      assertEquals(floatValue.floatValue(), bean.getAfloat());
+      assertEquals(doubleValue.doubleValue(), bean.getAdouble());
+      Number number = bean.getANumber();
+      assertEquals(Long.class, number.getClass());
+      assertEquals(longValue, number);
+      assertEquals(stringValue, bean.getOverloadedProperty());
+      // An all uppercase property
+      assertEquals("XYZ", bean.getXYZ());
+      assertEquals("abc", bean.getAbc());      
+   }
+
+   protected Date createDate(String date)
+   {
+      try
+      {
+         return dateFormat.parse(date);
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException(e);
+      }
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcardUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcardUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcardUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,53 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestPropertyWildcard;
+import org.jboss.test.xb.builder.object.javabean.support.TestWildcard;
+
+/**
+ * PropertyWildcardUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class PropertyWildcardUnitTestCase extends AbstractJavaBeanTest
+{
+   public static Test suite()
+   {
+      return suite(PropertyWildcardUnitTestCase.class);
+   }
+   
+   public PropertyWildcardUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testProperty() throws Exception
+   {
+      TestPropertyWildcard bean = unmarshalJavaBean(TestPropertyWildcard.class);
+      TestWildcard wildcard = bean.getBean();
+      assertNotNull(wildcard);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiateUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiateUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiateUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,50 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestSimpleInstantiate;
+
+/**
+ * SimpleInstantiateUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class SimpleInstantiateUnitTestCase extends AbstractJavaBeanTest
+{
+   public static Test suite()
+   {
+      return suite(SimpleInstantiateUnitTestCase.class);
+   }
+   
+   public SimpleInstantiateUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testSimpleInstantiate() throws Exception
+   {
+      unmarshalJavaBean(TestSimpleInstantiate.class);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiateUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiateUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiateUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,50 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestStaticClassMethodInstantiate;
+
+/**
+ * StaticClassMethodInstantiateUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class StaticClassMethodInstantiateUnitTestCase extends AbstractJavaBeanTest
+{
+   public static Test suite()
+   {
+      return suite(StaticClassMethodInstantiateUnitTestCase.class);
+   }
+   
+   public StaticClassMethodInstantiateUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testStaticClassMethodInstantiate() throws Exception
+   {
+      unmarshalJavaBean(TestStaticClassMethodInstantiate.class);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiateUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiateUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiateUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,50 @@
+/*
+* 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.xb.builder.object.javabean.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.javabean.support.TestStaticMethodInstantiate;
+
+/**
+ * StaticMethodInstantiateUnitTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class StaticMethodInstantiateUnitTestCase extends AbstractJavaBeanTest
+{
+   public static Test suite()
+   {
+      return suite(StaticMethodInstantiateUnitTestCase.class);
+   }
+   
+   public StaticMethodInstantiateUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testStaticMethodInstantiate() throws Exception
+   {
+      unmarshalJavaBean(TestStaticMethodInstantiate.class);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/ObjectMCTestSuite.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/ObjectMCTestSuite.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/ObjectMCTestSuite.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import junit.textui.TestRunner;
+
+import org.jboss.test.xb.builder.object.mc.test.AliasTestCase;
+import org.jboss.test.xb.builder.object.mc.test.AnnotationTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ArrayTestCase;
+import org.jboss.test.xb.builder.object.mc.test.BeanFactoryTestCase;
+import org.jboss.test.xb.builder.object.mc.test.BeanTestCase;
+import org.jboss.test.xb.builder.object.mc.test.CallbackTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ClassLoaderTestCase;
+import org.jboss.test.xb.builder.object.mc.test.CollectionTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ConstructorTestCase;
+import org.jboss.test.xb.builder.object.mc.test.DemandTestCase;
+import org.jboss.test.xb.builder.object.mc.test.DependencyTestCase;
+import org.jboss.test.xb.builder.object.mc.test.DeploymentTestCase;
+import org.jboss.test.xb.builder.object.mc.test.FactoryTestCase;
+import org.jboss.test.xb.builder.object.mc.test.InjectionTestCase;
+import org.jboss.test.xb.builder.object.mc.test.InstallTestCase;
+import org.jboss.test.xb.builder.object.mc.test.LifecycleTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ListTestCase;
+import org.jboss.test.xb.builder.object.mc.test.MapTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ParameterTestCase;
+import org.jboss.test.xb.builder.object.mc.test.PropertyTestCase;
+import org.jboss.test.xb.builder.object.mc.test.SetTestCase;
+import org.jboss.test.xb.builder.object.mc.test.SupplyTestCase;
+import org.jboss.test.xb.builder.object.mc.test.ValueTestCase;
+
+/**
+ * MC Test Suite.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+public class ObjectMCTestSuite extends TestSuite
+{
+   public static void main(String[] args)
+   {
+      TestRunner.run(suite());
+   }
+
+   public static Test suite()
+   {
+      TestSuite suite = new TestSuite("MC Tests");
+
+      suite.addTest(DeploymentTestCase.suite());
+      suite.addTest(BeanTestCase.suite());
+      suite.addTest(BeanFactoryTestCase.suite());
+      suite.addTest(ClassLoaderTestCase.suite());
+      suite.addTest(ConstructorTestCase.suite());
+      suite.addTest(FactoryTestCase.suite());
+      suite.addTest(ParameterTestCase.suite());
+      suite.addTest(PropertyTestCase.suite());
+      suite.addTest(LifecycleTestCase.suite());
+      suite.addTest(DependencyTestCase.suite());
+      suite.addTest(DemandTestCase.suite());
+      suite.addTest(SupplyTestCase.suite());
+      suite.addTest(InstallTestCase.suite());
+      suite.addTest(ValueTestCase.suite());
+      suite.addTest(InjectionTestCase.suite());
+      suite.addTest(CollectionTestCase.suite());
+      suite.addTest(ListTestCase.suite());
+      suite.addTest(SetTestCase.suite());
+      suite.addTest(ArrayTestCase.suite());
+      suite.addTest(MapTestCase.suite());
+      suite.addTest(AnnotationTestCase.suite());
+      suite.addTest(AliasTestCase.suite());
+      suite.addTest(CallbackTestCase.suite());
+
+      return suite;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation1.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation1.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation1.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46386 $
+ */
+public @interface Annotation1 {
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation2.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation2.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation2.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46386 $
+ */
+public @interface Annotation2 {
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation3.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation3.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/Annotation3.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,31 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46386 $
+ */
+public @interface Annotation3 {
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttribute.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttribute.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttribute.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46386 $
+ */
+public @interface AnnotationWithAttribute 
+{
+   Class attribute();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttributes.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttributes.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/AnnotationWithAttributes.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,34 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support;
+
+/**
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46386 $
+ */
+public @interface AnnotationWithAttributes 
+{
+   Class clazz();
+   int integer();
+   String str();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/SerializableObject.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/SerializableObject.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/SerializableObject.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,34 @@
+/*
+* 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.xb.builder.object.mc.support;
+
+import java.io.Serializable;
+
+/**
+ * Simple serializable class.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class SerializableObject implements Serializable
+{
+   private static final long serialVersionUID = -1L;
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* 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.xb.builder.object.mc.support;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaDataFactory;
+import org.jboss.util.JBossObject;
+
+/**
+ * TestBeanMetaDataFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59941 $
+ */
+public class TestBeanMetaDataFactory extends JBossObject implements BeanMetaDataFactory, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   public List<BeanMetaData> getBeans()
+   {
+      ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+      AbstractBeanMetaData bean = new AbstractBeanMetaData("Bean1");
+      result.add(bean);
+      bean = new AbstractBeanMetaData("Bean2");
+      result.add(bean);
+      return result;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory1.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory1.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory1.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* 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.xb.builder.object.mc.support;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaDataFactory;
+import org.jboss.util.JBossObject;
+
+/**
+ * TestBeanMetaDataFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59941 $
+ */
+public class TestBeanMetaDataFactory1 extends JBossObject implements BeanMetaDataFactory, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   public List<BeanMetaData> getBeans()
+   {
+      ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+      AbstractBeanMetaData bean = new AbstractBeanMetaData("Bean3");
+      result.add(bean);
+      bean = new AbstractBeanMetaData("Bean4");
+      result.add(bean);
+      return result;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory2.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory2.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/TestBeanMetaDataFactory2.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* 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.xb.builder.object.mc.support;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaDataFactory;
+import org.jboss.util.JBossObject;
+
+/**
+ * TestBeanMetaDataFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59941 $
+ */
+public class TestBeanMetaDataFactory2 extends JBossObject implements BeanMetaDataFactory, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   public List<BeanMetaData> getBeans()
+   {
+      ArrayList<BeanMetaData> result = new ArrayList<BeanMetaData>();
+      AbstractBeanMetaData bean = new AbstractBeanMetaData("Bean5");
+      result.add(bean);
+      bean = new AbstractBeanMetaData("Bean6");
+      result.add(bean);
+      return result;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAliasMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAliasMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAliasMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,138 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import org.jboss.reflect.plugins.introspection.IntrospectionTypeInfoFactory;
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.reflect.spi.TypeInfoFactory;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.util.StringPropertyReplacer;
+
+/**
+ * Metadata for an alias.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AbstractAliasMetaData extends JBossObject
+      implements AliasMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+   private static TypeInfoFactory typeInfoFactory = new IntrospectionTypeInfoFactory();
+
+   public String alias;
+
+   protected boolean replace = true;
+   protected String clazz;
+
+   /**
+    * Create a new annotation meta data
+    */
+   public AbstractAliasMetaData()
+   {
+      super();
+   }
+
+   public String getAlias()
+   {
+      return alias;
+   }
+
+   public void setAlias(String alias)
+   {
+      this.alias = alias;
+   }
+
+   public boolean isReplace()
+   {
+      return replace;
+   }
+
+   public void setReplace(boolean replace)
+   {
+      this.replace = replace;
+   }
+
+   public String getClazz()
+   {
+      return clazz;
+   }
+
+   public void setClazz(String clazz)
+   {
+      this.clazz = clazz;
+   }
+
+   public Object getAliasValue()
+   {
+      try
+      {
+         if (clazz != null)
+         {
+            ClassLoader cl = Thread.currentThread().getContextClassLoader();
+            TypeInfo info = typeInfoFactory.getTypeInfo(clazz, cl);
+            return info.convertValue(alias, replace);
+         }
+         String aliasString = alias;
+         if (replace)
+         {
+            aliasString = StringPropertyReplacer.replaceProperties(aliasString);
+         }
+         return aliasString;
+      }
+      catch (Throwable t)
+      {
+         throw new RuntimeException("Error creating alias for " + alias, t);
+      }
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("alias=").append(alias);
+      buffer.append(" replace=").append(replace);
+      if (clazz != null)
+         buffer.append(" class=").append(clazz);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(alias);
+   }
+
+   protected int getHashCode()
+   {
+      return alias.hashCode();
+   }
+
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof AbstractAliasMetaData == false)
+         return false;
+
+      AbstractAliasMetaData amd = (AbstractAliasMetaData)object;
+      // this is what we probably want? - never saw duplicate annotation on a bean/prop/...
+      return alias.equals(amd.alias) && (replace == amd.replace) && (clazz != null && clazz.equals(amd.clazz));
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAnnotationMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAnnotationMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractAnnotationMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,141 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.annotation.factory.ast.TokenMgrError;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.util.StringPropertyReplacer;
+
+/**
+ * Metadata for an annotation.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60497 $
+ */
+ at XmlType(propOrder={"annotation"})
+public class AbstractAnnotationMetaData extends JBossObject
+   implements AnnotationMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   public String annotation;
+
+   protected Annotation ann;
+
+   protected boolean replace = true;
+
+   /**
+    * Create a new annotation meta data
+    */
+   public AbstractAnnotationMetaData()
+   {
+      super();
+   }
+
+   public String getAnnotation()
+   {
+      return annotation;
+   }
+
+   @XmlValue
+   public void setAnnotation(String annotation)
+   {
+      this.annotation = annotation;
+   }
+
+   public boolean isReplace()
+   {
+      return replace;
+   }
+
+   public void setReplace(boolean replace)
+   {
+      this.replace = replace;
+   }
+
+   @XmlTransient
+   public Annotation getAnnotationInstance()
+   {
+      try
+      {
+         String annString = annotation;
+         // TODO - JBMICROCONT-143 + any better way?
+         if (replace)
+         {
+            annString = StringPropertyReplacer.replaceProperties(annString);
+         }
+         //FIXME [JBMICROCONT-99] [JBAOP-278] Use the loader for the bean?
+         ann = (Annotation)AnnotationCreator.createAnnotation(annString, Thread.currentThread().getContextClassLoader());
+      }
+      catch (Exception e)
+      {
+         throw new RuntimeException("Error creating annotation for " + annotation, e);
+      }
+      catch(TokenMgrError e)
+      {
+         throw new RuntimeException("Error creating annotation for " + annotation, e);
+      }
+
+      return ann;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      if (ann == null)
+         buffer.append("expr=").append(annotation);
+      else
+         buffer.append("expr=").append(ann);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      if (ann == null)
+         buffer.append(annotation);
+      else
+         buffer.append(ann);
+   }
+
+   protected int getHashCode()
+   {
+      return annotation.hashCode();
+   }
+
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof AbstractAnnotationMetaData == false)
+         return false;
+
+      AbstractAnnotationMetaData amd = (AbstractAnnotationMetaData)object;
+      // this is what we probably want? - never saw duplicate annotation on a bean/prop/...
+      return (replace == amd.replace) && annotation.equals(amd.annotation);
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractArrayMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractArrayMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractArrayMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,74 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildWildcard;
+import org.jboss.xb.annotations.JBossXmlChildren;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Array metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType()
+ at JBossXmlNoElements
+ at JBossXmlChildren
+({
+   @JBossXmlChild(name="array", type=AbstractArrayMetaData.class),
+   @JBossXmlChild(name="collection", type=AbstractCollectionMetaData.class),
+   @JBossXmlChild(name="inject", type=AbstractDependencyValueMetaData.class),
+   @JBossXmlChild(name="list", type=AbstractListMetaData.class),
+   @JBossXmlChild(name="map", type=AbstractMapMetaData.class),
+   @JBossXmlChild(name="null", type=AbstractValueMetaData.class),
+   @JBossXmlChild(name="set", type=AbstractSetMetaData.class),
+   @JBossXmlChild(name="this", type=ThisValueMetaData.class),
+   @JBossXmlChild(name="value", type=StringValueMetaData.class),
+})
+ at JBossXmlChildWildcard(wrapper=AbstractValueMetaData.class, property="value")
+public class AbstractArrayMetaData extends AbstractListMetaData
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Create a new array value
+    */
+   public AbstractArrayMetaData()
+   {
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractBeanMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractBeanMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractBeanMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,581 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * Metadata for a bean.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+ at JBossXmlSchema(namespace="urn:jboss:bean-deployer:2.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="bean")
+ at XmlType(propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "create", "start", "stop", "destroy", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
+public class AbstractBeanMetaData extends AbstractFeatureMetaData
+   implements BeanMetaData, BeanMetaDataFactory, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   private static final List<LifecycleCallbackMetaData> EMPTY_LIFECYCLE_CALLBACKS = Collections.unmodifiableList(new ArrayList<LifecycleCallbackMetaData>());
+
+   /** The bean fully qualified class name */
+   protected String bean;
+
+   /** The name of this instance */
+   protected String name;
+
+   /** The aliases */
+   protected Set<Object> aliases;
+
+   /** The mode */
+   protected ControllerMode mode;
+
+   /** The properties configuration Set<PropertyMetaData> */
+   private Set<PropertyMetaData> properties;
+
+   /** The bean ClassLoader */
+   protected ClassLoaderMetaData classLoader;
+
+   /** The constructor */
+   protected ConstructorMetaData constructor;
+
+   /** The create lifecycle */
+   protected LifecycleMetaData create;
+
+   /** The start lifecycle */
+   protected LifecycleMetaData start;
+
+   /** The stop lifecycle */
+   protected LifecycleMetaData stop;
+
+   /** The destroy lifecycle */
+   protected LifecycleMetaData destroy;
+
+   /** What the bean demands Set<DemandMetaData> */
+   protected Set<DemandMetaData> demands;
+
+   /** What the bean supplies Set<SupplyMetaData> */
+   protected Set<SupplyMetaData> supplies;
+
+   /** What the bean dependencies Set<DependencyMetaData> */
+   protected Set<DependencyMetaData> depends;
+
+   /** The install operations List<InstallMetaData> */
+   protected List<InstallMetaData> installs;
+
+   /** The uninstall operations List<InstallMetaData> */
+   protected List<InstallMetaData> uninstalls;
+
+   /** The install callback List<InstallMetaData> */
+   protected List<CallbackMetaData> installCallbacks;
+
+   /** The uninstall callback List<InstallMetaData> */
+   protected List<CallbackMetaData> uninstallCallbacks;
+
+   /** The uninstall operations List<LifecycleCallbackMetaData> */
+   protected List<LifecycleCallbackMetaData> lifecycleCallbacks;
+
+   /**
+    * Create a new bean meta data
+    */
+   public AbstractBeanMetaData()
+   {
+      super();
+   }
+
+   /**
+    * Create a new bean meta data
+    *
+    * @param bean the bean class name
+    */
+   public AbstractBeanMetaData(String bean)
+   {
+      this.bean = bean;
+   }
+   /**
+    * Create a new bean meta data
+    *
+    * @param name the name
+    * @param bean the bean class name
+    */
+   public AbstractBeanMetaData(String name, String bean)
+   {
+      this.name = name;
+      this.bean = bean;
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      return Collections.singletonList((BeanMetaData) this);
+   }
+
+   /**
+    * Get the bean class name.
+    * @return the fully qualified bean class name.
+    */
+   public String getBean()
+   {
+      return bean;
+   }
+
+   /**
+    * Set the bean class name and flush the object cache.
+    *
+    * @param bean The bean class name to set.
+    */
+   @XmlAttribute(name="class")
+   public void setBean(String bean)
+   {
+      this.bean = bean;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Get a property
+    *
+    * @param name the name
+    * @return the property name
+    */
+   public PropertyMetaData getProperty(String name)
+   {
+      if (name == null)
+         throw new IllegalArgumentException("Null name");
+      if (properties != null && properties.size() > 0)
+      {
+         for (PropertyMetaData prop : properties)
+         {
+            if (name.equals(prop.getName()))
+               return prop;
+         }
+      }
+      return null;
+   }
+
+   /**
+    * Add a property
+    *
+    * @param property the property
+    */
+   public void addProperty(PropertyMetaData property)
+   {
+      if (property == null)
+         throw new IllegalArgumentException("Null property");
+      if (properties == null)
+         properties = new HashSet<PropertyMetaData>();
+      properties.add(property);
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the propertiess.
+    *
+    * @param properties Set<PropertyMetaData>
+    */
+   @XmlElement(name="property", type=AbstractPropertyMetaData.class)
+   public void setProperties(Set<PropertyMetaData> properties)
+   {
+      this.properties = properties;
+      flushJBossObjectCache();
+   }
+
+   public ClassLoaderMetaData getClassLoader()
+   {
+      return classLoader;
+   }
+
+   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
+   public void setClassLoader(ClassLoaderMetaData classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   /**
+    * Set the constructor
+    *
+    * @param constructor the constructor metadata
+    */
+   @XmlElement(name="constructor", type=AbstractConstructorMetaData.class)
+   public void setConstructor(ConstructorMetaData constructor)
+   {
+      this.constructor = constructor;
+   }
+
+   /**
+    * Set what the bean demands.
+    *
+    * @param demands Set<DemandMetaData>
+    */
+   @XmlElement(name="demand", type=AbstractDemandMetaData.class)
+   public void setDemands(Set<DemandMetaData> demands)
+   {
+      this.demands = demands;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set what the bean supplies.
+    *
+    * @param supplies Set<SupplyMetaData>
+    */
+   @XmlElement(name="supply", type=AbstractSupplyMetaData.class)
+   public void setSupplies(Set<SupplyMetaData> supplies)
+   {
+      this.supplies = supplies;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set what the bean depends.
+    *
+    * @param depends Set<DependencyMetaData>
+    */
+   @XmlElement(name="depends", type=AbstractDependencyMetaData.class)
+   public void setDepends(Set<DependencyMetaData> depends)
+   {
+      this.depends = depends;
+      flushJBossObjectCache();
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * Set the name.
+    *
+    * @param name The name to set.
+    */
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+      flushJBossObjectCache();
+   }
+
+   public Set<Object> getAliases()
+   {
+      return aliases;
+   }
+
+   @XmlElement(name="alias", type=String.class)
+   public void setAliases(Set<Object> aliases)
+   {
+      this.aliases = aliases;
+   }
+
+   public ControllerMode getMode()
+   {
+      return mode;
+   }
+
+   @XmlAttribute
+   public void setMode(ControllerMode mode)
+   {
+      this.mode = mode;
+      flushJBossObjectCache();
+   }
+
+   public Set<PropertyMetaData> getProperties()
+   {
+      return properties;
+   }
+
+   public ConstructorMetaData getConstructor()
+   {
+      return constructor;
+   }
+
+   public LifecycleMetaData getCreate()
+   {
+      return create;
+   }
+
+   /**
+    * Set the lifecycle metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
+   public void setCreate(LifecycleMetaData lifecycle)
+   {
+      lifecycle.setState(ControllerState.CREATE);
+      this.create = lifecycle;
+   }
+
+   public LifecycleMetaData getStart()
+   {
+      return start;
+   }
+
+   /**
+    * Set the start metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
+   public void setStart(LifecycleMetaData lifecycle)
+   {
+      lifecycle.setState(ControllerState.START);
+      this.start = lifecycle;
+   }
+
+   public LifecycleMetaData getStop()
+   {
+      return stop;
+   }
+
+   /**
+    * Set the stop metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="stop", type=AbstractLifecycleMetaData.class)
+   public void setStop(LifecycleMetaData lifecycle)
+   {
+      lifecycle.setState(ControllerState.START);
+      this.stop = lifecycle;
+   }
+
+   public LifecycleMetaData getDestroy()
+   {
+      return destroy;
+   }
+
+   /**
+    * Set the destroy metadata
+    *
+    * @param lifecycle the lifecycle metadata
+    */
+   @XmlElement(name="destroy", type=AbstractLifecycleMetaData.class)
+   public void setDestroy(LifecycleMetaData lifecycle)
+   {
+      lifecycle.setState(ControllerState.CREATE);
+      this.destroy = lifecycle;
+   }
+
+   public Set<DemandMetaData> getDemands()
+   {
+      return demands;
+   }
+
+   public Set<SupplyMetaData> getSupplies()
+   {
+      return supplies;
+   }
+
+   public Set<DependencyMetaData> getDepends()
+   {
+      return depends;
+   }
+
+   public List<InstallMetaData> getInstalls()
+   {
+      return installs;
+   }
+
+   public List<LifecycleCallbackMetaData> getLifecycleCallbacks()
+   {
+      return lifecycleCallbacks;
+   }
+
+   public void setLifecycleCallbacks(List<LifecycleCallbackMetaData> lifecycleCallbacks)
+   {
+      this.lifecycleCallbacks = lifecycleCallbacks;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the installs
+    *
+    * @param installs List<InstallMetaData>
+    */
+   @XmlElement(name="install", type=AbstractInstallMetaData.class)
+   public void setInstalls(List<InstallMetaData> installs)
+   {
+      this.installs = installs;
+      flushJBossObjectCache();
+   }
+
+   public List<InstallMetaData> getUninstalls()
+   {
+      return uninstalls;
+   }
+
+   /**
+    * Set the uninstalls
+    *
+    * @param uninstalls List<InstallMetaData>
+    */
+   @XmlElement(name="uninstall", type=AbstractInstallMetaData.class)
+   public void setUninstalls(List<InstallMetaData> uninstalls)
+   {
+      this.uninstalls = uninstalls;
+      flushJBossObjectCache();
+   }
+
+   public List<CallbackMetaData> getInstallCallbacks()
+   {
+      return installCallbacks;
+   }
+
+   @XmlElement(name="incallback", type=InstallCallbackMetaData.class)
+   public void setInstallCallbacks(List<CallbackMetaData> installCallbacks)
+   {
+      this.installCallbacks = installCallbacks;
+      flushJBossObjectCache();
+   }
+
+   public List<CallbackMetaData> getUninstallCallbacks()
+   {
+      return uninstallCallbacks;
+   }
+
+   @XmlElement(name="uncallback", type=UninstallCallbackMetaData.class)
+   public void setUninstallCallbacks(List<CallbackMetaData> uninstallCallbacks)
+   {
+      this.uninstallCallbacks = uninstallCallbacks;
+      flushJBossObjectCache();
+   }
+
+   public Object getUnderlyingValue()
+   {
+      return name;
+   }
+
+   @SuppressWarnings("unchecked")
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("name=").append(name);
+      if (aliases != null)
+         buffer.append(" aliases=").append(aliases);
+      buffer.append(" bean=").append(bean);
+      buffer.append(" properties=");
+      JBossObject.list(buffer, properties);
+      if (classLoader != null && classLoader.getClassLoader() != this)
+         buffer.append(" classLoader=").append(classLoader);
+      buffer.append(" constructor=").append(constructor);
+      if (create != null)
+         buffer.append(" create=").append(create);
+      if (start != null)
+         buffer.append(" start=").append(start);
+      if (stop != null)
+         buffer.append(" stop=").append(stop);
+      if (destroy != null)
+         buffer.append(" destroy=").append(destroy);
+      if (demands != null)
+      {
+         buffer.append(" demands=");
+         JBossObject.list(buffer, demands);
+      }
+      super.toString(buffer);
+      if (supplies != null)
+      {
+         buffer.append(" supplies=");
+         JBossObject.list(buffer, supplies);
+      }
+      if (depends != null)
+      {
+         buffer.append(" depends=");
+         JBossObject.list(buffer, depends);
+      }
+      if (installs != null)
+      {
+         buffer.append(" installs=");
+         JBossObject.list(buffer, installs);
+      }
+      if (uninstalls != null)
+      {
+         buffer.append(" uninstalls=");
+         JBossObject.list(buffer, uninstalls);
+      }
+      if (installCallbacks != null)
+      {
+         buffer.append(" installCallbacks=");
+         JBossObject.list(buffer, installCallbacks);
+      }
+      if (uninstallCallbacks != null)
+      {
+         buffer.append(" uninstallCallbacks=");
+         JBossObject.list(buffer, uninstallCallbacks);
+      }
+      if (lifecycleCallbacks != null)
+      {
+         buffer.append(" lifecycleCallbacks=");
+         JBossObject.list(buffer, lifecycleCallbacks);
+      }
+   }
+
+   public List<LifecycleCallbackMetaData> getLifecycleCallbacks(ControllerState state)
+   {
+      if (state == null)
+         throw new IllegalArgumentException("ControllerState cannot be null!");
+
+      List<LifecycleCallbackMetaData> callbacks = EMPTY_LIFECYCLE_CALLBACKS;
+      List<LifecycleCallbackMetaData> allCallbacks = getLifecycleCallbacks();
+      if (allCallbacks != null && allCallbacks.size() > 0)
+      {
+         for (LifecycleCallbackMetaData lifecycleCallback : allCallbacks)
+         {
+            if (state.equals(lifecycleCallback.getWhenRequired()))
+            {
+               if (callbacks == EMPTY_LIFECYCLE_CALLBACKS)
+               {
+                  callbacks = new ArrayList<LifecycleCallbackMetaData>();
+               }
+               callbacks.add(lifecycleCallback);
+            }
+         }
+      }
+      return callbacks;
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(bean);
+      buffer.append('/');
+      buffer.append(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,168 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for callback.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public abstract class AbstractCallbackMetaData extends AbstractLifecycleMetaData
+   implements CallbackMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The cardinality */
+   protected Cardinality cardinality;
+
+   /** The property name */
+   protected String property;
+
+   /** The required state of the dependency */
+   protected ControllerState whenRequired = ControllerState.CONFIGURED;
+
+   /** The required state of the dependency */
+   protected ControllerState dependentState = ControllerState.INSTALLED;
+
+   /** The signature */
+   protected String signature;
+
+   public AbstractCallbackMetaData()
+   {
+      setState(ControllerState.CONFIGURED);
+   }
+
+   public String getProperty()
+   {
+      return property;
+   }
+
+   /**
+    * Set the property.
+    *
+    * @param property property name
+    */
+   @XmlAttribute
+   public void setProperty(String property)
+   {
+      this.property = property;
+      flushJBossObjectCache();
+   }
+
+   public Cardinality getCardinality()
+   {
+      return cardinality;
+   }
+
+   /**
+    * Set the cardinality.
+    *
+    * @param cardinality the cardinality
+    */
+   @XmlAttribute
+   public void setCardinality(Cardinality cardinality)
+   {
+      this.cardinality = cardinality;
+      flushJBossObjectCache();
+   }
+
+   public ControllerState getWhenRequiredState()
+   {
+      return whenRequired;
+   }
+
+   /**
+    * Set when required state.
+    *
+    * @param whenRequired when is this call back required (default Configured)
+    */
+   @XmlAttribute(name="whenRequired")
+   public void setWhenRequired(ControllerState whenRequired)
+   {
+      this.whenRequired = whenRequired;
+      flushJBossObjectCache();
+   }
+
+   public String getSignature()
+   {
+      return signature;
+   }
+
+   /**
+    * Set the signature.
+    *
+    * @param signature method / property parameter signature
+    */
+   @XmlAttribute
+   public void setSignature(String signature)
+   {
+      this.signature = signature;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the required state of the dependency
+    *
+    * @param dependentState the required state or null if it must be in the registry
+    */
+   @XmlAttribute(name="state")
+   public void setDependentState(ControllerState dependentState)
+   {
+      this.dependentState = dependentState;
+      flushJBossObjectCache();
+   }
+
+   public ControllerState getDependentState()
+   {
+      return dependentState;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+      if (property != null)
+         buffer.append(" property=").append(property);
+      if (cardinality != null)
+         buffer.append(" cardinality=").append(cardinality);
+      if (signature != null)
+         buffer.append(" signature=").append(signature);
+      if (ControllerState.INSTALLED.equals(dependentState) == false)
+         buffer.append(" dependentState=" + dependentState);
+      if (ControllerState.CONFIGURED.equals(whenRequired) == false)
+         buffer.append(" whenRequiredState=" + dependentState);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      if (property != null)
+         buffer.append("property=").append(property);
+      if (methodName != null)
+         buffer.append("method=").append(methodName);
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractClassLoaderMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractClassLoaderMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractClassLoaderMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,123 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * A classloader.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60558 $
+ */
+ at XmlType(propOrder="classLoader")
+public class AbstractClassLoaderMetaData extends JBossObject
+   implements ClassLoaderMetaData, BeanMetaDataFactory, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The classloader */
+   protected ValueMetaData classloader;
+
+   /**
+    * Create a new classloader
+    */
+   public AbstractClassLoaderMetaData()
+   {
+   }
+
+   /**
+    * Create a new classloader
+    * 
+    * @param classloader the classloader value
+    */
+   public AbstractClassLoaderMetaData(ValueMetaData classloader)
+   {
+      this.classloader = classloader;
+   }
+
+   /**
+    * Set the classloader
+    * 
+    * @param classloader the classloader value
+    */
+   @XmlElements
+   ({
+      @XmlElement(name="inject", type=AbstractDependencyValueMetaData.class),
+      @XmlElement(name="null", type=AbstractValueMetaData.class),
+   })
+   public void setClassLoader(ValueMetaData classloader)
+   {
+      this.classloader = classloader;
+      flushJBossObjectCache();
+   }
+
+   @XmlAnyElement
+   public void setClassLoaderObject(Object classloader)
+   {
+      if (classloader == null)
+         setClassLoader(null);
+      else if (classloader instanceof ValueMetaData)
+         setClassLoader((ValueMetaData) classloader);
+      else
+         setClassLoader(new AbstractValueMetaData(classloader));
+   }
+
+   public ValueMetaData getClassLoader()
+   {
+      return classloader;
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      if (classloader instanceof BeanMetaDataFactory)
+      {
+         return ((BeanMetaDataFactory)classloader).getBeans();
+      }
+      else if (classloader instanceof BeanMetaData)
+      {
+         return Collections.singletonList((BeanMetaData)classloader);
+      }
+      return new ArrayList<BeanMetaData>();
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("classloader=").append(classloader);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(classloader);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCollectionMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCollectionMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractCollectionMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,176 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildWildcard;
+import org.jboss.xb.annotations.JBossXmlChildren;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Collection metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType()
+ at JBossXmlNoElements
+ at JBossXmlChildren
+({
+   @JBossXmlChild(name="array", type=AbstractArrayMetaData.class),
+   @JBossXmlChild(name="collection", type=AbstractCollectionMetaData.class),
+   @JBossXmlChild(name="inject", type=AbstractDependencyValueMetaData.class),
+   @JBossXmlChild(name="list", type=AbstractListMetaData.class),
+   @JBossXmlChild(name="map", type=AbstractMapMetaData.class),
+   @JBossXmlChild(name="null", type=AbstractValueMetaData.class),
+   @JBossXmlChild(name="set", type=AbstractSetMetaData.class),
+   @JBossXmlChild(name="this", type=ThisValueMetaData.class),
+   @JBossXmlChild(name="value", type=StringValueMetaData.class),
+})
+ at JBossXmlChildWildcard(wrapper=AbstractValueMetaData.class, property="value")
+public class AbstractCollectionMetaData extends AbstractTypeMetaData
+   implements Collection<MetaDataVisitorNode>, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The collection */
+   protected ArrayList<MetaDataVisitorNode> collection = new ArrayList<MetaDataVisitorNode>();
+
+   /** The element type */
+   protected String elementType;
+
+   /**
+    * Create a new collection value
+    */
+   public AbstractCollectionMetaData()
+   {
+   }
+
+   /**
+    * Get the element type
+    * 
+    * @return the element type
+    */
+   public String getElementType()
+   {
+      return elementType;
+   }
+
+   /**
+    * Set the element type
+    * 
+    * @param elementType the element type
+    */
+   @XmlAttribute(name="elementClass")
+   public void setElementType(String elementType)
+   {
+      this.elementType = elementType;
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   public boolean add(MetaDataVisitorNode o)
+   {
+      return collection.add(o);
+   }
+
+   public boolean addAll(Collection<? extends MetaDataVisitorNode> c)
+   {
+      return collection.addAll(c);
+   }
+
+   public void clear()
+   {
+      collection.clear();
+   }
+
+   public boolean contains(Object o)
+   {
+      return collection.contains(o);
+   }
+
+   public boolean containsAll(Collection c)
+   {
+      return collection.containsAll(c);
+   }
+
+   public boolean isEmpty()
+   {
+      return collection.isEmpty();
+   }
+
+   public Iterator<MetaDataVisitorNode> iterator()
+   {
+      return collection.iterator();
+   }
+
+   public boolean remove(Object o)
+   {
+      return collection.remove(o);
+   }
+
+   public boolean removeAll(Collection c)
+   {
+      return collection.removeAll(c);
+   }
+
+   public boolean retainAll(Collection c)
+   {
+      return collection.retainAll(c);
+   }
+
+   public int size()
+   {
+      return collection.size();
+   }
+
+   public Object[] toArray()
+   {
+      return collection.toArray();
+   }
+
+   public <T> T[] toArray(T[] a)
+   {
+      return collection.toArray(a);
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+      buffer.append(" collection=");
+      JBossObject.list(buffer, collection);
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractConstructorMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractConstructorMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractConstructorMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,206 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for construction.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60019 $
+ */
+ at XmlType(propOrder={"annotations", "factory", "parameters", "value"})
+public class AbstractConstructorMetaData extends AbstractFeatureMetaData
+   implements ConstructorMetaData, MutableParameterizedMetaData, ValueMetaDataAware, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * The paramaters List<ParameterMetaData>
+    */
+   protected List<ParameterMetaData> parameters;
+
+   /**
+    * The value
+    */
+   protected ValueMetaData value;
+
+   /**
+    * The factory
+    */
+   protected ValueMetaData factory;
+
+   /**
+    * The factory class name
+    */
+   protected String factoryClassName;
+
+   /**
+    * The factory method
+    */
+   protected String factoryMethod;
+
+   /**
+    * Create a new constructor meta data
+    */
+   public AbstractConstructorMetaData()
+   {
+   }
+
+   /**
+    * Set the parameters
+    *
+    * @param parameters List<ParameterMetaData>
+    */
+   @XmlElement(name="parameter", type=AbstractParameterMetaData.class)
+   public void setParameters(List<ParameterMetaData> parameters)
+   {
+      this.parameters = parameters;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the value
+    *
+    * @param value the value
+    */
+   @XmlElements
+   ({
+      @XmlElement(name="array", type=AbstractArrayMetaData.class),
+      @XmlElement(name="collection", type=AbstractCollectionMetaData.class),
+      @XmlElement(name="list", type=AbstractListMetaData.class),
+      @XmlElement(name="map", type=AbstractMapMetaData.class),
+      @XmlElement(name="set", type=AbstractSetMetaData.class),
+      @XmlElement(name="value", type=StringValueMetaData.class),
+   })
+   public void setValue(ValueMetaData value)
+   {
+      this.value = value;
+      flushJBossObjectCache();
+   }
+
+   @XmlAnyElement
+   public void setValueObject(Object value)
+   {
+      if (value == null)
+         setValue(null);
+      else if (value instanceof ValueMetaData)
+         setValue((ValueMetaData) value);
+      else
+         setValue(new AbstractValueMetaData(value));
+   }
+
+   /**
+    * Set the factory
+    *
+    * @param factory the factory
+    */
+   @XmlElement(name="factory", type=AbstractDependencyValueMetaData.class)
+   public void setFactory(ValueMetaData factory)
+   {
+      // HACK to have wildcard factories
+      if (factory != null && factory instanceof AbstractDependencyValueMetaData)
+      {
+         Object underlying = factory.getUnderlyingValue();
+         if (underlying != null && underlying instanceof ValueMetaData)
+            factory = (ValueMetaData) underlying;
+      }
+         
+      this.factory = factory;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the factory class name
+    *
+    * @param name the factory class name
+    */
+   @XmlAttribute(name="factoryClass")
+   public void setFactoryClass(String name)
+   {
+      this.factoryClassName = name;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the factory method
+    *
+    * @param name the factory method
+    */
+   @XmlAttribute(name="factoryMethod")
+   public void setFactoryMethod(String name)
+   {
+      this.factoryMethod = name;
+      flushJBossObjectCache();
+   }
+
+   public List<ParameterMetaData> getParameters()
+   {
+      return parameters;
+   }
+
+   public ValueMetaData getValue()
+   {
+      return value;
+   }
+
+   public ValueMetaData getFactory()
+   {
+      return factory;
+   }
+
+   public String getFactoryClass()
+   {
+      return factoryClassName;
+   }
+
+   public String getFactoryMethod()
+   {
+      return factoryMethod;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("parameters=");
+      JBossObject.list(buffer, parameters);
+      if (value != null)
+         buffer.append(" value=").append(value);
+      if (factory != null)
+         buffer.append(" factory=").append(factory);
+      if (factoryClassName != null)
+         buffer.append(" factoryClass=").append(factoryClassName);
+      if (factoryMethod != null)
+         buffer.append(" factoryMethod=").append(factoryMethod);
+      super.toString(buffer);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDemandMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDemandMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDemandMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,113 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * A demand.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60143 $
+ */
+ at XmlType
+public class AbstractDemandMetaData extends JBossObject
+   implements DemandMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The demand */
+   protected Object demand;
+   
+   /** When the dependency is required */
+   protected ControllerState whenRequired = ControllerState.DESCRIBED;
+
+   /**
+    * Create a new demand
+    */
+   public AbstractDemandMetaData()
+   {
+   }
+
+   /**
+    * Create a new demand
+    * 
+    * @param demand the demand
+    */
+   public AbstractDemandMetaData(Object demand)
+   {
+      this.demand = demand;
+   }
+   
+   /**
+    * Set the required state of the dependency
+    * 
+    * @param whenRequired when the dependecy is required
+    */
+   @XmlAttribute(name="state")
+   public void setWhenRequired(ControllerState whenRequired)
+   {
+      this.whenRequired = whenRequired;
+      flushJBossObjectCache();
+   }
+   
+   /**
+    * Set the demand
+    * 
+    * @param demand the demand
+    */
+   @XmlValue
+   public void setDemand(Object demand)
+   {
+      this.demand = demand;
+      flushJBossObjectCache();
+   }
+
+   public Object getDemand()
+   {
+      return demand;
+   }
+
+   public ControllerState getWhenRequired()
+   {
+      return whenRequired;
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("demand=").append(demand);
+      if (whenRequired != null)
+         buffer.append(" whenRequired=").append(whenRequired.getStateString());
+   }
+   
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(demand);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,90 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * A dependency.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType
+public class AbstractDependencyMetaData extends JBossObject
+   implements DependencyMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The dependency, may transient? */
+   protected Object dependency;
+
+   /**
+    * Create a new dependency
+    */
+   public AbstractDependencyMetaData()
+   {
+   }
+
+   /**
+    * Create a new dependency
+    * 
+    * @param dependency the dependency
+    */
+   public AbstractDependencyMetaData(Object dependency)
+   {
+      this.dependency = dependency;
+   }
+   
+   /**
+    * Set the dependency
+    * 
+    * @param dependency the dependency
+    */
+   @XmlValue
+   public void setDependency(Object dependency)
+   {
+      this.dependency = dependency;
+      flushJBossObjectCache();
+   }
+
+   public Object getDependency()
+   {
+      return dependency;
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("dependency=").append(dependency);
+   }
+   
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(dependency);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractDependencyValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,173 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlAttribute;
+
+/**
+ * Dependency value.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+ at XmlType
+public class AbstractDependencyValueMetaData extends AbstractValueMetaData
+{
+   private static final long serialVersionUID = 2L;
+   
+   /** The property name */
+   protected String property;
+
+   /** The when required state of the dependency or null to use current context state */
+   protected ControllerState whenRequiredState;
+
+   /** The required state of the dependency or null to look in the registry */
+   protected ControllerState dependentState = ControllerState.INSTALLED;
+
+   /**
+    * Create a new dependency value
+    */
+   public AbstractDependencyValueMetaData()
+   {
+   }
+
+   /**
+    * Create a new dependency value
+    * 
+    * @param value the value
+    */
+   public AbstractDependencyValueMetaData(Object value)
+   {
+      super(value);
+   }
+
+   /**
+    * Create a new dependency value
+    * 
+    * @param value the value
+    * @param property the property
+    */
+   public AbstractDependencyValueMetaData(Object value, String property)
+   {
+      super(value);
+      this.property = property;
+   }
+
+   /**
+    * Get the property
+    * 
+    * @return the property
+    */
+   public String getProperty()
+   {
+      return property;
+   }
+   
+   /**
+    * Set the property
+    * 
+    * @param property the property name
+    */
+   @XmlAttribute
+   public void setProperty(String property)
+   {
+      this.property = property;
+   }
+   
+   /**
+    * Set the when required state of the dependency
+    * 
+    * @param whenRequiredState the when required state or null if it uses current context state
+    */
+   public void setWhenRequiredState(ControllerState whenRequiredState)
+   {
+      this.whenRequiredState = whenRequiredState;
+      flushJBossObjectCache();
+   }
+
+   public ControllerState getWhenRequiredState()
+   {
+      return whenRequiredState;
+   }
+   
+   /**
+    * Set the required state of the dependency
+    *
+    * @param dependentState the required state or null if it must be in the registry
+    */
+   @XmlAttribute(name="state")
+   public void setDependentState(ControllerState dependentState)
+   {
+      this.dependentState = dependentState;
+      flushJBossObjectCache();
+   }
+
+   public ControllerState getDependentState()
+   {
+      return dependentState;
+   }
+
+   @XmlAttribute(name="bean")
+   @JBossXmlAttribute(type=String.class)
+   public void setValue(Object value)
+   {
+      super.setValue(value);
+   }
+
+   @XmlAnyElement
+   public void setValueObject(Object value)
+   {
+      if (value == null)
+         setValue(null);
+      else if (value instanceof ValueMetaData)
+         setValue(value);
+      else
+         setValue(new AbstractValueMetaData(value));
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   protected boolean addDependencyItem()
+   {
+      return true;
+   }
+      
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+      if (property != null)
+         buffer.append(" property=").append(property);
+      if (whenRequiredState != null)
+         buffer.append(" whenRequiredState=").append(whenRequiredState.getStateString());
+      if (dependentState != null)
+         buffer.append(" dependentState=").append(dependentState.getStateString());
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractFeatureMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractFeatureMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractFeatureMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,101 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlElement;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * General metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+public abstract class AbstractFeatureMetaData extends JBossObject
+   implements FeatureMetaData, Serializable
+{
+   private static final long serialVersionUID = 1;
+
+   /** The description */
+   protected String description;
+
+   /** The annotations */
+   protected Set<AnnotationMetaData> annotations;
+
+   /**
+    * Create a new meta data
+    */
+   public AbstractFeatureMetaData()
+   {
+   }
+   
+   /**
+    * Set the description.
+    * 
+    * @param description the description.
+    */
+   public void setDescription(String description)
+   {
+      this.description = description;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the annotations.
+    * 
+    * @param annotations Set<AnnotationMetaData>
+    */
+   @XmlElement(name="annotation", type=AbstractAnnotationMetaData.class)
+   public void setAnnotations(Set<AnnotationMetaData> annotations)
+   {
+      this.annotations = annotations;
+      flushJBossObjectCache();
+   }
+   
+   public String getDescription()
+   {
+      return description;
+   }
+   
+   public Set<AnnotationMetaData> getAnnotations()
+   {
+      return annotations;
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      if (description != null)
+         buffer.append("description=").append(description);
+      if (annotations != null)
+         buffer.append(" annotations=").append(annotations);
+   }
+   
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(description);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInjectionValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInjectionValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInjectionValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,122 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Injection value.
+ *
+ * @author <a href="ales.justin at gmail.com">Ales Justin</a>
+ */
+public class AbstractInjectionValueMetaData extends AbstractDependencyValueMetaData
+{
+   private static final long serialVersionUID = 2L;
+
+   protected InjectionType injectionType = InjectionType.BY_CLASS;
+
+   protected InjectionOption injectionOption = InjectionOption.STRICT;
+
+   /**
+    * Simplyifies things with InjectionType.BY_NAME
+    */
+   protected AbstractPropertyMetaData propertyMetaData;
+
+   /**
+    * Create a new injection value
+    */
+   public AbstractInjectionValueMetaData()
+   {
+   }
+
+   /**
+    * Create a new injection value
+    *
+    * @param value the value
+    */
+   public AbstractInjectionValueMetaData(Object value)
+   {
+      super(value);
+   }
+
+   /**
+    * Create a new injection value
+    *
+    * @param value    the value
+    * @param property the property
+    */
+   public AbstractInjectionValueMetaData(Object value, String property)
+   {
+      super(value, property);
+   }
+
+   public InjectionType getInjectionType()
+   {
+      return injectionType;
+   }
+
+   public void setInjectionType(InjectionType injectionType)
+   {
+      this.injectionType = injectionType;
+   }
+
+   public InjectionOption getInjectionOption()
+   {
+      return injectionOption;
+   }
+
+   public void setInjectionOption(InjectionOption injectionOption)
+   {
+      this.injectionOption = injectionOption;
+   }
+
+   public AbstractPropertyMetaData getPropertyMetaData()
+   {
+      return propertyMetaData;
+   }
+
+   public void setPropertyMetaData(AbstractPropertyMetaData propertyMetaData)
+   {
+      this.propertyMetaData = propertyMetaData;
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   protected boolean addDependencyItem()
+   {
+      return InjectionOption.STRICT.equals(injectionOption);
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+      if (injectionType != null)
+         buffer.append(" injectionType=").append(injectionType);
+      if (propertyMetaData != null)
+         buffer.append(" propertyMetaData=").append(propertyMetaData.getName()); //else overflow - indefinite recursion
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInstallMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInstallMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractInstallMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,109 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for installation.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+ at XmlType(propOrder={"annotations", "parameters"})
+public class AbstractInstallMetaData extends AbstractLifecycleMetaData
+   implements InstallMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The bean name */
+   protected String bean;
+
+   /** The required state of the dependency or null to look in the registry */
+   protected ControllerState dependentState = ControllerState.INSTALLED;
+
+   /**
+    * Create a new install meta data
+    */
+   public AbstractInstallMetaData()
+   {
+      setState(ControllerState.INSTALLED);
+   }
+
+   public String getBean()
+   {
+      return bean;
+   }
+
+   /**
+    * Set the bean
+    * 
+    * @param bean the bean
+    */
+   @XmlAttribute
+   public void setBean(String bean)
+   {
+      this.bean = bean;
+   }
+
+   /**
+    * Set the required state of the dependency
+    * 
+    * @param dependentState the required state or null if it must be in the registry
+    */
+   @XmlAttribute(name="state")
+   public void setDependentState(ControllerState dependentState)
+   {
+      this.dependentState = dependentState;
+      flushJBossObjectCache();
+   }
+
+   public ControllerState getDependentState()
+   {
+      return dependentState;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      if (bean != null)
+         buffer.append("bean=").append(bean);
+      if (ControllerState.INSTALLED.equals(dependentState) == false)
+         buffer.append(" dependentState=" + dependentState);
+      buffer.append(" ");
+      super.toString(buffer);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      if (bean != null)
+      {
+         buffer.append(bean).append(".");
+      }
+      if (methodName != null)
+         buffer.append(methodName);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractKernelDeployment.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractKernelDeployment.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractKernelDeployment.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,217 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.test.xb.builder.object.mc.support.model.factory.GenericBeanFactoryMetaData;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * An abstract kernel deployment.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60497 $
+ */
+ at JBossXmlSchema(namespace="urn:jboss:bean-deployer:2.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="deployment")
+ at XmlType(propOrder={"classLoader", "beanFactories"})
+public class AbstractKernelDeployment extends JBossObject
+   implements KernelDeployment, Serializable
+{
+   private static final long serialVersionUID = 1;
+
+   /** The name of the deployment */
+   protected String name;
+
+   /** Whether it is installed */
+   protected boolean installed;
+
+   /** Is deployment scoped */
+   protected Boolean scoped;
+
+   /** The annotations */
+   protected Set<AnnotationMetaData> annotations;
+
+   /** The beans List<BeanMetaDataFactory> */
+   protected List<BeanMetaDataFactory> beanFactories;
+
+   /** The ClassLoader */
+   protected ClassLoaderMetaData classLoader;
+
+   /**
+    * Create a new kernel deployment
+    */
+   public AbstractKernelDeployment()
+   {
+   }
+
+   /**
+    * Set the bean factories.
+    *
+    * @deprecated use setBeanFactories
+    * @param beans a List<BeanMetaData>.
+    */
+   @SuppressWarnings("unchecked")
+   public void setBeans(List beans)
+   {
+      this.beanFactories = beans;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Set the bean factories.
+    * 
+    * @param beanFactories a List<BeanMetaDataFactory>.
+    */
+   @XmlElements
+   ({
+      @XmlElement(name="bean", type=AbstractBeanMetaData.class),
+      @XmlElement(name="beanfactory", type=GenericBeanFactoryMetaData.class),
+   })
+   @XmlAnyElement
+   public void setBeanFactories(List<BeanMetaDataFactory> beanFactories)
+   {
+      this.beanFactories = beanFactories;
+      flushJBossObjectCache();
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+      flushJBossObjectCache();
+   }
+
+   public boolean isInstalled()
+   {
+      return installed;
+   }
+
+   public void setInstalled(boolean installed)
+   {
+      this.installed = installed;
+      flushJBossObjectCache();
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      if (beanFactories == null || beanFactories.size() == 0)
+         return null;
+      List<BeanMetaData> result = new ArrayList<BeanMetaData>(beanFactories.size());
+      for (BeanMetaDataFactory factory : beanFactories)
+      {
+         List<BeanMetaData> beans = factory.getBeans();
+         // add all deployment annotations to bean's annotations
+         if (annotations != null && annotations.isEmpty() == false)
+         {
+            for (BeanMetaData bmd : beans)
+            {
+               Set<AnnotationMetaData> annotationsBMD = bmd.getAnnotations();
+               if (annotationsBMD == null)
+               {
+                  annotationsBMD = new HashSet<AnnotationMetaData>();
+                  bmd.setAnnotations(annotationsBMD);
+               }
+               annotationsBMD.addAll(annotations);
+            }
+         }
+         result.addAll(beans);
+      }
+      return result;
+   }
+
+   public Boolean isScoped()
+   {
+      return scoped;
+   }
+
+   public void setScoped(Boolean scoped)
+   {
+      this.scoped = scoped;
+   }
+
+   public Set<AnnotationMetaData> getAnnotations()
+   {
+      return annotations;
+   }
+
+   public void setAnnotations(Set<AnnotationMetaData> annotations)
+   {
+      this.annotations = annotations;
+   }
+
+   public List<BeanMetaDataFactory> getBeanFactories()
+   {
+      return beanFactories;
+   }
+
+   public ClassLoaderMetaData getClassLoader()
+   {
+      return classLoader;
+   }
+
+   /**
+    * Set the classloader
+    * 
+    * @param classLoader the classloader metadata
+    */
+   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
+   public void setClassLoader(ClassLoaderMetaData classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("name=").append(name);
+      buffer.append(" installed=").append(installed);
+      if (classLoader != null)
+         buffer.append(" classLoader=").append(classLoader);
+      if (beanFactories != null)
+         buffer.append(" beanFactories=").append(beanFactories);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(name);
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleCallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleCallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleCallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,97 @@
+/*
+* 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.mc.support.model;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata about lifecycle callbacks that should be invoked once a 
+ * bean reaches a certain lifecycle state
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractLifecycleCallbackMetaData extends JBossObject 
+implements LifecycleCallbackMetaData, MetaDataVisitorNode
+{
+   String bean;
+   ControllerState whenRequired;
+   ControllerState dependentState;
+   String installMethod;
+   String uninstallMethod;
+   
+   public AbstractLifecycleCallbackMetaData(String bean, ControllerState whenRequired, ControllerState dependentState, String installMethod, String uninstallMethod)
+   {
+      super();
+      this.bean = bean;
+      this.whenRequired  = whenRequired;
+      this.dependentState = dependentState;
+      this.installMethod = installMethod;
+      this.uninstallMethod = uninstallMethod;
+   }
+
+   public String getBean()
+   {
+      return bean;
+   }
+
+   public ControllerState getDependentState()
+   {
+      return dependentState;
+   }
+
+   public ControllerState getWhenRequired()
+   {
+      return whenRequired;
+   }
+
+   public String getInstallMethod()
+   {
+      return installMethod;
+   }
+
+   public String getUninstallMethod()
+   {
+      return uninstallMethod;
+   }
+
+   public String toShortString()
+   {
+      JBossStringBuilder buffer = new JBossStringBuilder();
+      toShortString(buffer);
+      return buffer.toString();
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      if (bean != null)
+         buffer.append(bean);
+      if (whenRequired != null)
+         buffer.append("." + whenRequired.toString());
+   }
+   
+   public String toString()
+   {
+      return toShortString();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractLifecycleMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,162 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.List;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for lifecycle.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 63037 $
+ */
+ at XmlType(propOrder={"annotations", "parameters"})
+public class AbstractLifecycleMetaData extends AbstractFeatureMetaData
+   implements LifecycleMetaData, MutableParameterizedMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The state */
+   protected ControllerState state;
+
+   /** The method name */
+   protected String methodName;
+
+   /** The ignored attribute */
+   boolean ignored;
+
+   /** The paramaters List<ParameterMetaData> */
+   protected List<ParameterMetaData> parameters;
+
+   /** The type - create, start, stop, destroy, install */
+   protected String type;
+
+   /**
+    * Create a new lifecycle meta data
+    */
+   public AbstractLifecycleMetaData()
+   {
+   }
+
+   public AbstractLifecycleMetaData(String methodName)
+   {
+      this.methodName = methodName;
+   }
+
+   public ControllerState getState()
+   {
+      return state;
+   }
+
+   public void setState(ControllerState state)
+   {
+      this.state = state;
+   }
+
+   public String getMethodName()
+   {
+      return methodName;
+   }
+
+   /**
+    * Set the method name
+    * 
+    * @param name the factory method
+    */
+   @XmlAttribute(name="method")
+   public void setMethodName(String name)
+   {
+      this.methodName = name;
+      flushJBossObjectCache();
+   }
+
+   public boolean isIgnored()
+   {
+      return ignored;
+   }
+
+   /**
+    * Set ignored attribute.
+    *
+    * @param ignored the ignored
+    */
+   @XmlAttribute
+   public void setIgnored(boolean ignored)
+   {
+      this.ignored = ignored;
+   }
+
+   public List<ParameterMetaData> getParameters()
+   {
+      return parameters;
+   }
+
+   /**
+    * Set the parameters
+    * 
+    * @param parameters List<ParameterMetaData>
+    */
+   @XmlElement(name="parameter", type=AbstractParameterMetaData.class)
+   public void setParameters(List<ParameterMetaData> parameters)
+   {
+      this.parameters = parameters;
+      flushJBossObjectCache();
+   }
+
+   /**
+    * Get type - create, start, stop, destroy, install
+    *
+    * @return lifecycle type
+    */
+   public String getType()
+   {
+      return type;
+   }
+
+   public void setType(String type)
+   {
+      this.type = type;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      if (methodName != null)
+         buffer.append("method=").append(methodName);
+      buffer.append(" parameters=");
+      JBossObject.list(buffer, parameters);
+      buffer.append(" ");
+      super.toString(buffer);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(methodName);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractListMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractListMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractListMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,124 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.List;
+import java.util.ListIterator;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildWildcard;
+import org.jboss.xb.annotations.JBossXmlChildren;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * List metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType()
+ at JBossXmlNoElements
+ at JBossXmlChildren
+({
+   @JBossXmlChild(name="array", type=AbstractArrayMetaData.class),
+   @JBossXmlChild(name="collection", type=AbstractCollectionMetaData.class),
+   @JBossXmlChild(name="inject", type=AbstractDependencyValueMetaData.class),
+   @JBossXmlChild(name="list", type=AbstractListMetaData.class),
+   @JBossXmlChild(name="map", type=AbstractMapMetaData.class),
+   @JBossXmlChild(name="null", type=AbstractValueMetaData.class),
+   @JBossXmlChild(name="set", type=AbstractSetMetaData.class),
+   @JBossXmlChild(name="this", type=ThisValueMetaData.class),
+   @JBossXmlChild(name="value", type=StringValueMetaData.class),
+})
+ at JBossXmlChildWildcard(wrapper=AbstractValueMetaData.class, property="value")
+public class AbstractListMetaData extends AbstractCollectionMetaData
+   implements List<MetaDataVisitorNode>, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Create a new list value
+    */
+   public AbstractListMetaData()
+   {
+   }
+   
+   public void add(int index, MetaDataVisitorNode element)
+   {
+      collection.add(index, element);
+   }
+
+   public boolean addAll(int index, Collection<? extends MetaDataVisitorNode> c)
+   {
+      return collection.addAll(index, c);
+   }
+
+   public MetaDataVisitorNode get(int index)
+   {
+      return collection.get(index);
+   }
+
+   public int indexOf(Object o)
+   {
+      return collection.indexOf(o);
+   }
+
+   public int lastIndexOf(Object o)
+   {
+      return lastIndexOf(o);
+   }
+
+   public ListIterator<MetaDataVisitorNode> listIterator()
+   {
+      return collection.listIterator();
+   }
+
+   public ListIterator<MetaDataVisitorNode> listIterator(int index)
+   {
+      return collection.listIterator(index);
+   }
+
+   public MetaDataVisitorNode remove(int index)
+   {
+      return collection.remove(index);
+   }
+
+   public MetaDataVisitorNode set(int index, MetaDataVisitorNode element)
+   {
+      return set(index, element);
+   }
+
+   public List<MetaDataVisitorNode> subList(int fromIndex, int toIndex)
+   {
+      return subList(fromIndex, toIndex);
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractMapMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractMapMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractMapMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,231 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildren;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Map metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType()
+ at JBossXmlNoElements
+ at JBossXmlChildren
+({
+   @JBossXmlChild(name="entry", type=MapEntry.class),
+})
+public class AbstractMapMetaData extends AbstractTypeMetaData
+   implements Set<MapEntry>, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The map */
+   private HashMap<MetaDataVisitorNode, MetaDataVisitorNode> map = new HashMap<MetaDataVisitorNode, MetaDataVisitorNode>();
+
+   /** The key type */
+   protected String keyType;
+
+   /** The value type */
+   protected String valueType;
+
+   /**
+    * Create a new map value
+    */
+   public AbstractMapMetaData()
+   {
+   }
+
+   /**
+    * Get the key type
+    * 
+    * @return the key type
+    */
+   public String getKeyType()
+   {
+      return keyType;
+   }
+
+   /**
+    * Set the key type
+    * 
+    * @param keyType the key type
+    */
+   @XmlAttribute(name="keyClass")
+   public void setKeyType(String keyType)
+   {
+      this.keyType = keyType;
+   }
+
+   /**
+    * Get the value type
+    * 
+    * @return the value type
+    */
+   public String getValueType()
+   {
+      return valueType;
+   }
+
+   /**
+    * Set the value type
+    * 
+    * @param valueType the value type
+    */
+   @XmlAttribute(name="valueClass")
+   public void setValueType(String valueType)
+   {
+      this.valueType = valueType;
+   }
+
+   protected Class<? extends Map> expectedMapClass()
+   {
+      return Map.class;
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   public void clear()
+   {
+      map.clear();
+   }
+
+   public boolean containsKey(Object key)
+   {
+      return map.containsKey(key);
+   }
+
+   public boolean containsValue(Object value)
+   {
+      return map.containsValue(value);
+   }
+
+   public Set<Map.Entry<MetaDataVisitorNode, MetaDataVisitorNode>> entrySet()
+   {
+      return map.entrySet();
+   }
+
+   public MetaDataVisitorNode get(Object key)
+   {
+      return map.get(key);
+   }
+
+   public boolean isEmpty()
+   {
+      return map.isEmpty();
+   }
+
+   public Set<MetaDataVisitorNode> keySet()
+   {
+      return map.keySet();
+   }
+
+   public MetaDataVisitorNode put(MetaDataVisitorNode key, MetaDataVisitorNode value)
+   {
+      return map.put(key, value);
+   }
+
+   public void putAll(Map<? extends MetaDataVisitorNode, ? extends MetaDataVisitorNode> t)
+   {
+      map.putAll(t);
+   }
+
+   public boolean remove(Object key)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public int size()
+   {
+      return map.size();
+   }
+
+   public Collection<MetaDataVisitorNode> values()
+   {
+      return map.values();
+   }
+
+   public boolean add(MapEntry o)
+   {
+      map.put(o.getKey(), o.getValue());
+      return true;
+   }
+
+   public boolean addAll(Collection<? extends MapEntry> c)
+   {
+      for (MapEntry mapEntry : c)
+         add(mapEntry);
+      return true;
+   }
+
+   public boolean contains(Object o)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public boolean containsAll(Collection<?> c)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public Iterator<MapEntry> iterator()
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public boolean removeAll(Collection<?> c)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public boolean retainAll(Collection<?> c)
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public Object[] toArray()
+   {
+      throw new UnsupportedOperationException();
+   }
+
+   public <T> T[] toArray(T[] a)
+   {
+      throw new UnsupportedOperationException();
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractParameterMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractParameterMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractParameterMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,205 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for a parameter.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60019 $
+ */
+ at XmlType(propOrder={"annotations", "value"})
+public class AbstractParameterMetaData extends AbstractFeatureMetaData
+   implements ParameterMetaData, ValueMetaDataAware, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * The parameter type
+    */
+   protected String type;
+
+   /**
+    * The parameter value
+    */
+   protected ValueMetaData value;
+
+   /**
+    * The index in parameter list
+    */
+   protected int index;
+
+   /**
+    * Create a new parameter meta data
+    */
+   public AbstractParameterMetaData()
+   {
+   }
+
+   /**
+    * Create a new parameter meta data
+    *
+    * @param value the value
+    */
+   public AbstractParameterMetaData(Object value)
+   {
+      this.type = value.getClass().getName();
+      this.value = new AbstractValueMetaData(value);
+   }
+
+   /**
+    * Create a new parameter meta data
+    *
+    * @param value the value metadata
+    */
+   public AbstractParameterMetaData(ValueMetaData value)
+   {
+      this.value = value;
+   }
+
+   /**
+    * Create a new parameter meta data
+    *
+    * @param type  the type
+    * @param value the value
+    */
+   public AbstractParameterMetaData(String type, Object value)
+   {
+      this.type = type;
+      this.value = new AbstractValueMetaData(value);
+   }
+
+   /**
+    * Create a new parameter meta data
+    *
+    * @param type  the type
+    * @param value the string value
+    */
+   public AbstractParameterMetaData(String type, String value)
+   {
+      this.type = type;
+      this.value = new StringValueMetaData(value);
+   }
+
+   /**
+    * Create a new parameter meta data
+    *
+    * @param type  the type
+    * @param value the value meta data
+    */
+   public AbstractParameterMetaData(String type, ValueMetaData value)
+   {
+      this.type = type;
+      this.value = value;
+   }
+
+   public String getType()
+   {
+      return type;
+   }
+
+   @XmlAttribute(name="class")
+   public void setType(String type)
+   {
+      this.type = type;
+      flushJBossObjectCache();
+   }
+
+   public ValueMetaData getValue()
+   {
+      return value;
+   }
+
+   public int getIndex()
+   {
+      return index;
+   }
+
+   public void setIndex(int index)
+   {
+      this.index = index;
+   }
+
+   @XmlElements
+   ({
+      @XmlElement(name="array", type=AbstractArrayMetaData.class),
+      @XmlElement(name="collection", type=AbstractCollectionMetaData.class),
+      @XmlElement(name="inject", type=AbstractDependencyValueMetaData.class),
+      @XmlElement(name="list", type=AbstractListMetaData.class),
+      @XmlElement(name="map", type=AbstractMapMetaData.class),
+      @XmlElement(name="set", type=AbstractSetMetaData.class),
+      @XmlElement(name="this", type=ThisValueMetaData.class),
+      @XmlElement(name="value", type=StringValueMetaData.class),
+   })
+   public void setValue(ValueMetaData value)
+   {
+      this.value = value;
+      flushJBossObjectCache();
+   }
+
+   @XmlAnyElement
+   public void setValueObject(Object value)
+   {
+      if (value == null)
+         setValue(null);
+      else if (value instanceof ValueMetaData)
+         setValue((ValueMetaData) value);
+      else
+         setValue(new AbstractValueMetaData(value));
+   }
+
+   @XmlValue
+   public void setValueString(String value)
+   {
+      if (value == null)
+         setValue(null);
+      else
+      {
+         StringValueMetaData stringValue = new StringValueMetaData(value);
+         stringValue.setType(getType());
+         setValue(stringValue);
+      }
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("type=").append(type);
+      buffer.append(" value=").append(value);
+      super.toString(buffer);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(type);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertiesMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertiesMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertiesMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,66 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.util.Map;
+import java.util.Properties;
+
+/**
+ * Properties metadata.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AbstractPropertiesMetaData extends AbstractMapMetaData
+{
+   private static final long serialVersionUID = 1L;
+
+   protected Map<Object, Object> getDefaultMapInstance() throws Throwable
+   {
+      return new Properties();
+   }
+
+   protected Class<? extends Map> expectedMapClass()
+   {
+      return Properties.class;
+   }
+
+   public String getKeyType()
+   {
+      return String.class.getName();
+   }
+
+   public void setKeyType(String keyType)
+   {
+      throw new IllegalArgumentException("Illegal call to set properties key type!");
+   }
+
+   public String getValueType()
+   {
+      return String.class.getName();
+   }
+
+   public void setValueType(String valueType)
+   {
+      throw new IllegalArgumentException("Illegal call to set properties value type!");
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractPropertyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,220 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAnyElement;
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlElements;
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Metadata for a property.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60019 $
+ */
+ at XmlType(propOrder={"annotations", "value"})
+public class AbstractPropertyMetaData extends AbstractFeatureMetaData
+   implements PropertyMetaData, ValueMetaDataAware, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The property name */
+   protected String name;
+
+   /** The property value */
+   protected ValueMetaData value;
+
+   /**
+    * Create a new property meta data
+    */
+   public AbstractPropertyMetaData()
+   {
+   }
+
+   /**
+    * Create a new property meta data
+    * 
+    * @param name the name
+    * @param value the value
+    */
+   public AbstractPropertyMetaData(String name, Object value)
+   {
+      this.name = name;
+      this.value = new AbstractValueMetaData(value);
+   }
+
+   /**
+    * Create a new property meta data
+    * 
+    * @param name the name
+    * @param value the string value
+    */
+   public AbstractPropertyMetaData(String name, String value)
+   {
+      this.name = name;
+      this.value = new StringValueMetaData(value);
+   }
+
+   /**
+    * Create a new attribute meta data
+    * 
+    * @param name the name
+    * @param value the value meta data
+    */
+   public AbstractPropertyMetaData(String name, ValueMetaData value)
+   {
+      this.name = name;
+      this.value = value;
+   }
+
+   /**
+    * Create a new property meta data
+    * 
+    * @param name the name
+    * @param value the string value
+    * @param type the type
+    */
+   public AbstractPropertyMetaData(String name, String value, String type)
+   {
+      this.name = name;
+      StringValueMetaData svmd = new StringValueMetaData(value);
+      svmd.setType(type);
+      this.value = svmd;
+   }
+
+   public String getName()
+   {
+      return name;
+   }
+
+   /**
+    * Set the name
+    * 
+    * @param name the name
+    */
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+      flushJBossObjectCache();
+   }
+
+   public String getType()
+   {
+      if (value instanceof AbstractTypeMetaData)
+      {
+         return ((AbstractTypeMetaData)value).getType();
+      }
+      return null;
+   }
+
+   public ValueMetaData getValue()
+   {
+      return value;
+   }
+
+   /**
+    * Set the value
+    * 
+    * @param value the value
+    */
+   @XmlElements
+   ({
+      @XmlElement(name="array", type=AbstractArrayMetaData.class),
+      @XmlElement(name="collection", type=AbstractCollectionMetaData.class),
+      @XmlElement(name="inject", type=AbstractDependencyValueMetaData.class),
+      @XmlElement(name="list", type=AbstractListMetaData.class),
+      @XmlElement(name="map", type=AbstractMapMetaData.class),
+      @XmlElement(name="set", type=AbstractSetMetaData.class),
+      @XmlElement(name="this", type=ThisValueMetaData.class),
+      @XmlElement(name="value", type=StringValueMetaData.class),
+   })
+   public void setValue(ValueMetaData value)
+   {
+      this.value = value;
+      flushJBossObjectCache();
+   }
+
+   @XmlAnyElement
+   public void setValueObject(Object value)
+   {
+      if (value == null)
+         setValue(null);
+      else if (value instanceof ValueMetaData)
+         setValue((ValueMetaData) value);
+      else
+         setValue(new AbstractValueMetaData(value));
+   }
+
+   @XmlValue
+   public void setValueString(String value)
+   {
+      if (value == null)
+         setValue(null);
+      else
+      {
+         ValueMetaData valueMetaData = getValue();
+         if (valueMetaData instanceof StringValueMetaData)
+         {
+            ((StringValueMetaData) valueMetaData).setValue(value);
+            return;
+         }
+         StringValueMetaData stringValue = new StringValueMetaData(value);
+         stringValue.setType(getType());
+         setValue(stringValue);
+      }
+   }
+
+   @XmlAttribute(name="class")
+   public void setPropertyType(String type)
+   {
+      ValueMetaData valueMetaData = getValue();
+      if (valueMetaData != null && valueMetaData instanceof StringValueMetaData == false)
+         throw new IllegalArgumentException("Property is not a string");
+      if (valueMetaData == null)
+      {
+         valueMetaData = new StringValueMetaData();
+         setValue(valueMetaData);
+      }
+      ((StringValueMetaData) valueMetaData).setType(type);
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("name=").append(name);
+      if (value != null)
+         buffer.append(" value=").append(value);
+      super.toString(buffer);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSetMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSetMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSetMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+import java.util.Collection;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlChildWildcard;
+import org.jboss.xb.annotations.JBossXmlChildren;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Set metadata.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType()
+ at JBossXmlNoElements
+ at JBossXmlChildren
+({
+   @JBossXmlChild(name="array", type=AbstractArrayMetaData.class),
+   @JBossXmlChild(name="collection", type=AbstractCollectionMetaData.class),
+   @JBossXmlChild(name="inject", type=AbstractDependencyValueMetaData.class),
+   @JBossXmlChild(name="list", type=AbstractListMetaData.class),
+   @JBossXmlChild(name="map", type=AbstractMapMetaData.class),
+   @JBossXmlChild(name="null", type=AbstractValueMetaData.class),
+   @JBossXmlChild(name="set", type=AbstractSetMetaData.class),
+   @JBossXmlChild(name="this", type=ThisValueMetaData.class),
+   @JBossXmlChild(name="value", type=StringValueMetaData.class),
+})
+ at JBossXmlChildWildcard(wrapper=AbstractValueMetaData.class, property="value")
+public class AbstractSetMetaData extends AbstractCollectionMetaData
+   implements Set<MetaDataVisitorNode>, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Create a new set value
+    */
+   public AbstractSetMetaData()
+   {
+   }
+
+   public boolean add(MetaDataVisitorNode o)
+   {
+      if (collection.contains(o))
+         return false;
+      return super.add(o);
+   }
+
+   public boolean addAll(Collection<? extends MetaDataVisitorNode> c)
+   {
+      boolean changed = false;
+      if (c != null && c.size() > 0)
+      {
+         for (MetaDataVisitorNode o : c)
+         {
+            if (collection.contains(o) == false)
+            {
+               if (super.add(o))
+                  changed = true;
+            }
+         }
+      }
+      return changed;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+   }
+
+   protected Collection<Object> getDefaultCollectionInstance() throws Throwable
+   {
+      return new HashSet<Object>();
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSupplyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSupplyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractSupplyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,90 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * A supply.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType
+public class AbstractSupplyMetaData extends JBossObject
+   implements SupplyMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** The supply */
+   protected Object supply;
+
+   /**
+    * Create a new supply
+    */
+   public AbstractSupplyMetaData()
+   {
+   }
+
+   /**
+    * Create a new supply
+    * 
+    * @param supply the supply
+    */
+   public AbstractSupplyMetaData(Object supply)
+   {
+      this.supply = supply;
+   }
+   
+   /**
+    * Set the supply
+    * 
+    * @param supply the supply
+    */
+   @XmlValue
+   public void setSupply(Object supply)
+   {
+      this.supply = supply;
+      flushJBossObjectCache();
+   }
+
+   public Object getSupply()
+   {
+      return supply;
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("supply=").append(supply);
+   }
+   
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(supply);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractTypeMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractTypeMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractTypeMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,95 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlAttribute;
+
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * A typed value.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+public abstract class AbstractTypeMetaData extends AbstractValueMetaData
+   implements Serializable
+{
+   private static final long serialVersionUID = 2L;
+
+   /**
+    * The type
+    */
+   protected String type;
+
+   /**
+    * The property name
+    */
+   protected String propertyName;
+
+   /**
+    * The bean name
+    */
+   protected String beanName;
+
+   /**
+    * Create a new typed value
+    */
+   public AbstractTypeMetaData()
+   {
+   }
+
+   /**
+    * Create a new typed value
+    *
+    * @param value the value
+    */
+   public AbstractTypeMetaData(String value)
+   {
+      super(value);
+   }
+
+   /**
+    * Set the type
+    *
+    * @param type the type
+    */
+   @XmlAttribute(name="class")
+   public void setType(String type)
+   {
+      this.type = type;
+   }
+
+   public String getType()
+   {
+      return type;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      super.toString(buffer);
+      if (type != null)
+         buffer.append(" type=").append(type);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AbstractValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,98 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Plain value.
+ *
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at XmlType
+ at JBossXmlNoElements
+public class AbstractValueMetaData extends JBossObject
+   implements ValueMetaData, Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * The value
+    */
+   protected Object value;
+
+   /**
+    * Create a new plain value
+    */
+   public AbstractValueMetaData()
+   {
+   }
+
+   /**
+    * Create a new plain value
+    *
+    * @param value the value
+    */
+   public AbstractValueMetaData(Object value)
+   {
+      this.value = value;
+   }
+
+   public Object getValue()
+   {
+      return value;
+   }
+
+   public void setValue(Object value)
+   {
+      this.value = value;
+      flushJBossObjectCache();
+   }
+
+   public Object getUnderlyingValue()
+   {
+      return value;
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return info != null ? info.convertValue(value) : value;
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("value=").append(value);
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append(value);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AliasMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AliasMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AliasMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,34 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about an alias attribute.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface AliasMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   Object getAliasValue();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AnnotationMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AnnotationMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/AnnotationMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.lang.annotation.Annotation;
+
+import javax.xml.bind.annotation.XmlTransient;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about an annotation attribute.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 46386 $
+ */
+public interface AnnotationMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   @XmlTransient
+   Annotation getAnnotationInstance();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,203 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.util.List;
+import java.util.Set;
+
+/**
+ * Metadata about a bean.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+public interface BeanMetaData extends FeatureMetaData, ValueMetaData
+{
+   /**
+    * Get the bean.
+    * 
+    * @return the bean.
+    */
+   String getBean();
+
+   /**
+    * Get the name
+    * 
+    * @return the name
+    */
+   String getName();
+   
+   /**
+    * Set the name
+    * 
+    * @param name the name
+    */
+   void setName(String name);
+
+   /**
+    * The aliases
+    *
+    * @return the aliases or null if there are no aliases
+    */
+   Set<Object> getAliases();      
+
+   /**
+    * Get the mode
+    * 
+    * @return the mode
+    */
+   ControllerMode getMode();
+   
+   /**
+    * Set the name
+    * 
+    * @param mode the mode
+    */
+   void setMode(ControllerMode mode);
+
+   /**
+    * Set the annotations
+    *
+    * @param annotations the annotations
+    */
+   void setAnnotations(Set<AnnotationMetaData> annotations);
+
+   /**
+    * Get the properties.
+    * 
+    * @return List<PropertyMetaData>.
+    */
+   Set<PropertyMetaData> getProperties();
+
+   /**
+    * Get the bean ClassLoader
+    * 
+    * @return the ClassLoader metadata
+    */
+   ClassLoaderMetaData getClassLoader();
+
+   /**
+    * Set the bean ClassLoader
+    * 
+    * @param classLoader the ClassLoader metadata
+    */
+   void setClassLoader(ClassLoaderMetaData classLoader);
+
+   /**
+    * Get the constructor
+    * 
+    * @return the constructor metadata
+    */
+   ConstructorMetaData getConstructor();
+
+   /**
+    * Get the create lifecycle
+    * 
+    * @return the create lifecycle
+    */
+   LifecycleMetaData getCreate();
+
+   /**
+    * Get the start lifecycle
+    * 
+    * @return the start lifecycle
+    */
+   LifecycleMetaData getStart();
+
+   /**
+    * Get the stop lifecycle
+    * 
+    * @return the stop lifecycle
+    */
+   LifecycleMetaData getStop();
+
+   /**
+    * Get the destroy lifecycle
+    * 
+    * @return the destroy lifecycle
+    */
+   LifecycleMetaData getDestroy();
+   
+   /**
+    * Get what this bean demands.
+    * 
+    * @return Set<DemandMetaData>
+    */
+   Set<DemandMetaData> getDemands();
+
+   /**
+    * Get what this bean supplies.
+    * 
+    * @return Set<SupplyMetaData>
+    */
+   Set<SupplyMetaData> getSupplies();
+   
+   /**
+    * Get what this bean depends.
+    * 
+    * @return Set<DependencyMetaData>
+    */
+   Set<DependencyMetaData> getDepends();
+
+   /**
+    * Get the installation oeprations.
+    * 
+    * @return List<InstallMetaData>
+    */
+   List<InstallMetaData> getInstalls();
+
+   /**
+    * Get the uninstallation operations.
+    * 
+    * @return List<InstallMetaData>
+    */
+   List<InstallMetaData> getUninstalls();
+   
+   /**
+    * Get the installation oeprations.
+    *
+    * @return List<InstallMetaData>
+    */
+   List<CallbackMetaData> getInstallCallbacks();
+
+   /**
+    * Get the uninstallation operations.
+    *
+    * @return List<InstallMetaData>
+    */
+   List<CallbackMetaData> getUninstallCallbacks();
+
+   /**
+    * Get the lifecycle callbacks.
+    * 
+    * @return List<LifecycleCallbackMetaData>
+    */
+   List<LifecycleCallbackMetaData> getLifecycleCallbacks();
+   
+   /**
+    * Get the lifecycle callbacks for a particular state.
+    * 
+    * @param state the state callbacks refer to
+    * @return List<LifecycleCallbackMetaData>
+    */
+   List<LifecycleCallbackMetaData> getLifecycleCallbacks(ControllerState state);
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaDataFactory.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaDataFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/BeanMetaDataFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,42 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.util.List;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * BeanMetaDataFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public interface BeanMetaDataFactory extends JBossInterface
+{
+   /**
+    * Get the beans
+    * 
+    * @return a List<BeanMetaData>
+    */
+   public List<BeanMetaData> getBeans();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,65 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+/**
+ * Metadata about a callback method.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface CallbackMetaData extends LifecycleMetaData
+{
+   /**
+    * Get the cardinality.
+    *
+    * @return cardinality
+    */
+   Cardinality getCardinality();
+
+   /**
+    * Get the property name.
+    *
+    * @return the property name.
+    */
+   String getProperty();
+
+   /**
+    * Get the required state of the dependency
+    *
+    * @return the required state
+    */
+   ControllerState getDependentState();
+
+   /**
+    * Get the when required state
+    *
+    * @return the required state
+    */
+   ControllerState getWhenRequiredState();
+
+   /**
+    * Get signature.
+    *
+    * @return method / property parameter signature
+    */
+   String getSignature();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/Cardinality.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/Cardinality.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/Cardinality.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,225 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Cardinality def.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public class Cardinality extends JBossObject implements Serializable
+{
+   private static final long serialVersionUID = 2L;
+  
+   public static final int INFINITY = -1;
+
+   public static final Cardinality ZERO_TO_ONE = new Cardinality("0..1", 0, 1);
+   public static final Cardinality ZERO_TO_MANY = new Cardinality("0..n", 0, INFINITY);
+   public static final Cardinality ONE_TO_ONE = new Cardinality("1..1", 1, 1);
+   public static final Cardinality ONE_TO_MANY = new Cardinality("1..n", 1, INFINITY);
+
+   private static Cardinality[] values = new Cardinality[]
+         {
+               ZERO_TO_ONE,
+               ZERO_TO_MANY,
+               ONE_TO_ONE,
+               ONE_TO_MANY
+         };
+
+   private String type;
+   private int left;
+   private int right;
+
+   private Cardinality(String type, int left, int right)
+   {
+      this.type = type;
+      this.left = left;
+      this.right = right;
+   }
+
+   /**
+    * Is number in cardinality's range.
+    *
+    * @param number number to check
+    * @return left <= number <= right
+    */
+   public boolean isInRange(int number)
+   {
+      return (number < 0 || number < left || left == INFINITY) == false && (number <= right || right == INFINITY);
+   }
+
+   /**
+    * Get the cardinality by type.
+    *
+    * @param type the commont type
+    * @return cardinality by type
+    */
+   public static Cardinality toCardinality(String type)
+   {
+      for (Cardinality c : values)
+      {
+         if (c.getType().equals(type))
+         {
+            return c;
+         }
+      }
+      return fromString(type);
+   }
+
+   /**
+    * Get limit from string.
+    *
+    * @param limit from string
+    * @return limit as int from string
+    */
+   protected static int getLimitFromString(String limit)
+   {
+      try
+      {
+         return Integer.parseInt(limit);
+      }
+      catch (NumberFormatException e)
+      {
+         return INFINITY;
+      }
+   }
+
+   /**
+    * Get limit as string.
+    *
+    * @param limit right limit
+    * @return limit as string
+    */
+   protected static String getLimitFromInt(int limit)
+   {
+      return limit == INFINITY ? "n" : String.valueOf(limit);
+   }
+
+   /**
+    * Parse cardinality from string - #1..#2.
+    *
+    * @param string cardinality string
+    * @return cardinality
+    */
+   public static Cardinality fromString(String string)
+   {
+      if (string == null)
+         throw new IllegalArgumentException("Null string.");
+
+      if (string.contains(".."))
+      {
+         String[] args = string.split("\\.\\.");
+         if (args == null || args.length != 2)
+            throw new IllegalArgumentException("Illegal cardinality format: " + string);
+         return createCardinality(getLimitFromString(args[0]), getLimitFromString(args[1]));
+      }
+      else
+         return createUnlimitedCardinality(getLimitFromString(string));
+   }
+
+   /**
+    * Create cardinality which starts at #start and has no limit.
+    *
+    * @param start the left number of cardinality interval
+    * @return cardinality
+    */
+   public static Cardinality createUnlimitedCardinality(int start)
+   {
+      return createCardinality(start, INFINITY);
+   }
+
+   /**
+    * Create cardinality which ends at #end and starts at zero.
+    *
+    * @param end the right number of cardinality interval
+    * @return cardinality
+    */
+   public static Cardinality createLimitedCardinality(int end)
+   {
+      return createCardinality(0, end);
+   }
+
+   /**
+    * Create cardinality with [#left, #right] interval.
+    *
+    * @param left  left point in interval
+    * @param right right point in interval
+    * @return cardinality
+    */
+   public static Cardinality createCardinality(int left, int right)
+   {
+      return new Cardinality(getLimitFromInt(left) + ".." + getLimitFromInt(right), left, right);
+   }
+
+   protected int getHashCode()
+   {
+      return type.hashCode();
+   }
+
+   public void toShortString(JBossStringBuilder buffer)
+   {
+      buffer.append("type=").append(type);
+   }
+
+   protected void toString(JBossStringBuilder buffer)
+   {
+      buffer.append("type=").append(type);
+   }
+
+   public boolean equals(Object obj)
+   {
+      if (obj instanceof Cardinality == false)
+         return false;
+      Cardinality card = (Cardinality)obj;
+      return left == card.left && right == card.right; 
+   }
+
+   public String getType()
+   {
+      return type;
+   }
+
+   public int getLeft()
+   {
+      return left;
+   }
+
+   public int getRight()
+   {
+      return right;
+   }
+
+   public boolean isLeftInfinity()
+   {
+      return left <= INFINITY;
+   }
+
+   public boolean isRightInfinity()
+   {
+      return right <= INFINITY;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CardinalityValueAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CardinalityValueAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/CardinalityValueAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
+
+/**
+ * CardinalityValueAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class CardinalityValueAdapter implements ValueAdapter
+{
+   public Object cast(Object o, Class c)
+   {
+      return Cardinality.toCardinality((String) o);
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ClassLoaderMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ClassLoaderMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ClassLoaderMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about a classloader.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public interface ClassLoaderMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   /**
+    * Get the classloader
+    * 
+    * @return the classloader
+    */
+   ValueMetaData getClassLoader();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ConstructorMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ConstructorMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ConstructorMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,60 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+
+/**
+ * Metadata about construction.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59524 $
+ */
+public interface ConstructorMetaData extends ParameterizedMetaData, FeatureMetaData
+{
+   /**
+    * Get the value.
+    *
+    * @return the value.
+    */
+   ValueMetaData getValue();
+   
+   /**
+    * Get the factory.
+    *
+    * @return the factory.
+    */
+   ValueMetaData getFactory();
+
+   /**
+    * Get the factory class.
+    *
+    * @return the class name of the factory.
+    */
+   String getFactoryClass();
+   
+   /**
+    * Get the factory method.
+    *
+    * @return the factory method.
+    */
+   String getFactoryMethod();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerMode.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerMode.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerMode.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,112 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+import java.util.Map;
+import java.util.HashMap;
+import java.io.ObjectStreamException;
+import java.io.Serializable;
+
+/**
+ * Mode of the context.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59941 $
+ */
+public class ControllerMode extends JBossObject implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+   
+   /** Automatic */
+   public static final ControllerMode AUTOMATIC = new ControllerMode("Automatic");
+
+   /** On demand */
+   public static final ControllerMode ON_DEMAND = new ControllerMode("On Demand");
+
+   /** Manual */
+   public static final ControllerMode MANUAL = new ControllerMode("Manual");
+
+   /** Disabled */
+   public static final ControllerMode DISABLED = new ControllerMode("Disabled");
+
+   /** The mode string */
+   protected final String modeString;
+   
+   private static Map<String, ControllerMode> values = new HashMap<String, ControllerMode>();
+
+   static
+   {
+      values.put(AUTOMATIC.getModeString(), AUTOMATIC);
+      values.put(ON_DEMAND.getModeString(), ON_DEMAND);
+      values.put(MANUAL.getModeString(), MANUAL);
+      values.put(DISABLED.getModeString(), DISABLED);
+   }
+
+   /**
+    * Create a new mode
+    * 
+    * @param modeString the mode representation
+    */
+   public ControllerMode(String modeString)
+   {
+      if (modeString == null)
+         throw new IllegalArgumentException("Null mode string");
+      this.modeString = modeString;
+   }
+   
+   /**
+    * Get the mode string
+    * 
+    * @return the mdoe string
+    */
+   public String getModeString()
+   {
+      return modeString;
+   }
+   
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof ControllerMode == false)
+         return false;
+      ControllerMode other = (ControllerMode) object;
+      return modeString.equals(other.modeString);
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append(modeString);
+   }
+
+   protected int getHashCode()
+   {
+      return modeString.hashCode();
+   }
+
+   protected Object readResolve() throws ObjectStreamException
+   {
+      return values.get(modeString);   
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerModeValueAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerModeValueAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerModeValueAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
+
+/**
+ * ControllerModeValueAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ControllerModeValueAdapter implements ValueAdapter
+{
+   public Object cast(Object o, Class c)
+   {
+      return new ControllerMode((String) o);
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerState.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerState.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerState.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,131 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.ObjectStreamException;
+import java.io.Serializable;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Description of state.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60558 $
+ */
+public class ControllerState extends JBossObject implements Serializable
+{
+   private static final long serialVersionUID = 2L;
+
+   /** Error */
+   public static final ControllerState ERROR = new ControllerState("**ERROR**");
+
+   /** Not installed state */
+   public static final ControllerState NOT_INSTALLED = new ControllerState("Not Installed");
+
+   /** Pre install state */
+   public static final ControllerState PRE_INSTALL = new ControllerState("PreInstall");
+
+   /** Described state */
+   public static final ControllerState DESCRIBED = new ControllerState("Described");
+
+   /** Instantiated state */
+   public static final ControllerState INSTANTIATED = new ControllerState("Instantiated");
+
+   /** Configured state */
+   public static final ControllerState CONFIGURED = new ControllerState("Configured");
+
+   /** Create state */
+   public static final ControllerState CREATE = new ControllerState("Create");
+
+   /** Start state */
+   public static final ControllerState START = new ControllerState("Start");
+
+   /** Installed state */
+   public static final ControllerState INSTALLED = new ControllerState("Installed");
+
+   /** The state string */
+   protected final String stateString;
+
+   private static Map<String, ControllerState> values = new HashMap<String, ControllerState>();
+
+   static
+   {
+      values.put(ERROR.getStateString(), ERROR);
+      values.put(NOT_INSTALLED.getStateString(), NOT_INSTALLED);
+      values.put(PRE_INSTALL.getStateString(), PRE_INSTALL);
+      values.put(DESCRIBED.getStateString(), DESCRIBED);
+      values.put(INSTANTIATED.getStateString(), INSTANTIATED);
+      values.put(CONFIGURED.getStateString(), CONFIGURED);
+      values.put(CREATE.getStateString(), CREATE);
+      values.put(START.getStateString(), START);
+      values.put(INSTALLED.getStateString(), INSTALLED);
+   }
+
+   /**
+    * Create a new state
+    * 
+    * @param stateString the string representation
+    */
+   public ControllerState(String stateString)
+   {
+      if (stateString == null)
+         throw new IllegalArgumentException("Null state string");
+      this.stateString = stateString;
+   }
+   
+   /**
+    * Get the state string
+    * 
+    * @return the state string
+    */
+   public String getStateString()
+   {
+      return stateString;
+   }
+   
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof ControllerState == false)
+         return false;
+      ControllerState other = (ControllerState) object;
+      return stateString.equals(other.stateString);
+   }
+   
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append(stateString);
+   }
+
+   protected int getHashCode()
+   {
+      return stateString.hashCode();
+   }
+
+   protected Object readResolve() throws ObjectStreamException
+   {
+      return values.get(stateString);   
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerStateValueAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerStateValueAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ControllerStateValueAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import org.jboss.xb.binding.sunday.unmarshalling.ValueAdapter;
+
+/**
+ * ControllerStateValueAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class ControllerStateValueAdapter implements ValueAdapter
+{
+   public Object cast(Object o, Class c)
+   {
+      return new ControllerState((String) o);
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DemandMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DemandMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DemandMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,47 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about what a bean demands.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40756 $
+ */
+public interface DemandMetaData extends MetaDataVisitorNode, JBossInterface
+{
+   /**
+    * What is demanded
+    * 
+    * @return the demand
+    */
+   Object getDemand();
+   
+   /**
+    * Get when the dependency is required
+    * 
+    * @return when the dependency is required
+    */
+   ControllerState getWhenRequired();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DependencyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DependencyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/DependencyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about what a bean's dependency.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40756 $
+ */
+public interface DependencyMetaData extends MetaDataVisitorNode, JBossInterface
+{
+   /**
+    * What is the dependency
+    * 
+    * @return the dependency
+    */
+   Object getDependency();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/FeatureMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/FeatureMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/FeatureMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,49 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.util.Set;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * General MetaData
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 45764 $
+ */
+public interface FeatureMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   /**
+    * Get the descrition.
+    * 
+    * @return the description.
+    */
+   String getDescription();
+   
+   /**
+    * Get the annotations.
+    * 
+    * @return Set<AnnotationMetaData>.
+    */
+   Set<AnnotationMetaData> getAnnotations();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionOption.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionOption.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionOption.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,107 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Injection option:
+ *  * Strict - exactly one matching context (default)
+ *  * Callback - issue callback once context with matching is present
+ *
+ * @author <a href="mailto:ales.justin at genera-lynx.com">Ales Justin</a>
+ */
+public class InjectionOption extends JBossObject
+      implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** Strict */
+   public static final InjectionOption STRICT = new InjectionOption("Strict");
+
+   /** Loose */
+   public static final InjectionOption CALLBACK = new InjectionOption("Callback");
+
+   /** The type string */
+   protected final String optionString;
+
+   /**
+    * Create a new state
+    *
+    * @param optionString the string representation
+    */
+   private InjectionOption(String optionString)
+   {
+      if (optionString == null)
+         throw new IllegalArgumentException("Null option string");
+      this.optionString = optionString;
+   }
+
+   /**
+    * Return injection type.
+    * Or exception if no matching type.
+    *
+    * @param optionString type
+    * @return InjectionType instance
+    */
+   public static InjectionOption getInstance(String optionString)
+   {
+      if (STRICT.getOptionString().equalsIgnoreCase(optionString))
+         return STRICT;
+      else if (CALLBACK.getOptionString().equalsIgnoreCase(optionString))
+         return CALLBACK;
+      else
+         throw new IllegalArgumentException("No such option: " + optionString);
+   }
+
+   /**
+    * Get the state string
+    *
+    * @return the state string
+    */
+   public String getOptionString()
+   {
+      return optionString;
+   }
+
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof InjectionOption == false)
+         return false;
+      InjectionOption other = (InjectionOption) object;
+      return optionString.equals(other.getOptionString());
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append(optionString);
+   }
+
+   protected int getHashCode()
+   {
+      return optionString.hashCode();
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionType.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionType.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InjectionType.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,107 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.io.Serializable;
+
+import org.jboss.util.JBossObject;
+import org.jboss.util.JBossStringBuilder;
+
+/**
+ * Injection type:
+ *  * ByClass - matching the class type of value (default)
+ *  * ByName - matching the property name
+ *
+ * @author <a href="mailto:ales.justin at genera-lynx.com">Ales Justin</a>
+ */
+public class InjectionType extends JBossObject
+   implements Serializable
+{
+   private static final long serialVersionUID = 1L;
+
+   /** Strict */
+   public static final InjectionType BY_CLASS = new InjectionType("ByClass");
+
+   /** Loose */
+   public static final InjectionType BY_NAME = new InjectionType("ByName");
+
+   /** The type string */
+   protected final String typeString;
+
+   /**
+    * Create a new state
+    *
+    * @param typeString the string representation
+    */
+   private InjectionType(String typeString)
+   {
+      if (typeString == null)
+         throw new IllegalArgumentException("Null type string");
+      this.typeString = typeString;
+   }
+
+   /**
+    * Return injection type.
+    * Or exception if no matching type.
+    *
+    * @param typeString type
+    * @return InjectionType instance
+    */
+   public static InjectionType getInstance(String typeString)
+   {
+      if ("ByClass".equalsIgnoreCase(typeString))
+         return BY_CLASS;
+      else if ("ByName".equalsIgnoreCase(typeString))
+         return BY_NAME;
+      else
+         throw new IllegalArgumentException("No such type: " + typeString);
+   }
+
+   /**
+    * Get the state string
+    *
+    * @return the state string
+    */
+   public String getTypeString()
+   {
+      return typeString;
+   }
+
+   public boolean equals(Object object)
+   {
+      if (object == null || object instanceof InjectionType == false)
+         return false;
+      InjectionType other = (InjectionType) object;
+      return typeString.equals(other.getTypeString());
+   }
+
+   public void toString(JBossStringBuilder buffer)
+   {
+      buffer.append(typeString);
+   }
+
+   protected int getHashCode()
+   {
+      return typeString.hashCode();
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallCallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallCallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallCallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Metadata for install callback.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+ at XmlType
+public class InstallCallbackMetaData extends AbstractCallbackMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = -8687489846562385403L;
+
+   public InstallCallbackMetaData()
+   {
+      super();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/InstallMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,45 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+/**
+ * Metadata about an installation method.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40727 $
+ */
+public interface InstallMetaData extends LifecycleMetaData
+{
+   /**
+    * Get the bean name.
+    *
+    * @return the bean name.
+    */
+   String getBean();
+   
+   /**
+    * Get the required state of the dependency
+    * 
+    * @return the required state or null if it must be in the registry
+    */
+   ControllerState getDependentState();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/KernelDeployment.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/KernelDeployment.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/KernelDeployment.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,99 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * A kernel deployment.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60491 $
+ */
+public interface KernelDeployment extends JBossInterface
+{
+   /**
+    * Get the name of the deployment
+    *
+    * @return the name
+    */
+   String getName();
+   
+   /**
+    * Set the name of the deployment
+    *
+    * @param name the name
+    */
+   void setName(String name);
+   
+   /**
+    * Whether the deployment is installed
+    *
+    * @return true when installed
+    */
+   boolean isInstalled();
+   
+   /**
+    * Set the intalled state
+    *
+    * @param installed true when installed
+    */
+   void setInstalled(boolean installed);
+
+   /**
+    * Is deployment scoped
+    *
+    * @return true if scoped, false if isolated, null by default
+    */
+   Boolean isScoped();
+
+   /**
+    * Get the deployment annotations.
+    *
+    * @return the annotations
+    */
+   Set<AnnotationMetaData> getAnnotations();
+
+   /**
+    * Get the classloader for this deployment
+    *
+    * @return the classloader 
+    */
+   ClassLoaderMetaData getClassLoader();
+   
+   /**
+    * Get the beans in the deployment
+    *
+    * @return List<BeanMetaData> 
+    */
+   List<BeanMetaData> getBeans();
+   
+   /**
+    * Get the bean factories in the deployment
+    *
+    * @return List<BeanMetaDataFactory> 
+    */
+   List<BeanMetaDataFactory> getBeanFactories();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleCallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleCallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleCallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,65 @@
+/*
+* 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.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about lifecycle callbacks
+ * 
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 1.1 $
+ */
+public interface LifecycleCallbackMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   /**
+    * Get the target state of the bean this callback applies to indicating when this callback should trigger
+    * @return the state 
+    */
+   ControllerState getWhenRequired();
+   
+   /**
+    * The required state of the lifecycle callback bean
+    * @return the dependant state
+    */
+   ControllerState getDependentState();
+   
+   /**
+    * Get the bean this callback should be made on
+    * @return the state 
+    */
+   String getBean();
+
+   /**
+    * Get the method on the bean that should be called when reaching the required state on installation
+    * @return name of the install method
+    */
+   public String getInstallMethod();
+
+
+   /**
+    * Get the method on the bean that should be called when reaching the required state on uninstallation
+    * @return name of the uninstall method
+    */
+   public String getUninstallMethod();
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/LifecycleMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,59 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+/**
+ * Metadata about a lifecycle method.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 63037 $
+ */
+public interface LifecycleMetaData extends ParameterizedMetaData, FeatureMetaData
+{
+   /**
+    * Get the state
+    * 
+    * @return the state
+    */
+   ControllerState getState();
+   
+   /**
+    * Set the state
+    * 
+    * @param state the state
+    */
+   void setState(ControllerState state);
+   
+   /**
+    * Get the method name.
+    *
+    * @return the method name.
+    */
+   String getMethodName();
+
+   /**
+    * Is default ignored.
+    *
+    * @return should we ignore default
+    */
+   boolean isIgnored();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MapEntry.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MapEntry.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MapEntry.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,61 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+
+
+/**
+ * MapEntry.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(propOrder= {"key", "value"})
+public class MapEntry
+{
+   /** The key */
+   private ValueMetaData key;
+   
+   /** The value */
+   private ValueMetaData value;
+
+   public ValueMetaData getKey()
+   {
+      return key;
+   }
+
+   public void setKey(ValueMetaData key)
+   {
+      this.key = key;
+   }
+
+   public ValueMetaData getValue()
+   {
+      return value;
+   }
+
+   public void setValue(ValueMetaData value)
+   {
+      this.value = value;
+   }
+}
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MetaDataVisitorNode.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MetaDataVisitorNode.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MetaDataVisitorNode.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,32 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+/**
+ * A metadata vistor node.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56022 $
+ */
+public interface MetaDataVisitorNode
+{
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MutableParameterizedMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MutableParameterizedMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/MutableParameterizedMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.util.List;
+
+/**
+ * MutableParameterizedMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface MutableParameterizedMetaData extends ParameterizedMetaData
+{
+   /**
+    * Set the parameters.
+    *
+    * @param parameters the parameters
+    */
+   void setParameters(List<ParameterMetaData> parameters);
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,53 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+/**
+ * Metadata about a parameter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59990 $
+ */
+public interface ParameterMetaData extends FeatureMetaData
+{
+   /**
+    * Get the type.
+    * 
+    * @return the type.
+    */
+   String getType();
+   
+   /**
+    * Get the value.
+    * 
+    * @return the value.
+    */
+   ValueMetaData getValue();
+
+   /**
+    * Get the index
+    *
+    * @return index in list
+    */
+   int getIndex();
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterizedMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterizedMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ParameterizedMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import java.util.List;
+
+/**
+ * ParameterizedMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public interface ParameterizedMetaData
+{
+   /**
+    * Get the parameters.
+    *
+    * @return List<ParameterMetaData>.
+    */
+   List<ParameterMetaData> getParameters();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/PropertyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/PropertyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/PropertyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+/**
+ * Metadata about a property.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59176 $
+ */
+public interface PropertyMetaData extends FeatureMetaData
+{
+   /**
+    * Get the name.
+    * 
+    * @return the name.
+    */
+   String getName();
+
+   /**
+    * Get property type if possible.
+    *
+    * @return class type if set, otherwise null
+    */
+   String getType();
+
+   /**
+    * Get the value.
+    * 
+    * @return the value.
+    */
+   ValueMetaData getValue();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/StringValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/StringValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/StringValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,103 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+import javax.xml.bind.annotation.XmlValue;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * String value.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59990 $
+ */
+ at XmlType
+ at JBossXmlNoElements
+public class StringValueMetaData extends AbstractTypeMetaData
+{
+   private static final long serialVersionUID = 1L;
+
+   /**
+    * Do we replace String with System property,
+    * by default it is true.
+    */
+   private boolean replace = true;
+
+   /**
+    * Create a new string value
+    */
+   public StringValueMetaData()
+   {
+   }
+
+   /**
+    * Create a new string value
+    * 
+    * @param value the value
+    */
+   public StringValueMetaData(String value)
+   {
+      super(value);
+   }
+
+   @Override
+   public String getValue()
+   {
+      return (String) super.getValue();
+   }
+
+   /**
+    * Set the value
+    * 
+    * @param value the value
+    */
+   @XmlValue
+   public void setValue(String value)
+   {
+      super.setValue(value);
+   }
+
+   public void setValue(Object value)
+   {
+      if (value != null && value instanceof String == false)
+         throw new ClassCastException("value is not a String: " + value);
+      super.setValue(value);
+   }
+
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+
+   public boolean isReplace()
+   {
+      return replace;
+   }
+
+   public void setReplace(boolean replace)
+   {
+      this.replace = replace;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/SupplyMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/SupplyMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/SupplyMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.util.JBossInterface;
+
+/**
+ * Metadata about what a bean demands.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public interface SupplyMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   /**
+    * Get what is supplied
+    * 
+    * @return the supply
+    */
+   Object getSupply();
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ThisValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ThisValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ThisValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,52 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.xb.annotations.JBossXmlNoElements;
+
+/**
+ * Dependency value.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60562 $
+ */
+ at XmlType
+ at JBossXmlNoElements
+public class ThisValueMetaData extends AbstractValueMetaData
+{
+   private static final long serialVersionUID = 2L;
+
+   /**
+    * Create a new dependency value
+    */
+   public ThisValueMetaData()
+   {
+   }
+   
+   public Object getValue(TypeInfo info, ClassLoader cl) throws Throwable
+   {
+      return null;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/UninstallCallbackMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/UninstallCallbackMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/UninstallCallbackMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+import javax.xml.bind.annotation.XmlType;
+
+/**
+ * Metadata for uninstall callback.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+ at XmlType
+public class UninstallCallbackMetaData extends AbstractCallbackMetaData
+{
+   /** The serialVersionUID */
+   private static final long serialVersionUID = 1888688138196290492L;
+
+   public UninstallCallbackMetaData()
+   {
+      super();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2005, 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.xb.builder.object.mc.support.model;
+
+import org.jboss.reflect.spi.TypeInfo;
+import org.jboss.util.JBossInterface;
+import org.jboss.xb.annotations.JBossXmlChild;
+import org.jboss.xb.annotations.JBossXmlGroup;
+import org.jboss.xb.annotations.JBossXmlGroupText;
+import org.jboss.xb.annotations.JBossXmlGroupWildcard;
+
+/**
+ * Metadata about a value.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 38049 $
+ */
+ at JBossXmlGroup
+({
+   @JBossXmlChild(name="array", type=AbstractArrayMetaData.class),
+   @JBossXmlChild(name="collection", type=AbstractCollectionMetaData.class),
+   @JBossXmlChild(name="inject", type=AbstractDependencyValueMetaData.class),
+   @JBossXmlChild(name="list", type=AbstractListMetaData.class),
+   @JBossXmlChild(name="map", type=AbstractMapMetaData.class),
+   @JBossXmlChild(name="null", type=AbstractValueMetaData.class),
+   @JBossXmlChild(name="set", type=AbstractSetMetaData.class),
+   @JBossXmlChild(name="this", type=ThisValueMetaData.class),
+   @JBossXmlChild(name="value", type=StringValueMetaData.class),
+})
+ at JBossXmlGroupText(wrapper=StringValueMetaData.class, property="value")
+ at JBossXmlGroupWildcard(wrapper=AbstractValueMetaData.class, property="value")
+public interface ValueMetaData extends JBossInterface, MetaDataVisitorNode
+{
+   /**
+    * Get the underlying value
+    * 
+    * @return the underlying value
+    */
+   public Object getUnderlyingValue();
+   
+   /**
+    * Get the value.
+    * 
+    * @param info the type info
+    * @param cl the classloader
+    * @return the value.
+    * @throws Throwable for any error
+    */
+   Object getValue(TypeInfo info, ClassLoader cl) throws Throwable;
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaDataAware.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaDataAware.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/ValueMetaDataAware.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,45 @@
+/*
+* 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.xb.builder.object.mc.support.model;
+
+
+/**
+ * Simple ValueMetaData aware.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface ValueMetaDataAware
+{
+   /**
+    * Get the value.
+    *
+    * @return the value.
+    */
+   ValueMetaData getValue();
+
+   /**
+    * Set the value.
+    *
+    * @param value the value
+    */
+   void setValue(ValueMetaData value);
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/BeanFactory.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/BeanFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/BeanFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,38 @@
+/*
+* 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.xb.builder.object.mc.support.model.factory;
+
+/**
+ * Bean factory interface.
+ *
+ * @author <a href="mailto:ales.justin at jboss.com">Ales Justin</a>
+ */
+public interface BeanFactory
+{
+   /**
+    * Create bean.
+    *
+    * @return bean 
+    * @throws Throwable for any error
+    */
+   Object createBean() throws Throwable;
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/GenericBeanFactoryMetaData.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/GenericBeanFactoryMetaData.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/GenericBeanFactoryMetaData.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,343 @@
+/*
+* 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.xb.builder.object.mc.support.model.factory;
+
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+import javax.xml.bind.annotation.XmlAttribute;
+import javax.xml.bind.annotation.XmlElement;
+import javax.xml.bind.annotation.XmlNsForm;
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractAnnotationMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractClassLoaderMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractConstructorMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDemandMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDependencyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractInstallMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractLifecycleMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractMapMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractPropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractSupplyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AnnotationMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaDataFactory;
+import org.jboss.test.xb.builder.object.mc.support.model.CallbackMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ClassLoaderMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerMode;
+import org.jboss.test.xb.builder.object.mc.support.model.DemandMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.DependencyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.InstallCallbackMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.InstallMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.LifecycleMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.SupplyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.UninstallCallbackMetaData;
+import org.jboss.util.JBossObject;
+import org.jboss.xb.annotations.JBossXmlSchema;
+
+/**
+ * GenericBeanFactoryMetaData.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 59429 $
+ */
+ at JBossXmlSchema(namespace="urn:jboss:bean-deployer:2.0", elementFormDefault=XmlNsForm.QUALIFIED)
+ at XmlRootElement(name="beanfactory")
+ at XmlType(propOrder={"aliases", "annotations", "classLoader", "constructor", "properties", "create", "start", "depends", "demands", "supplies", "installs", "uninstalls", "installCallbacks", "uninstallCallbacks"})
+public class GenericBeanFactoryMetaData extends JBossObject implements BeanMetaDataFactory
+{
+   private static final long serialVersionUID = 1L;
+   
+   /** The name */
+   protected String name;
+   
+   /** The bean class name */
+   protected String bean;
+
+   /** The controller mode */
+   protected ControllerMode mode;
+
+   /** The annotations */
+   protected Set<AnnotationMetaData> annotations;
+   
+   /** The aliases */
+   protected Set<Object> aliases;
+
+   /** The classloader */
+   protected ClassLoaderMetaData classLoader;
+   
+   /** The constructor metadata */
+   protected ConstructorMetaData constructor;
+   
+   /** The properties Map<propertyName, ValueMetaData> */
+   protected Set<PropertyMetaData> properties;
+
+   /** The create lifecycle method */
+   protected LifecycleMetaData create;
+
+   /** The start lifecycle method */
+   protected LifecycleMetaData start;
+
+   protected Set<DependencyMetaData> depends;
+
+   protected Set<DemandMetaData> demands;
+   
+   protected Set<SupplyMetaData> supplies;
+   
+   protected List<InstallMetaData> installs;
+   
+   protected List<InstallMetaData> uninstalls;
+   
+   protected List<CallbackMetaData> installCallbacks;
+   
+   protected List<CallbackMetaData> uninstallCallbacks;
+   
+   public String getName()
+   {
+      return name;
+   }
+
+   @XmlAttribute
+   public void setName(String name)
+   {
+      this.name = name;
+   }
+
+   public String getBean()
+   {
+      return bean;
+   }
+
+   @XmlAttribute(name="class")
+   public void setBean(String bean)
+   {
+      this.bean = bean;
+   }
+
+   public Set<Object> getAliases()
+   {
+      return aliases;
+   }
+
+   @XmlElement(name="alias", type=String.class)
+   public void setAliases(Set<Object> aliases)
+   {
+      this.aliases = aliases;
+   }
+
+   public ControllerMode getMode()
+   {
+      return mode;
+   }
+
+   @XmlAttribute
+   public void setMode(ControllerMode mode)
+   {
+      this.mode = mode;
+   }
+
+   public Set<AnnotationMetaData> getAnnotations()
+   {
+      return annotations;
+   }
+
+   @XmlElement(name="annotation", type=AbstractAnnotationMetaData.class)
+   public void setAnnotations(Set<AnnotationMetaData> annotations)
+   {
+      this.annotations = annotations;
+   }
+
+   public ClassLoaderMetaData getClassLoader()
+   {
+      return classLoader;
+   }
+
+   @XmlElement(name="classloader", type=AbstractClassLoaderMetaData.class)
+   public void setClassLoader(ClassLoaderMetaData classLoader)
+   {
+      this.classLoader = classLoader;
+   }
+
+   public ConstructorMetaData getConstructor()
+   {
+      return constructor;
+   }
+
+   @XmlElement(name="constructor", type=AbstractConstructorMetaData.class)
+   public void setConstructor(ConstructorMetaData constructor)
+   {
+      this.constructor = constructor;
+   }
+
+   public LifecycleMetaData getCreate()
+   {
+      return create;
+   }
+
+   @XmlElement(name="create", type=AbstractLifecycleMetaData.class)
+   public void setCreate(LifecycleMetaData create)
+   {
+      this.create = create;
+   }
+
+   public Set<PropertyMetaData> getProperties()
+   {
+      return properties;
+   }
+
+   @XmlElement(name="property", type=AbstractPropertyMetaData.class)
+   public void setProperties(Set<PropertyMetaData> properties)
+   {
+      this.properties = properties;
+   }
+
+   public LifecycleMetaData getStart()
+   {
+      return start;
+   }
+
+   @XmlElement(name="start", type=AbstractLifecycleMetaData.class)
+   public void setStart(LifecycleMetaData start)
+   {
+      this.start = start;
+   }
+
+   @XmlElement(name="demand", type=AbstractDemandMetaData.class)
+   public Set<DemandMetaData> getDemands()
+   {
+      return demands;
+   }
+
+   public void setDemands(Set<DemandMetaData> demands)
+   {
+      this.demands = demands;
+   }
+
+   public Set<DependencyMetaData> getDepends()
+   {
+      return depends;
+   }
+
+   @XmlElement(name="depends", type=AbstractDependencyMetaData.class)
+   public void setDepends(Set<DependencyMetaData> depends)
+   {
+      this.depends = depends;
+   }
+
+   public List<CallbackMetaData> getInstallCallbacks()
+   {
+      return installCallbacks;
+   }
+
+   @XmlElement(name="incallback", type=InstallCallbackMetaData.class)
+   public void setInstallCallbacks(List<CallbackMetaData> installCallbacks)
+   {
+      this.installCallbacks = installCallbacks;
+   }
+
+   public List<InstallMetaData> getInstalls()
+   {
+      return installs;
+   }
+
+   @XmlElement(name="install", type=AbstractInstallMetaData.class)
+   public void setInstalls(List<InstallMetaData> installs)
+   {
+      this.installs = installs;
+   }
+
+   public Set<SupplyMetaData> getSupplies()
+   {
+      return supplies;
+   }
+
+   @XmlElement(name="supply", type=AbstractSupplyMetaData.class)
+   public void setSupplies(Set<SupplyMetaData> supplies)
+   {
+      this.supplies = supplies;
+   }
+
+   public List<CallbackMetaData> getUninstallCallbacks()
+   {
+      return uninstallCallbacks;
+   }
+
+   @XmlElement(name="uncallback", type=UninstallCallbackMetaData.class)
+   public void setUninstallCallbacks(List<CallbackMetaData> uninstallCallbacks)
+   {
+      this.uninstallCallbacks = uninstallCallbacks;
+   }
+
+   public List<InstallMetaData> getUninstalls()
+   {
+      return uninstalls;
+   }
+
+   @XmlElement(name="uninstall", type=AbstractInstallMetaData.class)
+   public void setUninstalls(List<InstallMetaData> uninstalls)
+   {
+      this.uninstalls = uninstalls;
+   }
+
+   public List<BeanMetaData> getBeans()
+   {
+      AbstractBeanMetaData gbf = new AbstractBeanMetaData();
+      gbf.setName(name);
+      gbf.setAliases(aliases);
+      gbf.setBean("GenericBeanFactory");
+      gbf.setMode(mode);
+      Set<PropertyMetaData> properties = new HashSet<PropertyMetaData>();
+      gbf.setProperties(properties);
+      properties.add(createProperty("bean", bean));
+      properties.add(createProperty("classLoader", classLoader));
+      properties.add(createProperty("constructor", constructor));
+      properties.add(createMapProperty("properties", properties));
+      properties.add(createProperty("start", start));
+      properties.add(createProperty("create", create));
+      // etc.
+      return Collections.singletonList((BeanMetaData) gbf);
+   }
+   
+   protected PropertyMetaData createProperty(String name, Object value)
+   {
+      return new AbstractPropertyMetaData(name, value);
+   }
+   
+   protected PropertyMetaData createMapProperty(String name, Set<PropertyMetaData> properties)
+   {
+      AbstractMapMetaData map = new AbstractMapMetaData();
+      if (properties != null)
+      {
+         for (PropertyMetaData property : properties)
+            map.put(new AbstractValueMetaData(property.getName()), new AbstractValueMetaData(property));
+      }
+      return new AbstractPropertyMetaData(name, map);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/package.html
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/package.html	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/factory/package.html	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+  <head>
+    <!-- $Id: package.html 33981 2005-07-25 19:23:48Z adrian $ -->
+    <!--
+
+    JBoss: The OpenSource J2EE WebOS 
+
+    Distributable under LGPL license.
+    See terms of license at gnu.org.
+
+    -->
+  </head>
+
+  <body bgcolor="white">
+    <p>Classes used to dynamically create beans.
+
+    <h2>Package Specification</h2>
+    <ul>
+      <li><a href="javascript: alert('not available')">Not Available</a>
+    </ul>
+      
+    <h2>Related Documentation</h2>
+    <ul>
+      <li><a href="javascript: alert('not available')">Not Available</a>
+    </ul>
+
+    <h2>Package Status</h2>
+    <ul>
+      <li><font color="red"><b>ALPHA</b></font>
+    </ul>
+
+    <h2>Todo</h2>
+    <ul>
+      <li>???
+    </ul>
+
+    <!-- Put @see and @since tags down here. -->
+
+  </body>
+</html>

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/package-info.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/package-info.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/support/model/package-info.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,32 @@
+/*
+* 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.
+*/
+ at JBossXmlAdaptedTypes
+({
+   @JBossXmlAdaptedType(type=Cardinality.class, valueAdapter=CardinalityValueAdapter.class),
+   @JBossXmlAdaptedType(type=ControllerMode.class, valueAdapter=ControllerModeValueAdapter.class),
+   @JBossXmlAdaptedType(type=ControllerState.class, valueAdapter=ControllerStateValueAdapter.class),
+})
+package org.jboss.test.xb.builder.object.mc.support.model;
+
+import org.jboss.xb.annotations.JBossXmlAdaptedType;
+import org.jboss.xb.annotations.JBossXmlAdaptedTypes;
+

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AbstractMCTest.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AbstractMCTest.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AbstractMCTest.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,284 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.net.URL;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Set;
+
+import org.jboss.test.xb.builder.AbstractBuilderTest;
+import org.jboss.test.xb.builder.object.javabean.support.model.JavaBean;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractArrayMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractCollectionMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDependencyValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractKernelDeployment;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractListMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractMapMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractSetMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AnnotationMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.CallbackMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.DemandMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.DependencyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.InstallMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ParameterMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.StringValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.SupplyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ThisValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.factory.GenericBeanFactoryMetaData;
+import org.jboss.xb.binding.JBossXBException;
+
+/**
+ * AbstractMCTest.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AbstractMCTest extends AbstractBuilderTest
+{
+   public AbstractMCTest(String name)
+   {
+      super(name);
+   }
+
+   protected AbstractKernelDeployment unmarshalDeployment() throws Exception
+   {
+      return unmarshalObject(AbstractKernelDeployment.class, AbstractKernelDeployment.class, JavaBean.class);
+   }
+
+   protected AbstractBeanMetaData unmarshalBean() throws Exception
+   {
+      return unmarshalObject(AbstractBeanMetaData.class, AbstractKernelDeployment.class, JavaBean.class);
+   }
+
+   protected GenericBeanFactoryMetaData unmarshalBeanFactory() throws Exception
+   {
+      return unmarshalObject(GenericBeanFactoryMetaData.class, AbstractKernelDeployment.class, JavaBean.class);
+   }
+   
+   protected void assertAnnotations(Set<String> expected, Set<AnnotationMetaData> annotations)
+   {
+      assertNotNull(annotations);
+      assertEquals(expected.size(), annotations.size());
+      HashSet<String> clonedExpected = new HashSet<String>(expected);
+      for (Iterator i = annotations.iterator(); i.hasNext();)
+      {
+         AnnotationMetaData annotation = (AnnotationMetaData) i.next();
+         if (clonedExpected.remove(annotation.getAnnotationInstance().annotationType().getName()) == false)
+            fail("Did not expect " + annotation + " expected " + expected);
+      }
+      if (clonedExpected.size() != 0)
+         fail("Expected " + expected + " got " + annotations);
+   }
+   
+   protected void assertProperties(Set<String> expected, Set<PropertyMetaData> properties)
+   {
+      assertNotNull(properties);
+      assertEquals(expected.size(), properties.size());
+      HashSet<String> clonedExpected = new HashSet<String>(expected);
+      for (Iterator i = properties.iterator(); i.hasNext();)
+      {
+         PropertyMetaData property = (PropertyMetaData) i.next();
+         if (clonedExpected.remove(property.getName()) == false)
+            fail("Did not expect " + property + " expected " + expected);
+      }
+      if (clonedExpected.size() != 0)
+         fail("Expected " + expected + " got " + properties);
+   }
+   
+   protected void assertDepends(Set<String> expected, Set<DependencyMetaData> depends)
+   {
+      assertNotNull(depends);
+      assertEquals(expected.size(), depends.size());
+      HashSet<String> clonedExpected = new HashSet<String>(expected);
+      for (DependencyMetaData depend : depends)
+      {
+         if (clonedExpected.remove(depend.getDependency()) == false)
+            fail("Did not expect " + depend + " expected " + expected);
+      }
+      if (clonedExpected.size() != 0)
+         fail("Expected " + expected + " got " + depends);
+   }
+   
+   protected void assertDemands(Set<String> expected, Set<DemandMetaData> demands)
+   {
+      assertNotNull(demands);
+      assertEquals(expected.size(), demands.size());
+      HashSet<String> clonedExpected = new HashSet<String>(expected);
+      for (DemandMetaData demand : demands)
+      {
+         if (clonedExpected.remove(demand.getDemand()) == false)
+            fail("Did not expect " + demand + " expected " + expected);
+      }
+      if (clonedExpected.size() != 0)
+         fail("Expected " + expected + " got " + demands);
+   }
+   
+   protected void assertSupplies(Set<String> expected, Set<SupplyMetaData> supplies)
+   {
+      assertNotNull(supplies);
+      assertEquals(expected.size(), supplies.size());
+      HashSet<String> clonedExpected = new HashSet<String>(expected);
+      for (Iterator i = supplies.iterator(); i.hasNext();)
+      {
+         SupplyMetaData supply = (SupplyMetaData) i.next();
+         if (clonedExpected.remove(supply.getSupply()) == false)
+            fail("Did not expect " + supply + " expected " + expected);
+      }
+      if (clonedExpected.size() != 0)
+         fail("Expected " + expected + " got " + supplies);
+   }
+   
+   protected void assertInstalls(List expected, List installs)
+   {
+      assertNotNull(installs);
+      assertEquals(expected.size(), installs.size());
+      for (int i = 0; i < expected.size(); ++i)
+      {
+         InstallMetaData install = (InstallMetaData) installs.get(i);
+         String method = (String) expected.get(i);
+         assertEquals(method, install.getMethodName());
+      }
+   }
+   
+   protected void assertCallbacks(List expected, List callbacks)
+   {
+      assertNotNull(callbacks);
+      assertEquals(expected.size(), callbacks.size());
+      for (int i = 0; i < expected.size(); ++i)
+      {
+         CallbackMetaData callback = (CallbackMetaData) callbacks.get(i);
+         String method = (String) expected.get(i);
+         assertEquals(method, callback.getMethodName());
+      }
+   }
+
+   protected void assertParameters(List expected, List parameters)
+   {
+      assertNotNull(parameters);
+      assertEquals(expected.size(), parameters.size());
+      for (int i = 0; i < expected.size(); ++i)
+      {
+         ParameterMetaData parameter = (ParameterMetaData) parameters.get(i);
+         String method = (String) expected.get(i);
+         assertEquals(method, parameter.getType());
+      }
+   }
+   
+   protected void assertPlainValue(String expected, ValueMetaData valueMetaData)
+   {
+      assertValue(expected, valueMetaData);
+   }
+   
+   protected void assertValue(String expected, ValueMetaData valueMetaData)
+   {
+      assertNotNull(valueMetaData);
+      assertTrue(valueMetaData instanceof StringValueMetaData);
+      Object value = valueMetaData.getUnderlyingValue();
+      assertEquals(expected, value);
+   }
+   
+   protected void assertInjection(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractDependencyValueMetaData);
+   }
+   
+   protected void assertNullValue(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractValueMetaData);
+      assertNull(value.getUnderlyingValue());
+   }
+   
+   protected void assertWildcard(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertEquals(AbstractValueMetaData.class, value.getClass());
+      Object wildcard = value.getUnderlyingValue();
+      assertNotNull(wildcard);
+   }
+   
+   protected void assertCollection(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractCollectionMetaData);
+   }
+   
+   protected void assertList(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractListMetaData);
+   }
+   
+   protected void assertSet(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractSetMetaData);
+   }
+   
+   protected void assertArray(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractArrayMetaData);
+   }
+   
+   protected void assertMap(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof AbstractMapMetaData);
+   }
+   
+   protected void assertThis(ValueMetaData value)
+   {
+      assertNotNull(value);
+      assertTrue(value instanceof ThisValueMetaData);
+   }
+   
+   protected void checkJBossXBException(Class expected, Throwable throwable)
+   {
+      checkThrowable(JBossXBException.class, throwable);
+      JBossXBException e = (JBossXBException) throwable;
+      checkThrowable(expected, e.getCause());
+   }
+
+   /**
+    * Find the xml
+    * 
+    * @param name the name
+    * @return the url of the xml
+    */
+   protected String findXML(String name)
+   {
+      name = getName().substring(4) + ".xml";
+      
+      URL url = getClass().getResource(name);
+      if (url == null)
+         fail(name + " not found");
+      return url.toString();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AliasTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AliasTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AliasTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,125 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.factory.GenericBeanFactoryMetaData;
+
+/**
+ * AliasTestCase.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class AliasTestCase extends AbstractMCTest
+{
+   public AliasTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(AliasTestCase.class);
+   }
+
+   protected Object getAlias() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set aliases = bean.getAliases();
+      assertNotNull(aliases);
+      assertEquals(1, aliases.size());
+      Object alias = aliases.iterator().next();
+      assertNotNull(alias);
+      return alias;
+   }
+
+   public void testAlias() throws Exception
+   {
+      Object alias = getAlias();
+      assertEquals("SimpleAlias", alias);
+   }
+
+   /* TODO
+   public void testAliasWithClass() throws Exception
+   {
+      Object alias = getAlias();
+      assertEquals(12345, alias);
+   } */
+
+   /* TODO
+   public void testAliasWithReplace() throws Exception
+   {
+      SecurityManager sm = suspendSecurity();
+      try
+      {
+         System.setProperty("alias.test.name", "SimpleAlias");
+         Object alias = getAlias("AliasWithReplace.xml");
+         assertEquals("XSimpleAliasX", alias);
+      }
+      finally
+      {
+         resumeSecurity(sm);
+      }
+   }
+   */
+
+   /* TODO
+   public void testAliasWithNoReplace() throws Exception
+   {
+      SecurityManager sm = suspendSecurity();
+      try
+      {
+         System.setProperty("alias.test.name", "SimpleAlias");
+         Object alias = getAlias("AliasWithNoReplace.xml");
+         assertEquals("X${alias.test.name}X", alias);
+      }
+      finally
+      {
+         resumeSecurity(sm);
+      }
+   }
+   */
+
+   public void testMultipleAlias() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set aliases = bean.getAliases();
+      assertNotNull(aliases);
+      int size = aliases.size();
+      assertTrue(size > 1);
+      for(Object alias : aliases)
+         assertNotNull(alias);
+   }
+
+   public void testAliasWithBeanFactory() throws Exception
+   {
+      GenericBeanFactoryMetaData bean = unmarshalBeanFactory();
+      Set aliases = bean.getAliases();
+      assertNotNull(aliases);
+      assertFalse(aliases.isEmpty());
+   }
+
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AnnotationTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AnnotationTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/AnnotationTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,144 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.AnnotationWithAttribute;
+import org.jboss.test.xb.builder.object.mc.support.AnnotationWithAttributes;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractAnnotationMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData;
+
+/**
+ * AnnotationTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 55527 $
+ */
+public class AnnotationTestCase extends AbstractMCTest
+{
+   protected AbstractAnnotationMetaData getAnnotation() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      ConstructorMetaData constructor = bean.getConstructor();
+      assertNotNull(constructor);
+      Set annotations = constructor.getAnnotations();
+      assertEquals(1, annotations.size());
+      AbstractAnnotationMetaData annotation = (AbstractAnnotationMetaData) annotations.iterator().next();
+      assertNotNull(annotation);
+      return annotation;
+   }
+   
+   public void testAnnotationSimple() throws Exception
+   {
+      AbstractAnnotationMetaData annotation = getAnnotation();
+      Annotation ann = annotation.getAnnotationInstance();
+      assertEquals(Annotation1.class.getName(), ann.annotationType().getName());
+      assertTrue(ann instanceof Annotation1);
+   }
+   
+   public void testAnnotationWithAttribute() throws Exception
+   {
+      AbstractAnnotationMetaData annotation = getAnnotation();
+      Annotation ann = annotation.getAnnotationInstance();
+      assertEquals(AnnotationWithAttribute.class.getName(), ann.annotationType().getName());
+      assertTrue(ann instanceof AnnotationWithAttribute);
+      AnnotationWithAttribute ann1 = (AnnotationWithAttribute)ann;
+      assertNotNull(ann1.attribute());
+      assertEquals(Long.class, ann1.attribute());
+   }
+   
+   public void testAnnotationWithAttributes() throws Exception
+   {
+      AbstractAnnotationMetaData annotation = getAnnotation();
+      Annotation ann = annotation.getAnnotationInstance();
+      assertEquals(AnnotationWithAttributes.class.getName(), ann.annotationType().getName());
+      assertTrue(ann instanceof AnnotationWithAttributes);
+      AnnotationWithAttributes ann1 = (AnnotationWithAttributes)ann;
+      assertNotNull(ann1.clazz());
+      assertEquals(Integer.class, ann1.clazz());
+      assertNotNull(ann1.integer());
+      assertEquals(100, ann1.integer());
+      assertNotNull(ann1.str());
+      assertEquals("Annotations are nice", ann1.str());
+   }
+
+   /* TODO
+   public void testAnnotationBadNoContent() throws Exception
+   {
+      try
+      {
+         unmarshalBean("AnnotationBadNoContent.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   /* TODO
+   public void testAnnotationBadNoContent2() throws Exception
+   {
+      try
+      {
+         unmarshalBean("AnnotationBadNoContent2.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   /* TODO
+   public void testAnnotationBadNoLeadingAt() throws Exception
+   {
+      try
+      {
+         unmarshalBean("AnnotationBadNoLeadingAt.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(AnnotationTestCase.class);
+   }
+
+   public AnnotationTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ArrayTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ArrayTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ArrayTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,171 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractArrayMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * ArrayTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class ArrayTestCase extends AbstractMCTest
+{
+   protected AbstractArrayMetaData getCollection() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractArrayMetaData);
+      return (AbstractArrayMetaData) value;
+   }
+   
+   public void testArray() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testArrayWithClass() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertEquals("CollectionClass", collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testArrayWithElementClass() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertEquals("ElementClass", collection.getElementType());
+   }
+   
+   public void testArrayWithValue() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertValue("Value", getValue(collection));
+   }
+   
+   public void testArrayWithInjection() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertInjection(getValue(collection));
+   }
+   
+   public void testArrayWithCollection() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertCollection(getValue(collection));
+   }
+   
+   public void testArrayWithList() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertList(getValue(collection));
+   }
+   
+   public void testArrayWithSet() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertSet(getValue(collection));
+   }
+   
+   public void testArrayWithArray() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertArray(getValue(collection));
+   }
+   
+   public void testArrayWithMap() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertMap(getValue(collection));
+   }
+   
+   public void testArrayWithNull() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertNullValue(getValue(collection));
+   }
+   
+   public void testArrayWithThis() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertThis(getValue(collection));
+   }
+   
+   public void testArrayWithWildcard() throws Exception
+   {
+      AbstractArrayMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertWildcard(getValue(collection));
+   }
+   
+   protected ValueMetaData getValue(AbstractArrayMetaData collection)
+   {
+      assertEquals(1, collection.size());
+      return (ValueMetaData) collection.iterator().next();
+   }
+   
+   public static Test suite()
+   {
+      return suite(ArrayTestCase.class);
+   }
+
+   public ArrayTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanFactoryTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanFactoryTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanFactoryTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,583 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerMode;
+import org.jboss.test.xb.builder.object.mc.support.model.factory.GenericBeanFactoryMetaData;
+
+/**
+ * BeanFactoryTestCase
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+public class BeanFactoryTestCase extends AbstractMCTest
+{
+   public void testBeanFactoryWithName() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertEquals("Name1", factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithClass() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals(Object.class.getName(), factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithMode() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertEquals(ControllerMode.MANUAL, factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithClassLoader() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNotNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithConstructor() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNotNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithProperty() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNotNull(factory.getProperties());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Property1");
+      assertProperties(expected, factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithProperties() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNotNull(factory.getProperties());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Property1");
+      expected.add("Property2");
+      expected.add("Property3");
+      assertProperties(expected, factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithCreate() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNotNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithStart() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNotNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithDependency() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Depends1");
+      assertDepends(expected, factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithDependencies() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Depends1");
+      expected.add("Depends2");
+      expected.add("Depends3");
+      assertDepends(expected, factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithDemand() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Demand1");
+      assertDemands(expected, factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithDemands() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Demand1");
+      expected.add("Demand2");
+      expected.add("Demand3");
+      assertDemands(expected, factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithSupply() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Supply1");
+      assertSupplies(expected, factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithSupplies() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Supply1");
+      expected.add("Supply2");
+      expected.add("Supply3");
+      assertSupplies(expected, factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithInstall() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      assertInstalls(expected, factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithInstalls() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      expected.add("Install2");
+      expected.add("Install3");
+      assertInstalls(expected, factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithUninstall() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      assertInstalls(expected, factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithUninstalls() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      expected.add("Uninstall2");
+      expected.add("Uninstall3");
+      assertInstalls(expected, factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithInstallCallback() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      assertCallbacks(expected, factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithInstallCallbacks() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      expected.add("Install2");
+      expected.add("Install3");
+      assertCallbacks(expected, factory.getInstallCallbacks());
+      assertNull(factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithUninstallCallback() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      assertCallbacks(expected, factory.getUninstallCallbacks());
+   }
+
+   public void testBeanFactoryWithUninstallCallbacks() throws Exception
+   {
+      GenericBeanFactoryMetaData factory = unmarshalBeanFactory();
+      assertNull(factory.getName());
+      assertEquals("Dummy", factory.getBean());
+      assertNull(factory.getMode());
+      assertNull(factory.getAnnotations());
+      assertNull(factory.getClassLoader());
+      assertNull(factory.getConstructor());
+      assertNull(factory.getProperties());
+      assertNull(factory.getCreate());
+      assertNull(factory.getStart());
+      assertNull(factory.getDepends());
+      assertNull(factory.getDemands());
+      assertNull(factory.getSupplies());
+      assertNull(factory.getInstalls());
+      assertNull(factory.getUninstalls());
+      assertNull(factory.getInstallCallbacks());
+      List<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      expected.add("Uninstall2");
+      expected.add("Uninstall3");
+      assertCallbacks(expected, factory.getUninstallCallbacks());
+   }
+   
+   public static Test suite()
+   {
+      return suite(BeanFactoryTestCase.class);
+   }
+
+   public BeanFactoryTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/BeanTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,745 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerMode;
+
+/**
+ * BeanTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 62474 $
+ */
+public class BeanTestCase extends AbstractMCTest
+{
+   public void testBeanWithName() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertEquals("Name1", bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithClass() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithMode() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertEquals(ControllerMode.MANUAL, bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithAnnotation() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithAnnotations() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithClassLoader() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNotNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithConstructor() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNotNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithProperty() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Property1");
+      assertProperties(expected, bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithProperties() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Property1");
+      expected.add("Property2");
+      expected.add("Property3");
+      assertProperties(expected, bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithCreate() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNotNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithStart() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNotNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithStop() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNotNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithDestroy() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNotNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithDependency() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Depends1");
+      assertDepends(expected, bean.getDepends());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithDependencies() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Depends1");
+      expected.add("Depends2");
+      expected.add("Depends3");
+      assertDepends(expected, bean.getDepends());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithDemand() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Demand1");
+      assertDemands(expected, bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithDemands() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Demand1");
+      expected.add("Demand2");
+      expected.add("Demand3");
+      assertDemands(expected, bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithSupply() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Supply1");
+      assertSupplies(expected, bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithSupplies() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add("Supply1");
+      expected.add("Supply2");
+      expected.add("Supply3");
+      assertSupplies(expected, bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithInstall() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      assertInstalls(expected, bean.getInstalls());
+      assertNull(bean.getUninstalls());
+   }
+
+   public void testBeanWithInstalls() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      expected.add("Install2");
+      expected.add("Install3");
+      assertInstalls(expected, bean.getInstalls());
+      assertNull(bean.getUninstalls());
+   }
+
+   public void testBeanWithUninstall() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      assertInstalls(expected, bean.getUninstalls());
+   }
+
+   public void testBeanWithUninstalls() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      expected.add("Uninstall2");
+      expected.add("Uninstall3");
+      assertInstalls(expected, bean.getUninstalls());
+   }
+
+   public void testBeanWithInstallCallback() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      assertCallbacks(expected, bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithInstallCallbacks() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Install1");
+      expected.add("Install2");
+      expected.add("Install3");
+      assertCallbacks(expected, bean.getInstallCallbacks());
+      assertNull(bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithUninstallCallback() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      assertCallbacks(expected, bean.getUninstallCallbacks());
+   }
+
+   public void testBeanWithUninstallCallbacks() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      assertNull(bean.getName());
+      assertEquals("Dummy", bean.getBean());
+      assertNull(bean.getMode());
+      assertNull(bean.getAnnotations());
+      assertNull(bean.getClassLoader());
+      assertNull(bean.getConstructor());
+      assertNull(bean.getProperties());
+      assertNull(bean.getCreate());
+      assertNull(bean.getStart());
+      assertNull(bean.getStop());
+      assertNull(bean.getDestroy());
+      assertNull(bean.getDemands());
+      assertNull(bean.getSupplies());
+      assertNull(bean.getInstalls());
+      assertNull(bean.getUninstalls());
+      assertNull(bean.getInstallCallbacks());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Uninstall1");
+      expected.add("Uninstall2");
+      expected.add("Uninstall3");
+      assertCallbacks(expected, bean.getUninstallCallbacks());
+   }
+
+   /* TODO
+   public void testBeanBadNoClassOrConstructor() throws Exception
+   {
+      try
+      {
+         unmarshalBean();
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   /* TODO
+   public void testBeanBadNoClassOrFactoryMethod() throws Exception
+   {
+      try
+      {
+         unmarshalBean();
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   /* TODO
+   public void testBeanBadNoClassOrFactory() throws Exception
+   {
+      try
+      {
+         unmarshalBean();
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+   
+   public static Test suite()
+   {
+      return suite(BeanTestCase.class);
+   }
+
+   public BeanTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CallbackTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CallbackTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CallbackTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,261 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.HashSet;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.CallbackMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.Cardinality;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerState;
+
+/**
+ * CallbackTestCase.
+ *
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class CallbackTestCase extends AbstractMCTest
+{
+   public CallbackTestCase(String name)
+   {
+      super(name);
+   }
+
+   public static Test suite()
+   {
+      return suite(CallbackTestCase.class);
+   }
+
+   protected CallbackMetaData getInstallCallback() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      List<CallbackMetaData> callbacks = bean.getInstallCallbacks();
+      assertNotNull(callbacks);
+      assertEquals(1, callbacks.size());
+      CallbackMetaData callback = callbacks.get(0);
+      assertNotNull(callback);
+      return callback;
+   }
+
+   protected CallbackMetaData getUninstallCallback() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      List<CallbackMetaData> callbacks = bean.getUninstallCallbacks();
+      assertNotNull(callbacks);
+      assertEquals(1, callbacks.size());
+      CallbackMetaData callback = callbacks.get(0);
+      assertNotNull(callback);
+      return callback;
+   }
+
+   public void testCallbackInstallWithProperty() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertEquals("someProperty", install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackInstallWithMethod() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("someMethod", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackInstallWithState() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.CONFIGURED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackInstallWithAnnotation() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackInstallWithAnnotations() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackInstallWithSignature() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNotNull(install.getSignature());
+      assertEquals("someSignature", install.getSignature());
+   }
+
+   public void testCallbackInstallWithCardinality() throws Exception
+   {
+      CallbackMetaData install = getInstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNotNull(install.getCardinality());
+      assertEquals(install.getCardinality(), Cardinality.ONE_TO_MANY);
+   }
+
+   /* TODO
+   public void testInstallBothMethodProperty() throws Exception
+   {
+      try
+      {
+         unmarshalBean("CallbackInstallBadMethodProperty.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   // --- Uninstall
+
+   public void testCallbackUninstallWithProperty() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertEquals("someProperty", install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackUninstallWithMethod() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("someMethod", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackUninstallWithState() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.CONFIGURED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackUninstallWithAnnotation() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackUninstallWithAnnotations() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testCallbackUninstallWithSignature() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNotNull(install.getSignature());
+      assertEquals("someSignature", install.getSignature());
+   }
+
+   public void testCallbackUninstallWithCardinality() throws Exception
+   {
+      CallbackMetaData install = getUninstallCallback();
+      assertNull(install.getProperty());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNotNull(install.getCardinality());
+      assertEquals(install.getCardinality(), Cardinality.fromString("2..10"));
+   }
+
+   /* TODO
+   public void testUninstallBothMethodProperty() throws Exception
+   {
+      try
+      {
+         unmarshalBean("CallbackUninstallBadMethodProperty.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ClassLoaderTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ClassLoaderTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ClassLoaderTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,95 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractKernelDeployment;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ClassLoaderMetaData;
+
+/**
+ * ClassLoaderTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class ClassLoaderTestCase extends AbstractMCTest
+{
+   protected ClassLoaderMetaData getClassLoader() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      ClassLoaderMetaData classLoader = deployment.getClassLoader();
+      assertNotNull(classLoader);
+      return classLoader;
+   }
+
+   public void testClassLoaderWithBean() throws Exception
+   {
+      ClassLoaderMetaData classLoader = getClassLoader();
+      assertNotNull(classLoader.getClassLoader());
+      assertTrue(classLoader.getClassLoader() instanceof BeanMetaData);
+   }
+
+   public void testClassLoaderWithInject() throws Exception
+   {
+      ClassLoaderMetaData classLoader = getClassLoader();
+      assertInjection(classLoader.getClassLoader());
+   }
+
+   public void testClassLoaderWithNull() throws Exception
+   {
+      ClassLoaderMetaData classLoader = getClassLoader();
+      assertNullValue(classLoader.getClassLoader());
+   }
+
+   public void testClassLoaderWithWildcard() throws Exception
+   {
+      ClassLoaderMetaData classLoader = getClassLoader();
+      assertWildcard(classLoader.getClassLoader());
+   }
+
+   /* TODO
+   public void testClassLoaderBadNoValue() throws Exception
+   {
+      try
+      {
+         unmarshalDeployment("ClassLoaderBadNoValue.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(ClassLoaderTestCase.class);
+   }
+
+   public ClassLoaderTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CollectionTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CollectionTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/CollectionTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,171 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractCollectionMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * CollectionTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class CollectionTestCase extends AbstractMCTest
+{
+   protected AbstractCollectionMetaData getCollection() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractCollectionMetaData);
+      return (AbstractCollectionMetaData) value;
+   }
+   
+   public void testCollection() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testCollectionWithClass() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertEquals("CollectionClass", collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testCollectionWithElementClass() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertEquals("ElementClass", collection.getElementType());
+   }
+   
+   public void testCollectionWithValue() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertValue("Value", getValue(collection));
+   }
+   
+   public void testCollectionWithInjection() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertInjection(getValue(collection));
+   }
+   
+   public void testCollectionWithCollection() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertCollection(getValue(collection));
+   }
+   
+   public void testCollectionWithList() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertList(getValue(collection));
+   }
+   
+   public void testCollectionWithSet() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertSet(getValue(collection));
+   }
+   
+   public void testCollectionWithArray() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertArray(getValue(collection));
+   }
+   
+   public void testCollectionWithMap() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertMap(getValue(collection));
+   }
+   
+   public void testCollectionWithNull() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertNullValue(getValue(collection));
+   }
+   
+   public void testCollectionWithThis() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertThis(getValue(collection));
+   }
+   
+   public void testCollectionWithWildcard() throws Exception
+   {
+      AbstractCollectionMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertWildcard(getValue(collection));
+   }
+   
+   protected ValueMetaData getValue(AbstractCollectionMetaData collection)
+   {
+      assertEquals(1, collection.size());
+      return (ValueMetaData) collection.iterator().next();
+   }
+   
+   public static Test suite()
+   {
+      return suite(CollectionTestCase.class);
+   }
+
+   public CollectionTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ConstructorTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ConstructorTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ConstructorTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,280 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData;
+
+/**
+ * ConstructorTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class ConstructorTestCase extends AbstractMCTest
+{
+   protected ConstructorMetaData getConstructor() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      ConstructorMetaData constructor = bean.getConstructor();
+      assertNotNull(constructor);
+      return constructor;
+   }
+
+   public void testConstructor() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithBean() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNotNull(constructor.getValue());
+      assertTrue(constructor.getValue() instanceof BeanMetaData);
+   }
+
+   public void testConstructorWithFactoryClass() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertEquals("FactoryClass", constructor.getFactoryClass());
+      assertEquals("Dummy", constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithFactoryMethod() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertEquals("Dummy", constructor.getFactoryClass());
+      assertEquals("FactoryMethod", constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithAnnotation() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithAnnotations() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithFactory() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertEquals("Dummy", constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNotNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithParameter() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      assertParameters(expected, constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithParameters() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      expected.add("Parameter2");
+      expected.add("Parameter3");
+      assertParameters(expected, constructor.getParameters());
+      assertNull(constructor.getValue());
+   }
+
+   public void testConstructorWithValue() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertValue("Value", constructor.getValue());
+   }
+
+   public void testConstructorWithCollection() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertCollection(constructor.getValue());
+   }
+
+   public void testConstructorWithList() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertList(constructor.getValue());
+   }
+
+   public void testConstructorWithSet() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertSet(constructor.getValue());
+   }
+
+   public void testConstructorWithArray() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertArray(constructor.getValue());
+   }
+
+   public void testConstructorWithMap() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertMap(constructor.getValue());
+   }
+
+   public void testConstructorWithWildcard() throws Exception
+   {
+      ConstructorMetaData constructor = getConstructor();
+      assertNull(constructor.getFactoryClass());
+      assertNull(constructor.getFactoryMethod());
+      assertNull(constructor.getAnnotations());
+      assertNull(constructor.getFactory());
+      assertNull(constructor.getParameters());
+      assertWildcard(constructor.getValue());
+   }
+   
+   /* TODO
+   public void testConstructorBadFactoryClassNoFactoryMethod() throws Exception
+   {
+      try
+      {
+         unmarshalBean("ConstructorBadFactoryClassNoFactoryMethod.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   /* TODO
+   public void testConstructorBadFactoryNoFactoryMethod() throws Exception
+   {
+      try
+      {
+         unmarshalBean("ConstructorBadFactoryNoFactoryMethod.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(ConstructorTestCase.class);
+   }
+
+   public ConstructorTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DemandTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DemandTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DemandTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,89 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDemandMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerState;
+
+/**
+ * Demand TestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40800 $
+ */
+public class DemandTestCase extends AbstractMCTest
+{
+   protected AbstractDemandMetaData getDemand() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set demands = bean.getDemands();
+      assertNotNull(demands);
+      assertEquals(1, demands.size());
+      AbstractDemandMetaData demand = (AbstractDemandMetaData) demands.iterator().next();
+      assertNotNull(demand);
+      return demand;
+   }
+   
+   public void testDemand() throws Exception
+   {
+      AbstractDemandMetaData demand = getDemand();
+      assertEquals("Demand", demand.getDemand());
+      assertEquals(ControllerState.DESCRIBED, demand.getWhenRequired());
+   }
+   
+   public void testDemandWithWhenRequired() throws Exception
+   {
+      AbstractDemandMetaData demand = getDemand();
+      assertEquals("Demand", demand.getDemand());
+      assertEquals(ControllerState.CONFIGURED, demand.getWhenRequired());
+   }
+
+   /* TODO
+   public void testDemandBadNoValue() throws Exception
+   {
+      try
+      {
+         unmarshalBean("DemandBadNoValue.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(DemandTestCase.class);
+   }
+
+   public DemandTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DependencyTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DependencyTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DependencyTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,81 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDependencyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.DependencyMetaData;
+
+/**
+ * DependencyTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 55527 $
+ */
+public class DependencyTestCase extends AbstractMCTest
+{
+   protected AbstractDependencyMetaData getDependency() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set<DependencyMetaData> dependencies = bean.getDepends();
+      assertNotNull(dependencies);
+      assertEquals(1, dependencies.size());
+      AbstractDependencyMetaData dependency = (AbstractDependencyMetaData) dependencies.iterator().next();
+      assertNotNull(dependency);
+      return dependency;
+   }
+   
+   public void testDependency() throws Exception
+   {
+      AbstractDependencyMetaData dependency = getDependency();
+      assertEquals("Dependency", dependency.getDependency());
+   }
+
+   /* TODO
+   public void testDependencyBadNoValue() throws Exception
+   {
+      try
+      {
+         unmarshalBean("DependencyBadNoValue.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(DependencyTestCase.class);
+   }
+
+   public DependencyTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DeploymentTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DeploymentTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/DeploymentTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,244 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory;
+import org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory1;
+import org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory2;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractKernelDeployment;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaDataFactory;
+
+/**
+ * DeploymentTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56476 $
+ */
+public class DeploymentTestCase extends AbstractMCTest
+{
+   public void testDeployment() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertNull(deployment.getName());
+      assertNull(deployment.getClassLoader());
+      assertNull(deployment.getBeans());
+   }
+
+   public void testDeploymentWithName() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      assertNull(deployment.getBeans());
+   }
+
+   public void testDeploymentWithClassLoader() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNotNull(deployment.getClassLoader());
+      assertNull(deployment.getBeans());
+   }
+
+   public void testDeploymentWithBean() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(1, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+   }
+
+   public void testDeploymentWithMultipleBeans() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(3, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+      bean = (BeanMetaData) beans.get(1);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+      bean = (BeanMetaData) beans.get(2);
+      assertNotNull(bean);
+      assertEquals("Bean3", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+   }
+
+   public void testDeploymentWithBeanFactory() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(1, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+   }
+
+   public void testDeploymentWithMultipleBeanFactorys() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(3, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+      bean = (BeanMetaData) beans.get(1);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+      bean = (BeanMetaData) beans.get(2);
+      assertNotNull(bean);
+      assertEquals("Bean3", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+   }
+
+   public void testDeploymentWithMultipleBeanMetaDataFactorys() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beanFactories = deployment.getBeanFactories();
+      assertNotNull(beanFactories);
+      assertEquals(3, beanFactories.size());
+      BeanMetaDataFactory factory = (BeanMetaDataFactory) beanFactories.get(0);
+      assertEquals(TestBeanMetaDataFactory.class.getName(), factory.getClass().getName());
+      factory = (BeanMetaDataFactory) beanFactories.get(1);
+      assertEquals(TestBeanMetaDataFactory1.class.getName(), factory.getClass().getName());
+      factory = (BeanMetaDataFactory) beanFactories.get(2);
+      assertEquals(TestBeanMetaDataFactory2.class.getName(), factory.getClass().getName());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(6, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getBean());
+      bean = (BeanMetaData) beans.get(1);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getBean());
+      bean = (BeanMetaData) beans.get(2);
+      assertNotNull(bean);
+      assertEquals("Bean3", bean.getBean());
+      bean = (BeanMetaData) beans.get(3);
+      assertNotNull(bean);
+      assertEquals("Bean4", bean.getBean());
+      bean = (BeanMetaData) beans.get(4);
+      assertNotNull(bean);
+      assertEquals("Bean5", bean.getBean());
+      bean = (BeanMetaData) beans.get(5);
+      assertNotNull(bean);
+      assertEquals("Bean6", bean.getBean());
+   }
+
+   public void testDeploymentWithBeanMetaDataFactory() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beanFactories = deployment.getBeanFactories();
+      assertNotNull(beanFactories);
+      assertEquals(1, beanFactories.size());
+      BeanMetaDataFactory factory = (BeanMetaDataFactory) beanFactories.get(0);
+      assertEquals(TestBeanMetaDataFactory.class.getName(), factory.getClass().getName());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(2, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getBean());
+      bean = (BeanMetaData) beans.get(1);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getBean());
+   }
+
+   public void testDeploymentWithMixed() throws Exception
+   {
+      AbstractKernelDeployment deployment = unmarshalDeployment();
+      assertEquals("SimpleDeployment", deployment.getName());
+      assertNull(deployment.getClassLoader());
+      List beans = deployment.getBeans();
+      assertNotNull(beans);
+      assertEquals(8, beans.size());
+      BeanMetaData bean = (BeanMetaData) beans.get(0);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+      bean = (BeanMetaData) beans.get(1);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+      bean = (BeanMetaData) beans.get(2);
+      assertNotNull(bean);
+      assertEquals("Bean1", bean.getBean());
+      bean = (BeanMetaData) beans.get(3);
+      assertNotNull(bean);
+      assertEquals("Bean2", bean.getBean());
+      bean = (BeanMetaData) beans.get(4);
+      assertNotNull(bean);
+      assertEquals("Bean3", bean.getName());
+      assertEquals(Object.class.getName(), bean.getBean());
+      bean = (BeanMetaData) beans.get(5);
+      assertNotNull(bean);
+      assertEquals("Bean4", bean.getName());
+      assertEquals("GenericBeanFactory", bean.getBean());
+      bean = (BeanMetaData) beans.get(6);
+      assertNotNull(bean);
+      assertEquals("Bean3", bean.getBean());
+      bean = (BeanMetaData) beans.get(7);
+      assertNotNull(bean);
+      assertEquals("Bean4", bean.getBean());
+   }
+   
+   public static Test suite()
+   {
+      return suite(DeploymentTestCase.class);
+   }
+
+   public DeploymentTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/FactoryTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/FactoryTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/FactoryTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,110 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDependencyValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerState;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * FactoryTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40798 $
+ */
+public class FactoryTestCase extends AbstractMCTest
+{
+   protected AbstractValueMetaData getFactory() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      ConstructorMetaData constructor = bean.getConstructor();
+      assertNotNull(constructor);
+      ValueMetaData factory = constructor.getFactory();
+      assertNotNull(factory);
+      assertTrue(factory instanceof AbstractValueMetaData);
+      return (AbstractValueMetaData) factory;
+   }
+
+   protected AbstractDependencyValueMetaData getFactoryDependency() throws Exception
+   {
+      return (AbstractDependencyValueMetaData) getFactory();
+   }
+
+   public void testFactoryWithBean() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getFactoryDependency();
+      assertEquals("Bean1", dependency.getValue());
+      assertNull(dependency.getProperty());
+      assertEquals(ControllerState.INSTALLED, dependency.getDependentState());
+   }
+
+   public void testFactoryWithProperty() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getFactoryDependency();
+      assertEquals("Dummy", dependency.getValue());
+      assertEquals("Property1", dependency.getProperty());
+      assertEquals(ControllerState.INSTALLED, dependency.getDependentState());
+   }
+
+   public void testFactoryWithState() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getFactoryDependency();
+      assertEquals("Dummy", dependency.getValue());
+      assertNull(dependency.getProperty());
+      assertEquals(ControllerState.CONFIGURED, dependency.getDependentState());
+   }
+
+   public void testFactoryWithWildcard() throws Exception
+   {
+      assertWildcard(getFactory());
+   }
+
+   /* TODO
+   public void testFactoryBadNoBeanOrWildcard() throws Exception
+   {
+      try
+      {
+         unmarshalBean("FactoryBadNoBeanOrWildcard.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(FactoryTestCase.class);
+   }
+
+   public FactoryTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InjectionTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InjectionTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InjectionTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,104 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractDependencyValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerState;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * InjectionTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 57133 $
+ */
+public class InjectionTestCase extends AbstractMCTest
+{
+   protected AbstractDependencyValueMetaData getInjection() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractDependencyValueMetaData);
+      return (AbstractDependencyValueMetaData) value;
+   }
+
+   public void testInjectionWithBean() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getInjection();
+      assertEquals("Bean1", dependency.getValue());
+      assertNull(dependency.getProperty());
+      assertEquals(ControllerState.INSTALLED, dependency.getDependentState());
+   }
+
+   public void testInjectionWithProperty() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getInjection();
+      assertEquals("Dummy", dependency.getValue());
+      assertEquals("Property1", dependency.getProperty());
+      assertEquals(ControllerState.INSTALLED, dependency.getDependentState());
+   }
+
+   public void testInjectionWithState() throws Exception
+   {
+      AbstractDependencyValueMetaData dependency = getInjection();
+      assertEquals("Dummy", dependency.getValue());
+      assertNull(dependency.getProperty());
+      assertEquals(ControllerState.CONFIGURED, dependency.getDependentState());
+   }
+
+   /* TODO
+   public void testInjectionBadNoBean() throws Exception
+   {
+      try
+      {
+         AbstractDependencyValueMetaData dependency = getInjection("InjectionBadNoBean.xml");
+         assertNull(dependency.getValue());                  
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(InjectionTestCase.class);
+   }
+
+   public InjectionTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InstallTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InstallTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/InstallTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,162 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ControllerState;
+import org.jboss.test.xb.builder.object.mc.support.model.InstallMetaData;
+
+/**
+ * InstallTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 46386 $
+ */
+public class InstallTestCase extends AbstractMCTest
+{
+   protected InstallMetaData getInstall() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      List installs = bean.getInstalls();
+      assertNotNull(installs);
+      assertEquals(1, installs.size());
+      InstallMetaData install = (InstallMetaData) installs.get(0);
+      assertNotNull(install);
+      return install;
+   }
+
+   public void testInstallWithBean() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertEquals("Bean", install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testInstallWithState() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.CONFIGURED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testInstallWithMethod() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Method", install.getMethodName());
+      assertNull(install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testInstallWithAnnotation() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testInstallWithAnnotations() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, install.getAnnotations());
+      assertNull(install.getParameters());
+   }
+
+   public void testInstallWithParameter() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      assertParameters(expected, install.getParameters());
+   }
+
+   public void testInstallWithParameters() throws Exception
+   {
+      InstallMetaData install = getInstall();
+      assertNull(install.getBean());
+      assertEquals(ControllerState.INSTALLED, install.getDependentState());
+      assertEquals("Dummy", install.getMethodName());
+      assertNull(install.getAnnotations());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      expected.add("Parameter2");
+      expected.add("Parameter3");
+      assertParameters(expected, install.getParameters());
+   }
+
+   /* TODO
+   public void testInstallBadNoMethod() throws Exception
+   {
+      try
+      {
+         unmarshalBean("InstallBadNoMethod.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+
+   public static Test suite()
+   {
+      return suite(InstallTestCase.class);
+   }
+
+   public InstallTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/LifecycleTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/LifecycleTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/LifecycleTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,129 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.ArrayList;
+import java.util.HashSet;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.LifecycleMetaData;
+
+/**
+ * LifecycleTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 63037 $
+ */
+public class LifecycleTestCase extends AbstractMCTest
+{
+   protected LifecycleMetaData getLifecycle() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      LifecycleMetaData lifecycle = bean.getCreate();
+      assertNotNull(lifecycle);
+      return lifecycle;
+   }
+
+   public void testLifecycle() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertNull(lifecycle.getMethodName());
+      assertNull(lifecycle.getAnnotations());
+      assertNull(lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithMethod() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertEquals("Method", lifecycle.getMethodName());
+      assertNull(lifecycle.getAnnotations());
+      assertNull(lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithIgnored() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertTrue(lifecycle.isIgnored());
+      assertNull(lifecycle.getMethodName());
+      assertNull(lifecycle.getAnnotations());
+      assertNull(lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithAnnotation() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertNull(lifecycle.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, lifecycle.getAnnotations());
+      assertNull(lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithAnnotations() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertNull(lifecycle.getMethodName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, lifecycle.getAnnotations());
+      assertNull(lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithParameter() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertNull(lifecycle.getMethodName());
+      assertNull(lifecycle.getAnnotations());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      assertParameters(expected, lifecycle.getParameters());
+   }
+
+   public void testLifecycleWithParameters() throws Exception
+   {
+      LifecycleMetaData lifecycle = getLifecycle();
+      assertNull(lifecycle.getMethodName());
+      assertNull(lifecycle.getAnnotations());
+      ArrayList<String> expected = new ArrayList<String>();
+      expected.add("Parameter1");
+      expected.add("Parameter2");
+      expected.add("Parameter3");
+      assertParameters(expected, lifecycle.getParameters());
+   }
+   
+   public static Test suite()
+   {
+      return suite(LifecycleTestCase.class);
+   }
+
+   public LifecycleTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ListTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ListTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ListTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,171 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractListMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * ListTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class ListTestCase extends AbstractMCTest
+{
+   protected AbstractListMetaData getCollection() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractListMetaData);
+      return (AbstractListMetaData) value;
+   }
+   
+   public void testList() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testListWithClass() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertEquals("CollectionClass", collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testListWithElementClass() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertEquals("ElementClass", collection.getElementType());
+   }
+   
+   public void testListWithValue() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertValue("Value", getValue(collection));
+   }
+   
+   public void testListWithInjection() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertInjection(getValue(collection));
+   }
+
+   public void testListWithCollection() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertCollection(getValue(collection));
+   }
+   
+   public void testListWithList() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertList(getValue(collection));
+   }
+   
+   public void testListWithSet() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertSet(getValue(collection));
+   }
+   
+   public void testListWithArray() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertArray(getValue(collection));
+   }
+   
+   public void testListWithMap() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertMap(getValue(collection));
+   }
+   
+   public void testListWithNull() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertNullValue(getValue(collection));
+   }
+   
+   public void testListWithThis() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertThis(getValue(collection));
+   }
+   
+   public void testListWithWildcard() throws Exception
+   {
+      AbstractListMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertWildcard(getValue(collection));
+   }
+   
+   protected ValueMetaData getValue(AbstractListMetaData collection)
+   {
+      assertEquals(1, collection.size());
+      return (ValueMetaData) collection.iterator().next();
+   }
+   
+   public static Test suite()
+   {
+      return suite(ListTestCase.class);
+   }
+
+   public ListTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/MapTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/MapTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/MapTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,208 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractMapMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * MapTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class MapTestCase extends AbstractMCTest
+{
+   protected AbstractMapMetaData getMap() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractMapMetaData);
+      return (AbstractMapMetaData) value;
+   }
+   
+   public void testMap() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+   }
+   
+   public void testMapWithClass() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertEquals("MapClass", map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+   }
+   
+   public void testMapWithKeyClass() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertEquals("KeyClass", map.getKeyType());
+      assertNull(map.getValueType());
+   }
+   
+   public void testMapWithValueClass() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertEquals("ValueClass", map.getValueType());
+   }
+   
+   public void testMapWithValue() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertValue("Key", getKey(map));
+      assertValue("Value", getValue(map));
+   }
+   
+   public void testMapWithInjection() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertInjection(getKey(map));
+      assertInjection(getValue(map));
+   }
+   
+   public void testMapWithCollection() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertCollection(getKey(map));
+      assertCollection(getValue(map));
+   }
+   
+   public void testMapWithList() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertList(getKey(map));
+      assertList(getValue(map));
+   }
+   
+   public void testMapWithSet() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertSet(getKey(map));
+      assertSet(getValue(map));
+   }
+   
+   public void testMapWithArray() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertArray(getKey(map));
+      assertArray(getValue(map));
+   }
+   
+   public void testMapWithMap() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertMap(getKey(map));
+      assertMap(getValue(map));
+   }
+   
+   public void testMapWithNull() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertNullValue(getKey(map));
+      assertNullValue(getValue(map));
+   }
+   
+   public void testMapWithThis() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertThis(getKey(map));
+      assertThis(getValue(map));
+   }
+   
+   public void testMapWithWildcard() throws Exception
+   {
+      AbstractMapMetaData map = getMap();
+      assertNull(map.getType());
+      assertNull(map.getKeyType());
+      assertNull(map.getValueType());
+      assertWildcard(getKey(map));
+      assertWildcard(getValue(map));
+   }
+   
+   protected ValueMetaData getKey(AbstractMapMetaData map)
+   {
+      assertEquals(1, map.size());
+      return (ValueMetaData) map.keySet().iterator().next();
+   }
+   
+   protected ValueMetaData getValue(AbstractMapMetaData map)
+   {
+      assertEquals(1, map.size());
+      return (ValueMetaData) map.values().iterator().next();
+   }
+   
+   public static Test suite()
+   {
+      return suite(MapTestCase.class);
+   }
+
+   public MapTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ParameterTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ParameterTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ParameterTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,193 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.HashSet;
+import java.util.List;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ConstructorMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ParameterMetaData;
+
+/**
+ * ParameterTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class ParameterTestCase extends AbstractMCTest
+{
+   protected ParameterMetaData getParameter() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      ConstructorMetaData constructor = bean.getConstructor();
+      assertNotNull(constructor);
+      List parameters = constructor.getParameters();
+      assertNotNull(parameters);
+      assertEquals(1, parameters.size());
+      ParameterMetaData parameter = (ParameterMetaData) parameters.get(0);
+      assertNotNull(parameter);
+      return parameter;
+   }
+   
+   public void testParameter() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertNull(parameter.getValue());
+   }
+   
+   public void testParameterWithBean() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getAnnotations());
+      assertNotNull(parameter.getValue());
+      assertTrue(parameter.getValue() instanceof BeanMetaData);
+   }
+   
+   public void testParameterWithClass() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertEquals("ParameterClass", parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertNull(parameter.getValue());
+   }
+
+   public void testParameterWithAnnotation() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, parameter.getAnnotations());
+      assertNull(parameter.getValue());
+   }
+   
+   public void testParameterWithAnnotations() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, parameter.getAnnotations());
+      assertNull(parameter.getValue());
+   }
+   
+   public void testParameterWithPlainValue() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertPlainValue("PlainValue", parameter.getValue());
+   }
+   
+   public void testParameterWithValue() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertValue("Value", parameter.getValue());
+   }
+   
+   public void testParameterWithInjection() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertInjection(parameter.getValue());
+   }
+   
+   public void testParameterWithCollection() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertCollection(parameter.getValue());
+   }
+   
+   public void testParameterWithList() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertList(parameter.getValue());
+   }
+   
+   public void testParameterWithSet() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertSet(parameter.getValue());
+   }
+   
+   public void testParameterWithArray() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertArray(parameter.getValue());
+   }
+   
+   public void testParameterWithMap() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertMap(parameter.getValue());
+   }
+   
+   public void testParameterWithThis() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertThis(parameter.getValue());
+   }
+   
+   public void testParameterWithWildcard() throws Exception
+   {
+      ParameterMetaData parameter = getParameter();
+      assertNull(parameter.getType());
+      assertNull(parameter.getAnnotations());
+      assertWildcard(parameter.getValue());
+   }
+   
+   public static Test suite()
+   {
+      return suite(ParameterTestCase.class);
+   }
+
+   public ParameterTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/PropertyTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/PropertyTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/PropertyTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,212 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.HashSet;
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.Annotation1;
+import org.jboss.test.xb.builder.object.mc.support.Annotation2;
+import org.jboss.test.xb.builder.object.mc.support.Annotation3;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.BeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.StringValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * PropertyTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 56471 $
+ */
+public class PropertyTestCase extends AbstractMCTest
+{
+   protected PropertyMetaData getProperty() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      return property;
+   }
+   
+   public void testProperty() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertNull(property.getValue());
+   }
+   
+   public void testPropertyWithBean() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      ValueMetaData value = property.getValue();
+      assertNotNull(value);
+      assertTrue(value instanceof BeanMetaData);
+   }
+   
+   public void testPropertyWithClass() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      ValueMetaData value = property.getValue();
+      assertNotNull(value);
+      assertTrue(value instanceof StringValueMetaData);
+      StringValueMetaData string = (StringValueMetaData) value;
+      assertEquals("PropertyClass", string.getType());
+   }
+
+   public void testPropertyWithAnnotation() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      assertAnnotations(expected, property.getAnnotations());
+      assertNull(property.getValue());
+   }
+   
+   public void testPropertyWithAnnotations() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      HashSet<String> expected = new HashSet<String>();
+      expected.add(Annotation1.class.getName());
+      expected.add(Annotation2.class.getName());
+      expected.add(Annotation3.class.getName());
+      assertAnnotations(expected, property.getAnnotations());
+      assertNull(property.getValue());
+   }
+   
+   public void testPropertyWithPlainValue() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertPlainValue("PlainValue", property.getValue());
+   }
+   
+   public void testPropertyWithValue() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertValue("Value", property.getValue());
+   }
+   
+   public void testPropertyWithInjection() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertInjection(property.getValue());
+   }
+   
+   public void testPropertyWithCollection() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertCollection(property.getValue());
+   }
+   
+   public void testPropertyWithList() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertList(property.getValue());
+   }
+   
+   public void testPropertyWithSet() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertSet(property.getValue());
+   }
+   
+   public void testPropertyWithArray() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertArray(property.getValue());
+   }
+   
+   public void testPropertyWithMap() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertMap(property.getValue());
+   }
+   
+   public void testPropertyWithThis() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertThis(property.getValue());
+   }
+   
+   public void testPropertyWithWildcard() throws Exception
+   {
+      PropertyMetaData property = getProperty();
+      assertNotNull("PropertyName", property.getName());
+      assertNull(property.getAnnotations());
+      assertWildcard(property.getValue());
+   }
+
+   /* TODO
+   public void testPropertyBadNoName() throws Exception
+   {
+      try
+      {
+         unmarshalBean("PropertyBadNoName.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   } */
+
+   public static Test suite()
+   {
+      return suite(PropertyTestCase.class);
+   }
+
+   public PropertyTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SetTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SetTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SetTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,171 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractSetMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * SetTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class SetTestCase extends AbstractMCTest
+{
+   protected AbstractSetMetaData getCollection() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof AbstractSetMetaData);
+      return (AbstractSetMetaData) value;
+   }
+   
+   public void testSet() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testSetWithClass() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertEquals("CollectionClass", collection.getType());
+      assertNull(collection.getElementType());
+   }
+   
+   public void testSetWithElementClass() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertEquals("ElementClass", collection.getElementType());
+   }
+   
+   public void testSetWithValue() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertValue("Value", getValue(collection));
+   }
+   
+   public void testSetWithInjection() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertInjection(getValue(collection));
+   }
+   
+   public void testSetWithCollection() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertCollection(getValue(collection));
+   }
+   
+   public void testSetWithList() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertList(getValue(collection));
+   }
+   
+   public void testSetWithSet() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertSet(getValue(collection));
+   }
+   
+   public void testSetWithArray() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertArray(getValue(collection));
+   }
+   
+   public void testSetWithMap() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertMap(getValue(collection));
+   }
+   
+   public void testSetWithNull() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertNullValue(getValue(collection));
+   }
+   
+   public void testSetWithThis() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertThis(getValue(collection));
+   }
+   
+   public void testSetWithWildcard() throws Exception
+   {
+      AbstractSetMetaData collection = getCollection();
+      assertNull(collection.getType());
+      assertNull(collection.getElementType());
+      assertWildcard(getValue(collection));
+   }
+   
+   protected ValueMetaData getValue(AbstractSetMetaData collection)
+   {
+      assertEquals(1, collection.size());
+      return (ValueMetaData) collection.iterator().next();
+   }
+   
+   public static Test suite()
+   {
+      return suite(SetTestCase.class);
+   }
+
+   public SetTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SupplyTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SupplyTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/SupplyTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,80 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractSupplyMetaData;
+
+/**
+ * SupplyTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40800 $
+ */
+public class SupplyTestCase extends AbstractMCTest
+{
+   protected AbstractSupplyMetaData getSupply() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set supplies = bean.getSupplies();
+      assertNotNull(supplies);
+      assertEquals(1, supplies.size());
+      AbstractSupplyMetaData supply = (AbstractSupplyMetaData) supplies.iterator().next();
+      assertNotNull(supply);
+      return supply;
+   }
+   
+   public void testSupply() throws Exception
+   {
+      AbstractSupplyMetaData supply = getSupply();
+      assertEquals("Supply", supply.getSupply());
+   }
+
+   /* TODO
+   public void testSupplyBadNoValue() throws Exception
+   {
+      try
+      {
+         unmarshalBean("SupplyBadNoValue.xml");
+         fail("Should not be here");
+      }
+      catch (Exception expected)
+      {
+         checkJBossXBException(IllegalArgumentException.class, expected);
+      }
+   }
+   */
+   
+   public static Test suite()
+   {
+      return suite(SupplyTestCase.class);
+   }
+
+   public SupplyTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ValueTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ValueTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/ValueTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,85 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import java.util.Set;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.object.mc.support.model.AbstractBeanMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.PropertyMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.StringValueMetaData;
+import org.jboss.test.xb.builder.object.mc.support.model.ValueMetaData;
+
+/**
+ * ValueTestCase.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 40781 $
+ */
+public class ValueTestCase extends AbstractMCTest
+{
+   protected StringValueMetaData getValue() throws Exception
+   {
+      AbstractBeanMetaData bean = unmarshalBean();
+      Set properties = bean.getProperties();
+      assertNotNull(properties);
+      assertEquals(1, properties.size());
+      PropertyMetaData property = (PropertyMetaData) properties.iterator().next();
+      assertNotNull(property);
+      ValueMetaData value = property.getValue();
+      assertNotNull(property);
+      assertTrue(value instanceof StringValueMetaData);
+      return (StringValueMetaData) value;
+   }
+   
+   public void testValue() throws Exception
+   {
+      StringValueMetaData value = getValue();
+      assertNull(value.getType());
+      assertNull(value.getUnderlyingValue());
+   }
+   
+   public void testValueWithClass() throws Exception
+   {
+      StringValueMetaData value = getValue();
+      assertEquals("ValueClass", value.getType());
+      assertNull(value.getUnderlyingValue());
+   }
+   
+   public void testValueWithValue() throws Exception
+   {
+      StringValueMetaData value = getValue();
+      assertNull(value.getType());
+      assertEquals("Value", value.getUnderlyingValue());
+   }
+   
+   public static Test suite()
+   {
+      return suite(ValueTestCase.class);
+   }
+
+   public ValueTestCase(String name)
+   {
+      super(name);
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/XMLTestDelegate.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/XMLTestDelegate.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/mc/test/XMLTestDelegate.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,85 @@
+/*
+* 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.xb.builder.object.mc.test;
+
+import org.jboss.test.AbstractTestDelegate;
+import org.jboss.xb.binding.Unmarshaller;
+import org.jboss.xb.binding.UnmarshallerFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBindingResolver;
+import org.jboss.xb.binding.sunday.unmarshalling.SingletonSchemaResolverFactory;
+
+/**
+ * XMLTestDelegate.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 60393 $
+ */
+public class XMLTestDelegate extends AbstractTestDelegate
+{
+   /** The unmarshaller factory */
+   protected UnmarshallerFactory unmarshallerFactory;
+
+   /** The resolver */
+   protected SchemaBindingResolver resolver;
+
+   /**
+    * Create a new XMLTestDelegate.
+    * 
+    * @param clazz the test class
+    */
+   public XMLTestDelegate(Class clazz)
+   {
+      super(clazz);
+   }
+
+   public void setUp() throws Exception
+   {
+      super.setUp();
+      unmarshallerFactory = UnmarshallerFactory.newInstance();
+      resolver = SingletonSchemaResolverFactory.getInstance().getSchemaBindingResolver();
+   }
+   
+   /**
+    * Unmarshal an object
+    * 
+    * @param url the url
+    * @return the object
+    * @throws Exception for any error
+    */
+   public Object unmarshal(String url) throws Exception
+   {
+      long start = System.currentTimeMillis();
+      Unmarshaller unmarshaller = unmarshallerFactory.newUnmarshaller();
+      log.debug("Initialized parsing in " + (System.currentTimeMillis() - start) + "ms");
+      try
+      {
+         Object result = unmarshaller.unmarshal(url, resolver);
+         log.debug("Total parse for " + url + " took " + (System.currentTimeMillis() - start) + "ms");
+         return result;
+      }
+      catch (Exception e)
+      {
+         log.debug("Error during parsing: " + url, e);
+         throw e;
+      }
+   }
+}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/ObjectTypeValueTestSuite.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/ObjectTypeValueTestSuite.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/ObjectTypeValueTestSuite.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -26,7 +26,6 @@
 import junit.textui.TestRunner;
 
 import org.jboss.test.xb.builder.object.type.value.test.IntegerUnitTestCase;
-import org.jboss.test.xb.builder.object.type.value.test.NotSpecifiedValueUnitTestCase;
 import org.jboss.test.xb.builder.object.type.value.test.SpecifiedValueUnitTestCase;
 import org.jboss.test.xb.builder.object.type.value.test.StringUnitTestCase;
 
@@ -47,7 +46,6 @@
    {
       TestSuite suite = new TestSuite("Object Type Value Tests");
 
-      suite.addTest(NotSpecifiedValueUnitTestCase.suite());
       suite.addTest(SpecifiedValueUnitTestCase.suite());
       suite.addTest(StringUnitTestCase.suite());
       suite.addTest(IntegerUnitTestCase.suite());

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/IntegerValue.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/IntegerValue.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/IntegerValue.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -21,6 +21,8 @@
 */
 package org.jboss.test.xb.builder.object.type.value.support;
 
+import javax.xml.bind.annotation.XmlValue;
+
 /**
  * IntegerValue.
  * 
@@ -35,6 +37,8 @@
    {
       return value;
    }
+   
+   @XmlValue
    public void setValue(Integer value)
    {
       this.value = value;

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/StringValue.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/StringValue.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/support/StringValue.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -21,6 +21,8 @@
 */
 package org.jboss.test.xb.builder.object.type.value.support;
 
+import javax.xml.bind.annotation.XmlValue;
+
 /**
  * StringValue.
  * 
@@ -36,6 +38,7 @@
       return value;
    }
 
+   @XmlValue
    public void setValue(String value)
    {
       this.value = value;

Deleted: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/test/NotSpecifiedValueUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/test/NotSpecifiedValueUnitTestCase.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/value/test/NotSpecifiedValueUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -1,63 +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.xb.builder.object.type.value.test;
-
-import junit.framework.Test;
-
-import org.jboss.test.xb.builder.AbstractBuilderTest;
-import org.jboss.test.xb.builder.object.type.value.support.StringValue;
-import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
-import org.jboss.xb.builder.JBossXBBuilder;
-
-/**
- * NotSpecifiedValueUnitTestCase.
- *
- * @author <a href="adrian at jboss.com">Adrian Brock</a>
- * @version $Revision: 1.1 $
- */
-public class NotSpecifiedValueUnitTestCase extends AbstractBuilderTest
-{
-   public static Test suite()
-   {
-      return suite(NotSpecifiedValueUnitTestCase.class);
-   }
-
-   public NotSpecifiedValueUnitTestCase(String name)
-   {
-      super(name);
-   }
-
-   public void testUnmarshal() throws Exception
-   {
-      StringValue result = unmarshalObject(StringValue.class);
-      Object actual = result.getValue();
-      assertEquals("Hello", actual);
-   }
-
-   public void testValueBinding() throws Exception
-   {
-      SchemaBinding schemaBinding = JBossXBBuilder.build(StringValue.class);
-      assertNotNull(schemaBinding);
-      
-      // TODO check the model
-   }
-}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ArrayObjectWildcardUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ArrayObjectWildcardUnitTestCase.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ArrayObjectWildcardUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -62,7 +62,7 @@
 
    public void testUnmarshalWildcard() throws Exception
    {
-      ArrayObjectWildcard result = unmarshalObject(ArrayObjectWildcard.class, SimpleJavaBean.class, AnotherJavaBean.class);
+      ArrayObjectWildcard result = unmarshalObject(ArrayObjectWildcard.class, ArrayObjectWildcard.class, SimpleJavaBean.class, AnotherJavaBean.class);
       Object[] wildcard = result.getWildcard();
       assertNotNull(wildcard);
       assertEquals(2, wildcard.length);

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ListObjectWildcardUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ListObjectWildcardUnitTestCase.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/ListObjectWildcardUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -63,7 +63,7 @@
 
    public void testUnmarshalWildcard() throws Exception
    {
-      ListObjectWildcard result = unmarshalObject(ListObjectWildcard.class, SimpleJavaBean.class, AnotherJavaBean.class);
+      ListObjectWildcard result = unmarshalObject(ListObjectWildcard.class, ListObjectWildcard.class, SimpleJavaBean.class, AnotherJavaBean.class);
       List<Object> wildcard = result.getWildcard();
       assertNotNull(wildcard);
       assertEquals(2, wildcard.size());

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/SimpleObjectWildcardUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/SimpleObjectWildcardUnitTestCase.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmlanyelement/test/SimpleObjectWildcardUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -60,7 +60,7 @@
 
    public void testUnmarshalWildcard() throws Exception
    {
-      SimpleObjectWildcard result = unmarshalObject(SimpleObjectWildcard.class, SimpleJavaBean.class);
+      SimpleObjectWildcard result = unmarshalObject(SimpleObjectWildcard.class, SimpleObjectWildcard.class, SimpleJavaBean.class);
       Object object = result.getWildcard();
       assertNotNull(object);
       assertTrue(object instanceof SimpleJavaBean);

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/ObjectTypeXmlTypeTestSuite.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/ObjectTypeXmlTypeTestSuite.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/ObjectTypeXmlTypeTestSuite.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -25,6 +25,7 @@
 import junit.framework.TestSuite;
 import junit.textui.TestRunner;
 
+import org.jboss.test.xb.builder.object.type.xmltype.test.BeanAdapterUnitTestCase;
 import org.jboss.test.xb.builder.object.type.xmltype.test.DefaultsUnitTestCase;
 import org.jboss.test.xb.builder.object.type.xmltype.test.NonDefaultsUnitTestCase;
 import org.jboss.test.xb.builder.object.type.xmltype.test.NoneUnitTestCase;
@@ -49,6 +50,7 @@
       suite.addTest(NoneUnitTestCase.suite());
       suite.addTest(DefaultsUnitTestCase.suite());
       suite.addTest(NonDefaultsUnitTestCase.suite());
+      suite.addTest(BeanAdapterUnitTestCase.suite());
 
       // TODO test semantics
       

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/Adapted.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/Adapted.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/Adapted.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,50 @@
+/*
+* 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.xb.builder.object.type.xmltype.adapter;
+
+import javax.xml.bind.annotation.XmlType;
+
+import org.jboss.xb.annotations.JBossXmlType;
+
+/**
+ * Adapted
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+ at XmlType(namespace="testNamespace", name="adapted")
+ at JBossXmlType(beanAdapterBuilder=TestBeanAdapterBuilder.class)
+public class Adapted
+{
+   public String property1;
+   public String property2;
+   
+   public void setProperty1(String property1)
+   {
+      this.property1 = property1;
+   }
+
+   public void setProperty2(String property2)
+   {
+      this.property2 = property2;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/AdaptedSubclass.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/AdaptedSubclass.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/AdaptedSubclass.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,32 @@
+/*
+* 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.xb.builder.object.type.xmltype.adapter;
+
+/**
+ * AdaptedSubclass.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class AdaptedSubclass extends Adapted
+{
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapter.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapter.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapter.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,66 @@
+/*
+* 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.xb.builder.object.type.xmltype.adapter;
+
+import java.lang.reflect.Method;
+
+import org.jboss.beans.info.spi.PropertyInfo;
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * TestBeanAdapter.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestBeanAdapter extends BeanAdapter
+{
+   Adapted adapted;
+   
+   public TestBeanAdapter(BeanAdapterFactory beanAdapterFactory)
+   {
+      super(beanAdapterFactory);
+      adapted = new AdaptedSubclass();
+   }
+
+   public void set(PropertyInfo propertyInfo, Object child) throws Throwable
+   {
+      String methodName = null;
+      if ("property1".equals(propertyInfo.getName()))
+         methodName = "setProperty2";
+      else
+         methodName = "setProperty1";
+      Method  method = Adapted.class.getMethod(methodName, String.class);
+      method.invoke(adapted, child);
+   }
+
+   public Object get(PropertyInfo propertyInfo) throws Throwable
+   {
+      return null;
+   }
+
+   public Object getValue()
+   {
+      return adapted;
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterBuilder.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterBuilder.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterBuilder.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,41 @@
+/*
+* 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.xb.builder.object.type.xmltype.adapter;
+
+import org.jboss.beans.info.spi.BeanInfo;
+import org.jboss.reflect.spi.MethodInfo;
+import org.jboss.xb.spi.BeanAdapterBuilder;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * TestBeanAdapterBuilder.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestBeanAdapterBuilder implements BeanAdapterBuilder
+{
+   public BeanAdapterFactory newFactory(BeanInfo beanInfo, MethodInfo factory)
+   {
+      return new TestBeanAdapterFactory();
+   }
+}

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterFactory.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterFactory.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/adapter/TestBeanAdapterFactory.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,39 @@
+/*
+* 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.xb.builder.object.type.xmltype.adapter;
+
+import org.jboss.xb.spi.BeanAdapter;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * TestBeanAdapterFactory.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class TestBeanAdapterFactory extends BeanAdapterFactory
+{
+   public BeanAdapter newInstance()
+   {
+      return new TestBeanAdapter(this);
+   }
+}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/AbstractDefaultsTest.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/AbstractDefaultsTest.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/AbstractDefaultsTest.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -31,6 +31,8 @@
 import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
 import org.jboss.xb.builder.JBossXBBuilder;
 import org.jboss.xb.builder.runtime.BeanHandler;
+import org.jboss.xb.spi.AbstractBeanAdapterFactory;
+import org.jboss.xb.spi.BeanAdapterFactory;
 
 /**
  * AbstractErrorTest.
@@ -90,6 +92,9 @@
       assertNotNull(particleHandler);
       assertTrue(particleHandler instanceof BeanHandler);
       BeanHandler beanInfoElementHandler = (BeanHandler) particleHandler;
-      assertEquals(root.getName(), beanInfoElementHandler.getBeanInfo().getName());
+      BeanAdapterFactory beanAdapterFactory = beanInfoElementHandler.getBeanAdapterFactory();
+      assertTrue(beanAdapterFactory instanceof AbstractBeanAdapterFactory);
+      AbstractBeanAdapterFactory abstractBeanAdapterFactory = (AbstractBeanAdapterFactory) beanAdapterFactory;
+      assertEquals(root.getName(), abstractBeanAdapterFactory.getBeanInfo().getName());
    }
 }

Added: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapterUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapterUnitTestCase.java	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapterUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,93 @@
+/*
+* 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.xb.builder.object.type.xmltype.test;
+
+import javax.xml.XMLConstants;
+import javax.xml.namespace.QName;
+
+import junit.framework.Test;
+
+import org.jboss.test.xb.builder.AbstractBuilderTest;
+import org.jboss.test.xb.builder.object.type.xmltype.adapter.Adapted;
+import org.jboss.test.xb.builder.object.type.xmltype.adapter.AdaptedSubclass;
+import org.jboss.test.xb.builder.object.type.xmltype.adapter.TestBeanAdapterFactory;
+import org.jboss.xb.binding.sunday.unmarshalling.ElementBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.ParticleHandler;
+import org.jboss.xb.binding.sunday.unmarshalling.SchemaBinding;
+import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
+import org.jboss.xb.builder.JBossXBBuilder;
+import org.jboss.xb.builder.runtime.BeanHandler;
+import org.jboss.xb.spi.BeanAdapterFactory;
+
+/**
+ * AbstractMCTest.
+ * 
+ * @author <a href="adrian at jboss.com">Adrian Brock</a>
+ * @version $Revision: 1.1 $
+ */
+public class BeanAdapterUnitTestCase extends AbstractBuilderTest
+{
+   public static Test suite()
+   {
+      return suite(BeanAdapterUnitTestCase.class);
+   }
+   
+   public BeanAdapterUnitTestCase(String name)
+   {
+      super(name);
+   }
+
+   public void testAdaptedUnmarshal() throws Exception
+   {
+      Adapted result = unmarshalObject(Adapted.class);
+      // Class should have been changed by the adapter 
+      assertTrue(result instanceof AdaptedSubclass);
+      // Properties should have been swapped by the adapter 
+      assertEquals("property1", result.property2);
+      assertEquals("property2", result.property1);
+   }
+
+   public void testAdaptedTypeBinding() throws Exception
+   {
+      SchemaBinding schemaBinding = JBossXBBuilder.build(Adapted.class);
+      assertNotNull(schemaBinding);
+      
+      // Check the type
+      QName qName = new QName("testNamespace", "adapted");
+      TypeBinding type = schemaBinding.getType(qName);
+      assertNotNull(type);
+      assertEquals(qName, type.getQName());
+      
+      QName elementName = new QName(XMLConstants.NULL_NS_URI, "adapted");
+      ElementBinding elementBinding = schemaBinding.getElement(elementName);
+      assertNotNull(elementBinding);
+      TypeBinding typeBinding = elementBinding.getType();
+      assertTrue(type == typeBinding);
+      
+      ParticleHandler particleHandler = typeBinding.getHandler();
+      assertNotNull(particleHandler);
+      assertTrue(particleHandler instanceof BeanHandler);
+      BeanHandler beanInfoElementHandler = (BeanHandler) particleHandler;
+      BeanAdapterFactory beanAdapterFactory = beanInfoElementHandler.getBeanAdapterFactory();
+      assertTrue(beanAdapterFactory instanceof TestBeanAdapterFactory);
+   }
+}

Modified: jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/NonDefaultsUnitTestCase.java
===================================================================
--- jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/NonDefaultsUnitTestCase.java	2007-04-30 20:25:37 UTC (rev 2397)
+++ jbossxb-builder/trunk/src/test/java/org/jboss/test/xb/builder/object/type/xmltype/test/NonDefaultsUnitTestCase.java	2007-05-25 13:24:40 UTC (rev 2398)
@@ -34,6 +34,8 @@
 import org.jboss.xb.binding.sunday.unmarshalling.TypeBinding;
 import org.jboss.xb.builder.JBossXBBuilder;
 import org.jboss.xb.builder.runtime.BeanHandler;
+import org.jboss.xb.spi.AbstractBeanAdapterFactory;
+import org.jboss.xb.spi.BeanAdapterFactory;
 
 /**
  * NonDefaultsUnitTestCase.
@@ -53,7 +55,7 @@
       super(name);
    }
 
-   public void testNonDefaultsUnmarshal() throws Exception
+   public void testBeanAdapterUnmarshal() throws Exception
    {
       unmarshalObject(Root.class);
    }
@@ -79,6 +81,9 @@
       assertNotNull(particleHandler);
       assertTrue(particleHandler instanceof BeanHandler);
       BeanHandler beanInfoElementHandler = (BeanHandler) particleHandler;
-      assertEquals(Root.class.getName(), beanInfoElementHandler.getBeanInfo().getName());
+      BeanAdapterFactory beanAdapterFactory = beanInfoElementHandler.getBeanAdapterFactory();
+      assertTrue(beanAdapterFactory instanceof AbstractBeanAdapterFactory);
+      AbstractBeanAdapterFactory abstractBeanAdapterFactory = (AbstractBeanAdapterFactory) beanAdapterFactory;
+      assertEquals(Root.class.getName(), abstractBeanAdapterFactory.getBeanInfo().getName());
    }
 }

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/ParameterInstantiate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean"
+          class="org.jboss.test.xb.builder.object.javabean.support.TestParameterInstantiate">
+   <constructor>
+      <parameter>Hello</parameter>
+      <parameter>5</parameter>
+   </constructor>
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/Property.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/Property.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/Property.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean"
+          class="org.jboss.test.xb.builder.object.javabean.support.TestProperty">
+   <property name="AString">StringValue</property>
+   <property name="AByte">12</property>
+   <property name="ABoolean">true</property>
+   <property name="AShort">123</property>
+   <property name="anInt">1234</property>
+   <property name="ALong">12345</property>
+   <property name="AFloat">3.14</property>
+   <property name="ADouble">3.14e12</property>
+   <!--property name="ADate">Jan 01 00:00:00 CET 2001</property-->
+   <property name="ABigDecimal">12e4</property>
+   <property name="ABigInteger">123456</property>
+   <property name="abyte">12</property>
+   <property name="aboolean">true</property>
+   <property name="ashort">123</property>
+   <property name="anint">1234</property>
+   <property name="along">12345</property>
+   <property name="afloat">3.14</property>
+   <property name="adouble">3.14e12</property>
+   <property name="ANumber" class="java.lang.Long">12345</property>
+   <property name="overloadedProperty">StringValue</property>
+   <property name="XYZ">XYZ</property>
+   <property name="abc">abc</property>
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/PropertyWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean"
+          class="org.jboss.test.xb.builder.object.javabean.support.TestPropertyWildcard">
+   <property name="bean">
+      <javabean class="org.jboss.test.xb.builder.object.javabean.support.TestWildcard"/>
+   </property>
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/SimpleInstantiate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean"
+          class="org.jboss.test.xb.builder.object.javabean.support.TestSimpleInstantiate">
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticClassMethodInstantiate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean">
+   <constructor factoryClass="org.jboss.test.xb.builder.object.javabean.support.TestStaticClassMethodInstantiator" factoryMethod="instantiate"/>
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/javabean/test/StaticMethodInstantiate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<javabean xmlns="test:javabean"
+          class="org.jboss.test.xb.builder.object.javabean.support.TestStaticMethodInstantiate">
+   <constructor factoryMethod="instantiate"/>
+</javabean>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Alias.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Alias.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Alias.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias>SimpleAlias</alias>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithBeanFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithBeanFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithBeanFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias>SimpleAliasWithBF</alias>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias class="java.lang.Integer">12345</alias>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithNoReplace.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithNoReplace.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithNoReplace.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias replace="false">X${alias.test.name}X</alias>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithReplace.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithReplace.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AliasWithReplace.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias replace="true">X${alias.test.name}X</alias>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent2.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent2.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoContent2.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>
+      
+      </annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoLeadingAt.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoLeadingAt.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationBadNoLeadingAt.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>org.jboss.test.kernel.deployment.xml.support.Annotation1</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationSimple.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationSimple.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationSimple.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttribute.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttribute.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttribute.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.AnnotationWithAttribute(attribute=java.lang.Long.class)</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttributes.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttributes.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/AnnotationWithAttributes.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.AnnotationWithAttributes(clazz=java.lang.Integer.class, integer=100, str="Annotations are nice")</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Array.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Array.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Array.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><array/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <array/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><array class="CollectionClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <collection/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithElementClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithElementClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithElementClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><array elementClass="ElementClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <inject bean="Bean"/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <list/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <map/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <null/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <set/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <this/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <value>Value</value>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ArrayWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <array>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </array>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrConstructor.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrConstructor.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrConstructor.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactoryMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactoryMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanBadNoClassOrFactoryMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryClass="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrConstructor.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrConstructor.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrConstructor.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactoryMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactoryMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryBadNoClassOrFactoryMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryClass="Dummy"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="java.lang.Object"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClassLoader.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClassLoader.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithClassLoader.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <classloader><null/></classloader>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithConstructor.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithConstructor.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithConstructor.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithCreate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithCreate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithCreate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemand.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemand.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemand.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand>Demand1</demand>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemands.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemands.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDemands.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand>Demand1</demand>
+   <demand>Demand2</demand>
+   <demand>Demand3</demand>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependencies.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependencies.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependencies.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends>Depends1</depends>
+   <depends>Depends2</depends>
+   <depends>Depends3</depends>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependency.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependency.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithDependency.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends>Depends1</depends>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstall.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstall.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstall.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Install1"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallback.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallback.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallback.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Install1"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallbacks.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallbacks.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstallCallbacks.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Install1"/>
+   <incallback method="Install2"/>
+   <incallback method="Install3"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstalls.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstalls.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithInstalls.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Install1"/>
+   <install method="Install2"/>
+   <install method="Install3"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithMode.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithMode.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithMode.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy" mode="Manual"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" name="Name1" class="Dummy"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperties.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperties.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperties.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Property1"/>
+   <property name="Property2"/>
+   <property name="Property3"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Property1"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithStart.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithStart.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithStart.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <start/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupplies.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupplies.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupplies.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply>Supply1</supply>
+   <supply>Supply2</supply>
+   <supply>Supply3</supply>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupply.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupply.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithSupply.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply>Supply1</supply>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstall.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstall.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstall.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uninstall method="Uninstall1"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallback.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallback.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallback.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Uninstall1"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallbacks.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallbacks.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstallCallbacks.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Uninstall1"/>
+   <uncallback method="Uninstall2"/>
+   <uncallback method="Uninstall3"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstalls.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstalls.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanFactoryWithUninstalls.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<beanfactory xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uninstall method="Uninstall1"/>
+   <uninstall method="Uninstall2"/>
+   <uninstall method="Uninstall3"/>
+</beanfactory>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+   <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="java.lang.Object"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClassLoader.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClassLoader.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithClassLoader.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <classloader><null/></classloader>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithConstructor.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithConstructor.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithConstructor.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithCreate.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithCreate.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithCreate.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemand.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemand.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemand.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand>Demand1</demand>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemands.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemands.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDemands.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand>Demand1</demand>
+   <demand>Demand2</demand>
+   <demand>Demand3</demand>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependencies.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependencies.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependencies.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends>Depends1</depends>
+   <depends>Depends2</depends>
+   <depends>Depends3</depends>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependency.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependency.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDependency.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends>Depends1</depends>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDestroy.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDestroy.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithDestroy.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <destroy/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstall.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstall.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstall.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Install1"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallback.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallback.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallback.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Install1"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallbacks.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallbacks.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstallCallbacks.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Install1"/>
+   <incallback method="Install2"/>
+   <incallback method="Install3"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstalls.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstalls.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithInstalls.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Install1"/>
+   <install method="Install2"/>
+   <install method="Install3"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithMode.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithMode.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithMode.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy" mode="Manual"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy" name="Name1"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperties.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperties.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperties.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Property1"/>
+   <property name="Property2"/>
+   <property name="Property3"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Property1"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStart.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStart.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStart.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <start/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStop.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStop.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithStop.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <stop/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupplies.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupplies.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupplies.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply>Supply1</supply>
+   <supply>Supply2</supply>
+   <supply>Supply3</supply>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupply.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupply.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithSupply.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply>Supply1</supply>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstall.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstall.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstall.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uninstall method="Uninstall1"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallback.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallback.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallback.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Uninstall1"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallbacks.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallbacks.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstallCallbacks.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Uninstall1"/>
+   <uncallback method="Uninstall2"/>
+   <uncallback method="Uninstall3"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstalls.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstalls.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BeanWithUninstalls.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uninstall method="Uninstall1"/>
+   <uninstall method="Uninstall2"/>
+   <uninstall method="Uninstall3"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithComplexValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithComplexValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithComplexValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <binding name="somename">
+      <value xmlns="urn:jboss:bean-deployer:2.0" class="java.lang.Integer">42</value>
+   </binding>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithNoName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithNoName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithNoName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <binding>binddinb</binding>
+</policy>
\ No newline at end of file

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithPlainValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithPlainValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/BindingWithPlainValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <binding name="somename">binddinb</binding>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallBadMethodProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallBadMethodProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallBadMethodProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Dummy" property="someP" />
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </incallback>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </incallback>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithCardinality.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithCardinality.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithCardinality.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback cardinality="1..n" method="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="someMethod"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback property="someProperty"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithSignature.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithSignature.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithSignature.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback signature="someSignature" method="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithState.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithState.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackInstallWithState.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <incallback method="Dummy" state="Configured"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallBadMethodProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallBadMethodProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallBadMethodProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Dummy" property="someP" />
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </uncallback>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </uncallback>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithCardinality.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithCardinality.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithCardinality.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback cardinality="2..10" method="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="someMethod"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback property="someProperty"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithSignature.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithSignature.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithSignature.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback signature="someSignature" method="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithState.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithState.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CallbackUninstallWithState.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <uncallback method="Dummy" state="Configured"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderBadNoValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderBadNoValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderBadNoValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader><bean name="CL" class="org.jboss.test.Dummy"/></classloader>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithInject.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithInject.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithInject.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader><inject bean="ClassLoader"/></classloader>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader><null/></classloader>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ClassLoaderWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader>
+      <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+   </classloader>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Collection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Collection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Collection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><collection/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <array/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><collection class="CollectionClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <collection/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithElementClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithElementClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithElementClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><collection elementClass="ElementClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <inject bean="Bean"/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <list/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <map/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <null/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <set/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <this/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <value>Value</value>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/CollectionWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <collection>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </collection>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Constructor.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Constructor.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Constructor.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryClassNoFactoryMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryClassNoFactoryMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryClassNoFactoryMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor factoryClass="FactoryClass"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryNoFactoryMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryNoFactoryMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorBadFactoryNoFactoryMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <factory bean="Bean"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor><array/></constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor>
+      <bean name="Dummy" class="org.jboss.test.Dummy"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor><collection/></constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory bean="Dummy"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy" factoryClass="FactoryClass"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithFactoryMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="FactoryMethod" factoryClass="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor><list/></constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor><map/></constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameter.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameter.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameter.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter class="Parameter1"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameters.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameters.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithParameters.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter class="Parameter1"/>
+      <parameter class="Parameter2"/>
+      <parameter class="Parameter3"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor><set/></constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor>
+      <value>Value</value>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ConstructorWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor>
+      <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Demand.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Demand.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Demand.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand>Demand</demand>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandBadNoValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandBadNoValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandBadNoValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandWithWhenRequired.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandWithWhenRequired.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DemandWithWhenRequired.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <demand state="Configured">Demand</demand>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Dependency.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Dependency.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Dependency.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends>Dependency</depends>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DependencyBadNoValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DependencyBadNoValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DependencyBadNoValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <depends/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Deployment.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Deployment.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Deployment.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="Bean1" class="java.lang.Object"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <beanfactory name="Bean1" class="java.lang.Object"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanMetaDataFactory.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanMetaDataFactory.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithBeanMetaDataFactory.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithClassLoader.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithClassLoader.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithClassLoader.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <classloader><null/></classloader>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMixed.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMixed.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMixed.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="Bean1" class="java.lang.Object"/>
+   <beanfactory name="Bean2" class="java.lang.Object"/>
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory"/>
+   <bean name="Bean3" class="java.lang.Object"/>
+   <beanfactory name="Bean4" class="java.lang.Object"/>
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory1"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanFactorys.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanFactorys.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanFactorys.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <beanfactory name="Bean1" class="java.lang.Object"/>
+   <beanfactory name="Bean2" class="java.lang.Object"/>
+   <beanfactory name="Bean3" class="java.lang.Object"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanMetaDataFactorys.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanMetaDataFactorys.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeanMetaDataFactorys.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory"/>
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory1"/>
+   <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.TestBeanMetaDataFactory2"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeans.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeans.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithMultipleBeans.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0">
+   <bean name="Bean1" class="java.lang.Object"/>
+   <bean name="Bean2" class="java.lang.Object"/>
+   <bean name="Bean3" class="java.lang.Object"/>
+</deployment>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/DeploymentWithName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<deployment name="SimpleDeployment" xmlns="urn:jboss:bean-deployer:2.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryBadNoBeanOrWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryBadNoBeanOrWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryBadNoBeanOrWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory bean="Bean1"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory bean="Dummy" property="Property1"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithState.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithState.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithState.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory bean="Dummy" state="Configured"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/FactoryWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0">
+   <constructor factoryMethod="Dummy">
+      <factory>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </factory>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionBadNoBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionBadNoBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionBadNoBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Dummy">
+      <inject/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Dummy">
+      <inject bean="Bean1"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithProperty.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithProperty.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithProperty.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Dummy">
+      <inject bean="Dummy" property="Property1"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithState.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithState.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InjectionWithState.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="Dummy">
+      <inject bean="Dummy" state="Configured"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallBadNoMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallBadNoMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallBadNoMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </install>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Dummy">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </install>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install bean="Bean" method="Dummy"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Method"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameter.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameter.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameter.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Dummy">
+      <parameter class="Parameter1"/>
+   </install>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameters.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameters.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithParameters.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Dummy">
+      <parameter class="Parameter1"/>
+      <parameter class="Parameter2"/>
+      <parameter class="Parameter3"/>
+   </install>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithState.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithState.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/InstallWithState.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <install method="Dummy" state="Configured"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Lifecycle.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Lifecycle.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Lifecycle.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </create>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </create>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithIgnored.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithIgnored.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithIgnored.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create ignored="true"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithMethod.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithMethod.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithMethod.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create method="Method"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameter.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameter.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameter.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create>
+      <parameter class="Parameter1"/>
+   </create>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameters.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameters.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/LifecycleWithParameters.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <create>
+      <parameter class="Parameter1"/>
+      <parameter class="Parameter2"/>
+      <parameter class="Parameter3"/>
+   </create>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/List.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/List.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/List.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><list/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <array/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><list class="CollectionClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <collection/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithElementClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithElementClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithElementClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><list elementClass="ElementClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <inject bean="Bean"/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <list/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <map/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <null/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <set/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <this/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <value>Value</value>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ListWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <list>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </list>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Map.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Map.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Map.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><map/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><array/></key><value><array/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><map class="MapClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><collection/></key><value><collection/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><inject bean="Key"/></key><value><inject bean="Value"/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithKeyClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithKeyClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithKeyClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><map keyClass="KeyClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><list/></key><value><list/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><map/></key><value><map/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><null/></key><value><null/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><set/></key><value><set/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key><this/></key><value><this/></value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry><key>Key</key><value>Value</value></entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValueClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValueClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithValueClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><map valueClass="ValueClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MapWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <map>
+         <entry>
+            <key>
+               <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+            </key>
+            <value>
+               <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+            </value>
+         </entry>
+      </map>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MultipleAlias.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MultipleAlias.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/MultipleAlias.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <alias>alias1</alias>
+   <alias>alias2</alias>
+   <alias>alias3</alias>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Parameter.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Parameter.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Parameter.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter>
+         <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      </parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter>
+         <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+         <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+         <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+      </parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><array/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><bean name="Dummy2" class="org.jboss.test.Dummy"/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter class="ParameterClass"/>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><collection/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><inject bean="Bean"/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><list/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><map/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithPlainValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithPlainValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithPlainValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter>PlainValue</parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><set/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><this/></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter><value>Value</value></parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ParameterWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <constructor>
+      <parameter>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </parameter>
+   </constructor>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Policy.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Policy.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Policy.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <annotation xmlns="urn:jboss:bean-deployer:2.0">@org.jboss.test.Someannotaion</annotation>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithBindings.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithBindings.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithBindings.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <binding>binddnib</binding>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithExtends.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithExtends.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithExtends.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy extends="ExtendablePolicy" xmlns="urn:jboss:policy:1.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,3 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy name="NamedPolicy" xmlns="urn:jboss:policy:1.0"/>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithScope.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithScope.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PolicyWithScope.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <scope level="DefaultLevel" />
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Property.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Property.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Property.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyBadNoName.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyBadNoName.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyBadNoName.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotation.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotation.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotation.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotations.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotations.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithAnnotations.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation1</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation2</annotation>
+      <annotation>@org.jboss.test.xb.builder.object.mc.support.Annotation3</annotation>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><array/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithBean.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithBean.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithBean.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <bean name="Dummy2" class="org.jboss.test.Dummy"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName" class="PropertyClass"/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><collection/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><inject bean="Bean"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><list/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><map/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><null/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithPlainValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithPlainValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithPlainValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">PlainValue</property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><set/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><this/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><value>Value</value></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/PropertyWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Scope.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Scope.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Scope.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <scope xmlns="urn:jboss:policy:1.0"/>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithLevel.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithLevel.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithLevel.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <scope level="DefaultLevel" xmlns="urn:jboss:policy:1.0"/>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithQualifier.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithQualifier.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ScopeWithQualifier.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<policy xmlns="urn:jboss:policy:1.0">
+   <scope qualifier="SimpleQualifier" xmlns="urn:jboss:policy:1.0"/>
+</policy>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Set.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Set.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Set.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><set/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithArray.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithArray.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithArray.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <array/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><set class="CollectionClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithCollection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithCollection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithCollection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <collection/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithElementClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithElementClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithElementClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName"><set elementClass="ElementClass"/></property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithInjection.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithInjection.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithInjection.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <inject bean="Bean"/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithList.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithList.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithList.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <list/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithMap.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithMap.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithMap.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <map/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithNull.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithNull.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithNull.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <null/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithSet.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithSet.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithSet.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <set/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithThis.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithThis.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithThis.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <this/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <value>Value</value>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithWildcard.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithWildcard.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SetWithWildcard.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <set>
+         <javabean xmlns="test:javabean" class="org.jboss.test.xb.builder.object.mc.support.SerializableObject"/>
+      </set>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Supply.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Supply.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Supply.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply>Supply</supply>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SupplyBadNoValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SupplyBadNoValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/SupplyBadNoValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <supply/>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Value.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Value.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/Value.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <value/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithClass.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithClass.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithClass.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <value class="ValueClass"/>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithValue.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithValue.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/mc/test/ValueWithValue.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<bean xmlns="urn:jboss:bean-deployer:2.0" class="Dummy">
+   <property name="PropertyName">
+      <value>Value</value>
+   </property>
+</bean>

Added: jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapter.xml
===================================================================
--- jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapter.xml	                        (rev 0)
+++ jbossxb-builder/trunk/src/test/resources/org/jboss/test/xb/builder/object/type/xmltype/test/BeanAdapter.xml	2007-05-25 13:24:40 UTC (rev 2398)
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<adapted>
+   <property1>property1</property1>
+   <property2>property2</property2>
+</adapted>
\ No newline at end of file




More information about the jboss-svn-commits mailing list