├── CONTRIBUTING.md ├── LICENSE ├── basics ├── ant │ ├── .classpath │ ├── .project │ ├── pom.xml │ └── src │ │ └── main │ │ └── java │ │ └── org │ │ └── jvnet │ │ └── jaxb2_commons │ │ └── xjc │ │ └── XJC2Task.java ├── basic │ ├── .classpath │ ├── .project │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── plugin │ │ │ │ ├── Customizations.java │ │ │ │ ├── CustomizedIgnoring.java │ │ │ │ ├── Ignoring.java │ │ │ │ ├── autoinheritance │ │ │ │ └── AutoInheritancePlugin.java │ │ │ │ ├── copyable │ │ │ │ ├── CopyablePlugin.java │ │ │ │ └── Customizations.java │ │ │ │ ├── elementwrapper │ │ │ │ ├── Customizations.java │ │ │ │ ├── ElementWrapperPlugin.java │ │ │ │ └── ElementWrapperPlugin1.java │ │ │ │ ├── enumvalue │ │ │ │ ├── Customizations.java │ │ │ │ └── EnumValuePlugin.java │ │ │ │ ├── equals │ │ │ │ ├── Customizations.java │ │ │ │ └── EqualsPlugin.java │ │ │ │ ├── hashcode │ │ │ │ ├── Customizations.java │ │ │ │ └── HashCodePlugin.java │ │ │ │ ├── inheritance │ │ │ │ ├── Customizations.java │ │ │ │ ├── ExtendsClass.java │ │ │ │ ├── ImplementsInterface.java │ │ │ │ ├── InheritancePlugin.java │ │ │ │ ├── ObjectFactory.java │ │ │ │ ├── ObjectFactoryCustomization.java │ │ │ │ └── util │ │ │ │ │ ├── JavaTypeParser.java │ │ │ │ │ └── TypeToJTypeConvertingVisitor.java │ │ │ │ ├── jaxbindex │ │ │ │ └── JaxbIndexPlugin.java │ │ │ │ ├── mergeable │ │ │ │ ├── Customizations.java │ │ │ │ └── MergeablePlugin.java │ │ │ │ ├── model │ │ │ │ └── AbstractModelPlugin.java │ │ │ │ ├── setters │ │ │ │ ├── Customizations.java │ │ │ │ └── SettersPlugin.java │ │ │ │ ├── simplify │ │ │ │ ├── Customizations.java │ │ │ │ └── SimplifyPlugin.java │ │ │ │ ├── tostring │ │ │ │ ├── Customizations.java │ │ │ │ └── ToStringPlugin.java │ │ │ │ ├── util │ │ │ │ ├── ArrayUtils.java │ │ │ │ ├── FieldOutlineUtils.java │ │ │ │ ├── Predicate.java │ │ │ │ └── StrategyClassUtils.java │ │ │ │ └── wildcard │ │ │ │ ├── Customizations.java │ │ │ │ └── WildcardPlugin.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── com.sun.tools.xjc.Plugin │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── plugin │ │ │ ├── copyable │ │ │ └── tests │ │ │ │ └── RunCopyablePlugin.java │ │ │ ├── equals │ │ │ └── tests │ │ │ │ └── RunEqualsPlugin.java │ │ │ ├── inheritance │ │ │ └── tests │ │ │ │ ├── JavaParserTest.java │ │ │ │ └── JavaTypeParserTest.java │ │ │ ├── mergeable │ │ │ └── tests │ │ │ │ └── RunMergeablePlugin.java │ │ │ └── tostring │ │ │ └── tests │ │ │ └── RunToStringPlugin.java │ │ └── resources │ │ └── schema.xsd ├── build-1.6.bat ├── deploy.bat ├── dist │ ├── pom.xml │ └── src │ │ └── main │ │ └── assembly │ │ ├── dist-with-dependencies.xml │ │ └── dist.xml ├── install-1.6.bat ├── install.bat ├── jaxb │ ├── pom.xml │ ├── release.bat │ └── xjc │ │ └── pom.xml ├── pom.xml ├── qrelease.bat ├── release.bat ├── runtime │ ├── .classpath │ ├── .project │ ├── pom.xml │ └── src │ │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ ├── i18n │ │ │ │ └── Reportable.java │ │ │ │ ├── lang │ │ │ │ ├── ClassUtils.java │ │ │ │ ├── ContextUtils.java │ │ │ │ ├── CopyStrategy.java │ │ │ │ ├── CopyTo.java │ │ │ │ ├── DefaultCopyStrategy.java │ │ │ │ ├── DefaultEqualsStrategy.java │ │ │ │ ├── DefaultHashCodeStrategy.java │ │ │ │ ├── DefaultMergeStrategy.java │ │ │ │ ├── DefaultToStringStrategy.java │ │ │ │ ├── EnumValue.java │ │ │ │ ├── Equals.java │ │ │ │ ├── EqualsStrategy.java │ │ │ │ ├── HashCode.java │ │ │ │ ├── HashCodeStrategy.java │ │ │ │ ├── JAXBCopyStrategy.java │ │ │ │ ├── JAXBEqualsStrategy.java │ │ │ │ ├── JAXBHashCodeStrategy.java │ │ │ │ ├── JAXBMergeCollectionsStrategy.java │ │ │ │ ├── JAXBMergeStrategy.java │ │ │ │ ├── JAXBToStringStrategy.java │ │ │ │ ├── MergeFrom.java │ │ │ │ ├── MergeStrategy.java │ │ │ │ ├── StringUtils.java │ │ │ │ ├── ToString.java │ │ │ │ ├── ToStringStrategy.java │ │ │ │ └── Validate.java │ │ │ │ ├── locator │ │ │ │ ├── AbstractObjectLocator.java │ │ │ │ ├── DefaultItemObjectLocator.java │ │ │ │ ├── DefaultPropertyObjectLocator.java │ │ │ │ ├── DefaultRootObjectLocator.java │ │ │ │ ├── ItemObjectLocator.java │ │ │ │ ├── ObjectLocator.java │ │ │ │ ├── PropertyObjectLocator.java │ │ │ │ ├── RootObjectLocator.java │ │ │ │ └── util │ │ │ │ │ └── LocatorUtils.java │ │ │ │ ├── xml │ │ │ │ └── bind │ │ │ │ │ ├── AfterMarshallCallback.java │ │ │ │ │ ├── AfterUnmarshallCallback.java │ │ │ │ │ ├── BeforeMarshallCallback.java │ │ │ │ │ ├── BeforeUnmarshallCallback.java │ │ │ │ │ ├── ContextPathAware.java │ │ │ │ │ ├── annotation │ │ │ │ │ └── adapters │ │ │ │ │ │ └── CommaDelimitedStringAdapter.java │ │ │ │ │ └── model │ │ │ │ │ ├── MAnyAttributePropertyInfo.java │ │ │ │ │ ├── MAnyElementPropertyInfo.java │ │ │ │ │ ├── MAttributePropertyInfo.java │ │ │ │ │ ├── MBuiltinLeafInfo.java │ │ │ │ │ ├── MClassInfo.java │ │ │ │ │ ├── MClassRef.java │ │ │ │ │ ├── MClassTypeInfo.java │ │ │ │ │ ├── MClassTypeInfoVisitor.java │ │ │ │ │ ├── MContained.java │ │ │ │ │ ├── MContainer.java │ │ │ │ │ ├── MCustomizable.java │ │ │ │ │ ├── MCustomization.java │ │ │ │ │ ├── MCustomizations.java │ │ │ │ │ ├── MElementInfo.java │ │ │ │ │ ├── MElementPropertyInfo.java │ │ │ │ │ ├── MElementRefPropertyInfo.java │ │ │ │ │ ├── MElementRefsPropertyInfo.java │ │ │ │ │ ├── MElementTypeInfo.java │ │ │ │ │ ├── MElementTypeInfos.java │ │ │ │ │ ├── MElementsPropertyInfo.java │ │ │ │ │ ├── MEnumConstantInfo.java │ │ │ │ │ ├── MEnumLeafInfo.java │ │ │ │ │ ├── MID.java │ │ │ │ │ ├── MIDREF.java │ │ │ │ │ ├── MIDREFS.java │ │ │ │ │ ├── MList.java │ │ │ │ │ ├── MMixable.java │ │ │ │ │ ├── MModelInfo.java │ │ │ │ │ ├── MPackageInfo.java │ │ │ │ │ ├── MPackaged.java │ │ │ │ │ ├── MPackagedTypeInfo.java │ │ │ │ │ ├── MPackagedTypeInfoVisitor.java │ │ │ │ │ ├── MPropertyInfo.java │ │ │ │ │ ├── MPropertyInfoVisitor.java │ │ │ │ │ ├── MSingleTypePropertyInfo.java │ │ │ │ │ ├── MSourced.java │ │ │ │ │ ├── MTargeted.java │ │ │ │ │ ├── MTransientPropertyInfo.java │ │ │ │ │ ├── MTypeInfo.java │ │ │ │ │ ├── MTypeInfoVisitor.java │ │ │ │ │ ├── MTyped.java │ │ │ │ │ ├── MValuePropertyInfo.java │ │ │ │ │ ├── MWildcard.java │ │ │ │ │ ├── MWildcardTypeInfo.java │ │ │ │ │ ├── MWrappable.java │ │ │ │ │ ├── concrete │ │ │ │ │ ├── CMAnyAttributePropertyInfo.java │ │ │ │ │ ├── CMAnyElementPropertyInfo.java │ │ │ │ │ ├── CMAttributePropertyInfo.java │ │ │ │ │ ├── CMBuiltinLeafInfo.java │ │ │ │ │ ├── CMClassInfo.java │ │ │ │ │ ├── CMClassRef.java │ │ │ │ │ ├── CMCustomization.java │ │ │ │ │ ├── CMCustomizations.java │ │ │ │ │ ├── CMElementInfo.java │ │ │ │ │ ├── CMElementPropertyInfo.java │ │ │ │ │ ├── CMElementRefPropertyInfo.java │ │ │ │ │ ├── CMElementRefsPropertyInfo.java │ │ │ │ │ ├── CMElementTypeInfo.java │ │ │ │ │ ├── CMElementsPropertyInfo.java │ │ │ │ │ ├── CMEnumConstantInfo.java │ │ │ │ │ ├── CMEnumLeafInfo.java │ │ │ │ │ ├── CMID.java │ │ │ │ │ ├── CMIDREF.java │ │ │ │ │ ├── CMIDREFS.java │ │ │ │ │ ├── CMInfoFactory.java │ │ │ │ │ ├── CMList.java │ │ │ │ │ ├── CMModel.java │ │ │ │ │ ├── CMPackageInfo.java │ │ │ │ │ ├── CMPropertyInfo.java │ │ │ │ │ ├── CMSingleTypePropertyInfo.java │ │ │ │ │ ├── CMValuePropertyInfo.java │ │ │ │ │ ├── CMWildcardTypeInfo.java │ │ │ │ │ └── origin │ │ │ │ │ │ ├── BuiltinLeafInfoOrigin.java │ │ │ │ │ │ ├── CMAnyAttributePropertyInfoOrigin.java │ │ │ │ │ │ ├── CMBuiltinLeafInfoOrigin.java │ │ │ │ │ │ ├── CMClassElementInfoOrigin.java │ │ │ │ │ │ ├── CMClassInfoOrigin.java │ │ │ │ │ │ ├── CMElementInfoOrigin.java │ │ │ │ │ │ ├── CMEnumConstantInfoOrigin.java │ │ │ │ │ │ ├── CMEnumElementInfoOrigin.java │ │ │ │ │ │ ├── CMEnumLeafInfoOrigin.java │ │ │ │ │ │ ├── CMModelInfoOrigin.java │ │ │ │ │ │ ├── CMPackageInfoOrigin.java │ │ │ │ │ │ ├── CMPropertyInfoOrigin.java │ │ │ │ │ │ ├── CMWildcardTypeInfoOrigin.java │ │ │ │ │ │ ├── ClassInfoOrigin.java │ │ │ │ │ │ ├── ElementInfoOrigin.java │ │ │ │ │ │ ├── EnumConstantOrigin.java │ │ │ │ │ │ ├── EnumLeafInfoOrigin.java │ │ │ │ │ │ ├── PropertyInfoOrigin.java │ │ │ │ │ │ ├── TypeInfoSetOrigin.java │ │ │ │ │ │ └── WildcardTypeInfoOrigin.java │ │ │ │ │ ├── origin │ │ │ │ │ ├── MBuiltinLeafInfoOrigin.java │ │ │ │ │ ├── MClassInfoOrigin.java │ │ │ │ │ ├── MElementInfoOrigin.java │ │ │ │ │ ├── MEnumConstantInfoOrigin.java │ │ │ │ │ ├── MEnumLeafInfoOrigin.java │ │ │ │ │ ├── MModelInfoOrigin.java │ │ │ │ │ ├── MOriginated.java │ │ │ │ │ ├── MPackageInfoOrigin.java │ │ │ │ │ ├── MPropertyInfoOrigin.java │ │ │ │ │ └── MWildcardTypeInfoOrigin.java │ │ │ │ │ └── util │ │ │ │ │ ├── DefaultPropertyInfoVisitor.java │ │ │ │ │ ├── DefaultTypeInfoVisitor.java │ │ │ │ │ ├── PackageInfoQNameAnalyzer.java │ │ │ │ │ ├── QNameCollectingPropertyInfoVisitor.java │ │ │ │ │ └── QNameCollector.java │ │ │ │ └── xmlschema │ │ │ │ └── XmlSchemaConstants.java │ │ └── resources │ │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── locator │ │ │ └── messages.properties │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── lang │ │ │ └── tests │ │ │ ├── CopyStrategyTest.java │ │ │ └── CyclicTests.java │ │ └── resources │ │ └── org │ │ └── jvnet │ │ └── jaxb2_commons │ │ └── lang │ │ ├── builder │ │ └── .gitkeep │ │ └── tests │ │ └── Test[0].xml ├── samples │ ├── basic │ │ ├── pom.xml │ │ ├── project-build.xml │ │ ├── project-pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── assembly │ │ │ │ └── src.xml │ │ │ ├── java │ │ │ │ └── .placeholder │ │ │ └── resources │ │ │ │ └── schema.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── one │ │ │ │ ├── CopyableTest.java │ │ │ │ ├── EqualsTest.java │ │ │ │ └── ToStringTest.java │ │ │ ├── resources │ │ │ └── log4j.properties │ │ │ └── samples │ │ │ └── 1.xml │ ├── modular-ant │ │ ├── pom.xml │ │ ├── project-build.xml │ │ └── src │ │ │ ├── main │ │ │ ├── assembly │ │ │ │ └── src.xml │ │ │ ├── java │ │ │ │ └── .placeholder │ │ │ └── resources │ │ │ │ └── schema.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── one │ │ │ │ ├── CopyableTest.java │ │ │ │ ├── EqualsTest.java │ │ │ │ └── ToStringTest.java │ │ │ ├── resources │ │ │ └── log4j.properties │ │ │ └── samples │ │ │ └── 1.xml │ ├── po │ │ ├── pom.xml │ │ ├── project-build.xml │ │ ├── project-pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── .placeholder │ │ │ └── resources │ │ │ │ ├── bindings.xjb │ │ │ │ └── purchaseorder.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── po │ │ │ │ ├── CopyableTest.java │ │ │ │ ├── EqualsTest.java │ │ │ │ └── ToStringTest.java │ │ │ ├── resources │ │ │ └── log4j.properties │ │ │ └── samples │ │ │ └── po.xml │ ├── pom.xml │ └── src │ │ └── main │ │ └── assembly │ │ ├── ant-src.xml │ │ └── maven-src.xml ├── testing │ ├── .classpath │ ├── .project │ ├── .settings │ │ ├── org.eclipse.core.resources.prefs │ │ └── org.eclipse.jdt.core.prefs │ ├── pom.xml │ └── src │ │ ├── main │ │ └── java │ │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ ├── lang │ │ │ └── ExtendedJAXBEqualsStrategy.java │ │ │ └── test │ │ │ └── AbstractSamplesTest.java │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── test │ │ │ └── tests │ │ │ └── TrivialSamplesTest.java │ │ └── samples │ │ ├── 1.xml │ │ └── 2.xml ├── tests │ ├── build-1.5.bat │ ├── build-1.6.bat │ ├── episodes │ │ ├── a │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── resources │ │ │ │ │ ├── a.xsd │ │ │ │ │ └── binding.xjb │ │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── .gitkeep │ │ │ │ ├── resources │ │ │ │ └── .gitkeep │ │ │ │ └── samples │ │ │ │ └── 1.xml │ │ ├── b │ │ │ ├── pom.xml │ │ │ └── src │ │ │ │ ├── main │ │ │ │ └── resources │ │ │ │ │ ├── a.xsd │ │ │ │ │ ├── b.xsd │ │ │ │ │ └── binding.xjb │ │ │ │ └── test │ │ │ │ ├── java │ │ │ │ └── .gitkeep │ │ │ │ ├── resources │ │ │ │ └── .gitkeep │ │ │ │ └── samples │ │ │ │ └── 1.xml │ │ └── pom.xml │ ├── ignoring │ │ ├── pom.xml │ │ └── src │ │ │ └── main │ │ │ └── resources │ │ │ └── schema.xsd │ ├── issues │ │ ├── .classpath │ │ ├── .project │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── org │ │ │ │ │ └── jvnet │ │ │ │ │ └── jaxb2_commons │ │ │ │ │ └── tests │ │ │ │ │ └── issues │ │ │ │ │ ├── IssueJIIB14BaseClass.java │ │ │ │ │ ├── IssueJIIB14BaseInterfaceFour.java │ │ │ │ │ ├── IssueJIIB14BaseInterfaceOne.java │ │ │ │ │ ├── IssueJIIB14BaseInterfaceThree.java │ │ │ │ │ ├── IssueJIIB14BaseInterfaceTwo.java │ │ │ │ │ ├── IssueJIIB42EqualsStrategy.java │ │ │ │ │ ├── IssueJIIB48Interface.java │ │ │ │ │ └── IssueJIIB53ABaseClass.java │ │ │ └── resources │ │ │ │ ├── binding.xjb │ │ │ │ └── schema.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── issues │ │ │ │ ├── CopyableTest.java │ │ │ │ ├── JIIB10Test.java │ │ │ │ ├── JIIB14Test.java │ │ │ │ ├── JIIB20Test.java │ │ │ │ ├── JIIB35Test.java │ │ │ │ ├── JIIB36Test.java │ │ │ │ ├── JIIB38Test.java │ │ │ │ ├── JIIB44Test.java │ │ │ │ ├── JIIB8Test.java │ │ │ │ └── RunIssuesPlugin.java │ │ │ ├── resources │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── issues │ │ │ │ ├── issueJIIB44_0.xml │ │ │ │ ├── issueJIIB44_1.xml │ │ │ │ └── issueJIIB44_2.xml │ │ │ └── samples │ │ │ └── issue16[0].xml │ ├── one │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ └── resources │ │ │ │ ├── binding.xjb │ │ │ │ └── schema.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── tests │ │ │ │ └── one │ │ │ │ ├── CopyableTest.java │ │ │ │ ├── EqualsTest.java │ │ │ │ ├── HashCodeTest.java │ │ │ │ ├── RunOnePlugin.java │ │ │ │ └── ToStringTest.java │ │ │ ├── resources │ │ │ └── log4j.properties │ │ │ └── samples │ │ │ ├── 1.xml │ │ │ └── 2.xml │ ├── pom.xml │ ├── wildcard │ │ ├── .classpath │ │ ├── .project │ │ ├── .settings │ │ │ ├── org.eclipse.core.resources.prefs │ │ │ └── org.eclipse.jdt.core.prefs │ │ ├── pom.xml │ │ └── src │ │ │ ├── main │ │ │ ├── java │ │ │ │ └── .gitkeep │ │ │ └── resources │ │ │ │ ├── binding.xjb │ │ │ │ └── schema.xsd │ │ │ └── test │ │ │ ├── java │ │ │ └── .gitkeep │ │ │ ├── resources │ │ │ └── .gitkeep │ │ │ └── samples │ │ │ └── .gitkeep │ └── zj │ │ ├── pom.xml │ │ └── src │ │ ├── main │ │ └── resources │ │ │ └── ObisData.xsd │ │ └── test │ │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── tests │ │ │ └── zj │ │ │ └── EqualsTest.java │ │ ├── resources │ │ └── log4j.properties │ │ └── samples │ │ └── MediaCatalogue.xml └── tools │ ├── .classpath │ ├── .project │ ├── pom.xml │ └── src │ └── main │ └── java │ └── org │ └── jvnet │ └── jaxb2_commons │ ├── plugin │ ├── AbstractParameterizablePlugin.java │ ├── AbstractPlugin.java │ └── spring │ │ └── AbstractSpringConfigurablePlugin.java │ ├── strategy │ ├── ClassOutlineProcessor.java │ ├── FieldOutlineProcessor.java │ ├── OutlineProcessor.java │ ├── PackageOutlineProcessor.java │ └── impl │ │ └── DefaultOutlineProcessor.java │ ├── util │ ├── ClassUtils.java │ ├── CodeModelUtils.java │ ├── CustomizationUtils.java │ ├── FieldAccessorFactory.java │ ├── FieldAccessorUtils.java │ ├── FieldUtils.java │ ├── GeneratorContextUtils.java │ ├── OutlineUtils.java │ └── PropertyFieldAccessorFactory.java │ └── xjc │ ├── generator │ ├── MClassOutlineGenerator.java │ ├── MElementOutlineGenerator.java │ ├── MEnumConstantOutlineGenerator.java │ ├── MEnumOutlineGenerator.java │ ├── MModelOutlineGenerator.java │ ├── MObjectFactoryOutlineGenerator.java │ ├── MPackageOutlineGenerator.java │ ├── MPropertyOutlineGenerator.java │ ├── artificial │ │ └── WrapperPropertyOutlineGenerator.java │ ├── concrete │ │ ├── CMClassOutlineGenerator.java │ │ ├── CMElementOutlineGenerator.java │ │ ├── CMEnumConstantOutlineGenerator.java │ │ ├── CMEnumOutlineGenerator.java │ │ ├── CMModelOutlineGenerator.java │ │ ├── CMPackageOutlineGenerator.java │ │ ├── CMPropertyOutlineGenerator.java │ │ ├── ClassOutlineGeneratorFactory.java │ │ ├── ElementOutlineGeneratorFactory.java │ │ ├── EnumConstantOutlineGeneratorFactory.java │ │ ├── EnumOutlineGeneratorFactory.java │ │ ├── ModelOutlineGeneratorFactory.java │ │ ├── OutlineGeneratorFactory.java │ │ ├── PackageOutlineGeneratorFactory.java │ │ └── PropertyOutlineGeneratorFactory.java │ └── outline │ │ └── .gitkeep │ ├── model │ └── concrete │ │ ├── XJCCMInfoFactory.java │ │ └── origin │ │ ├── DefaultPropertyInfoOrigin.java │ │ ├── DummyPropertyInfoOrigin.java │ │ ├── PackageInfoOrigin.java │ │ ├── XJCCMClassInfoOrigin.java │ │ ├── XJCCMElementInfoOrigin.java │ │ ├── XJCCMEnumConstantInfoOrigin.java │ │ ├── XJCCMEnumLeafInfoOrigin.java │ │ ├── XJCCMModelInfoOrigin.java │ │ ├── XJCCMPackageInfoOrigin.java │ │ └── XJCCMPropertyInfoOrigin.java │ └── outline │ ├── FieldAccessorEx.java │ ├── MChildOutline.java │ ├── MClassOutline.java │ ├── MElementOutline.java │ ├── MEnumConstantOutline.java │ ├── MEnumOutline.java │ ├── MModelOutline.java │ ├── MObjectFactoryOutline.java │ ├── MPackageOutline.java │ ├── MPackagedOutline.java │ ├── MPropertyAccessor.java │ ├── MPropertyAccessorFactory.java │ ├── MPropertyOutline.java │ ├── artificial │ ├── AbstractPropertyAccessorFactory.java │ ├── AbstractPropertyOutline.java │ ├── AbstractSinglePropertyOutline.java │ ├── AnnotatePropertyVisitor.java │ ├── AnyAttributePropertyOutline.java │ ├── ConstantPropertyOutline.java │ ├── PropertyTypeVisitor.java │ └── SinglePropertyOutline.java │ └── concrete │ ├── CMClassOutline.java │ ├── CMElementOutline.java │ ├── CMEnumConstantOutline.java │ ├── CMEnumOutline.java │ ├── CMModelOutline.java │ ├── CMObjectFactoryOutline.java │ ├── CMPackageOutline.java │ ├── CMPropertyAccessor.java │ ├── CMPropertyAccessorFactory.java │ └── CMPropertyOutline.java ├── commons-lang-plugin ├── .classpath ├── .project ├── .settings │ ├── org.eclipse.core.resources.prefs │ ├── org.eclipse.jdt.core.prefs │ └── org.eclipse.m2e.core.prefs ├── LICENSE ├── NOTICE ├── pom.xml └── src │ └── main │ ├── java │ └── com │ │ └── sun │ │ └── tools │ │ └── xjc │ │ └── addon │ │ └── commons_lang │ │ └── XjcCommonsLangPlugin.java │ └── resources │ └── META-INF │ └── services │ └── com.sun.tools.xjc.Plugin ├── default-value-plugin ├── pom.xml ├── src │ ├── main │ │ ├── java │ │ │ └── org │ │ │ │ └── jvnet │ │ │ │ └── jaxb2_commons │ │ │ │ └── plugin │ │ │ │ └── defaultvalueplugin │ │ │ │ └── DefaultValuePlugin.java │ │ └── resources │ │ │ └── META-INF │ │ │ └── services │ │ │ └── com.sun.tools.xjc.Plugin │ └── test │ │ ├── java │ │ └── .gitkeep │ │ └── resources │ │ └── .gitkeep └── tests │ └── person │ ├── pom.xml │ └── src │ └── main │ └── resources │ └── Person.xsd ├── fluent-api ├── LICENSE ├── NOTICE ├── pom.xml └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── jvnet │ │ │ └── jaxb2_commons │ │ │ └── plugin │ │ │ └── fluent_api │ │ │ ├── FluentApiPlugin.java │ │ │ ├── FluentMethodInfo.java │ │ │ └── FluentMethodType.java │ └── resources │ │ └── META-INF │ │ └── services │ │ └── com.sun.tools.xjc.Plugin │ └── test │ └── schema │ └── test.xsd ├── namespace-prefix ├── LICENSE ├── NOTICE ├── pom.xml └── src │ └── main │ ├── java │ └── org │ │ └── jvnet │ │ └── jaxb2_commons │ │ └── plugin │ │ └── namespace_prefix │ │ └── NamespacePrefixPlugin.java │ └── resources │ ├── META-INF │ └── services │ │ └── com.sun.tools.xjc.Plugin │ └── prefix-namespace-schema.xsd └── value-constructor ├── LICENSE ├── NOTICE ├── pom.xml └── src ├── main ├── java │ └── org │ │ └── jvnet │ │ └── jaxb2_commons │ │ └── plugin │ │ └── value_constructor │ │ └── ValueConstructorPlugin.java └── resources │ └── META-INF │ └── services │ └── com.sun.tools.xjc.Plugin └── test └── schema └── test.xsd /basics/ant/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /basics/ant/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-ant 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/ant/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | org.jvnet.jaxb2_commons 6 | jaxb2-basics-ant 7 | jar 8 | JAXB2 Basics - Ant Task 9 | 10 | org.jvnet.jaxb2_commons 11 | jaxb2-basics-project 12 | 0.8.3-SNAPSHOT 13 | ../pom.xml 14 | 15 | 16 | 17 | com.sun.xml.bind 18 | jaxb-xjc 19 | provided 20 | 21 | 22 | org.apache.ant 23 | ant 24 | provided 25 | 26 | 27 | org.apache.ant 28 | ant-launcher 29 | test 30 | 31 | 32 | 33 | install 34 | 35 | -------------------------------------------------------------------------------- /basics/ant/src/main/java/org/jvnet/jaxb2_commons/xjc/XJC2Task.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc; 2 | 3 | import java.io.File; 4 | import java.lang.reflect.Field; 5 | 6 | import org.apache.tools.ant.BuildException; 7 | import org.apache.tools.ant.types.Path; 8 | 9 | public class XJC2Task extends com.sun.tools.xjc.XJC2Task { 10 | 11 | @Override 12 | public void execute() throws BuildException { 13 | 14 | hack(); 15 | super.execute(); 16 | } 17 | 18 | protected void hack() { 19 | try { 20 | final Field declaredField = getClass().getSuperclass() 21 | .getDeclaredField("classpath"); 22 | declaredField.setAccessible(true); 23 | final Path path = (Path) declaredField.get(this); 24 | if (path != null) { 25 | for (String pathElement : path.list()) { 26 | options.classpaths.add(new File(pathElement).toURI() 27 | .toURL()); 28 | } 29 | } 30 | } catch (Exception ex) { 31 | throw new BuildException(ex); 32 | } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /basics/basic/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /basics/basic/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic"; 8 | 9 | public static QName GENERATED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "generated"); 11 | 12 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 13 | "ignored"); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/Ignoring.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin; 2 | 3 | import com.sun.tools.xjc.model.CClassInfo; 4 | import com.sun.tools.xjc.model.CEnumLeafInfo; 5 | import com.sun.tools.xjc.model.CPropertyInfo; 6 | import com.sun.tools.xjc.outline.ClassOutline; 7 | import com.sun.tools.xjc.outline.EnumOutline; 8 | import com.sun.tools.xjc.outline.FieldOutline; 9 | 10 | public interface Ignoring { 11 | 12 | public boolean isIgnored(ClassOutline classOutline); 13 | 14 | public boolean isIgnored(EnumOutline enumOutline); 15 | 16 | public boolean isIgnored(FieldOutline fieldOutline); 17 | 18 | public boolean isIgnored(CClassInfo classInfo); 19 | 20 | public boolean isIgnored(CEnumLeafInfo enumLeafInfo); 21 | 22 | public boolean isIgnored(CPropertyInfo propertyInfo); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/copyable/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.copyable; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/copyable"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/elementwrapper/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.elementwrapper; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/elementWrapper"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/enumvalue/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.enumvalue; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/enumvalue"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/equals/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.equals; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/equals"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/hashcode/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.hashcode; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/hashCode"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/inheritance/ExtendsClass.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.inheritance; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | import javax.xml.bind.annotation.XmlValue; 7 | import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; 8 | import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 9 | 10 | @XmlRootElement(namespace = "http://jaxb2-commons.dev.java.net/basic/inheritance", name = "extends") 11 | @XmlAccessorType(XmlAccessType.PROPERTY) 12 | public class ExtendsClass { 13 | 14 | private String className; 15 | 16 | @XmlValue 17 | @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class) 18 | String getClassName() { 19 | return className; 20 | } 21 | 22 | public void setClassName(String className) { 23 | this.className = className; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/inheritance/ImplementsInterface.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.inheritance; 2 | 3 | import javax.xml.bind.annotation.XmlAccessType; 4 | import javax.xml.bind.annotation.XmlAccessorType; 5 | import javax.xml.bind.annotation.XmlRootElement; 6 | import javax.xml.bind.annotation.XmlValue; 7 | import javax.xml.bind.annotation.adapters.CollapsedStringAdapter; 8 | import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter; 9 | 10 | @XmlRootElement(namespace = "http://jaxb2-commons.dev.java.net/basic/inheritance", name = "implements") 11 | @XmlAccessorType(XmlAccessType.PUBLIC_MEMBER) 12 | public class ImplementsInterface { 13 | 14 | private String interfaceName; 15 | 16 | @XmlValue 17 | @XmlJavaTypeAdapter(value = CollapsedStringAdapter.class) 18 | public String getInterfaceName() { 19 | return interfaceName; 20 | } 21 | 22 | public void setInterfaceName(String interfaceName) { 23 | this.interfaceName = interfaceName; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/inheritance/ObjectFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.inheritance; 2 | 3 | import javax.xml.bind.annotation.XmlRegistry; 4 | 5 | @XmlRegistry 6 | public class ObjectFactory { 7 | 8 | public ExtendsClass createExtendsClass() { 9 | return new ExtendsClass(); 10 | } 11 | 12 | public ImplementsInterface createImplementsInterface() { 13 | return new ImplementsInterface(); 14 | } 15 | 16 | public ObjectFactoryCustomization createObjectFactoryCustomization() { 17 | return new ObjectFactoryCustomization(); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/jaxbindex/JaxbIndexPlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.jaxbindex; 2 | 3 | import org.jvnet.jaxb2_commons.util.CodeModelUtils; 4 | import org.xml.sax.ErrorHandler; 5 | 6 | import com.sun.codemodel.fmt.JTextFile; 7 | import com.sun.tools.xjc.Options; 8 | import com.sun.tools.xjc.outline.ClassOutline; 9 | import com.sun.tools.xjc.outline.Outline; 10 | import com.sun.tools.xjc.outline.PackageOutline; 11 | 12 | public class JaxbIndexPlugin extends com.sun.tools.xjc.Plugin { 13 | 14 | public String getOptionName() { 15 | return "Xjaxbindex"; 16 | } 17 | 18 | public String getUsage() { 19 | return "-Xjaxbindex: generate per-package jaxb.index file"; 20 | } 21 | 22 | @Override 23 | public boolean run(Outline outline, Options opt, ErrorHandler errorHandler) { 24 | 25 | for (final PackageOutline packageOutline : outline 26 | .getAllPackageContexts()) { 27 | final StringBuilder sb = new StringBuilder(); 28 | for (final ClassOutline classOutline : packageOutline.getClasses()) { 29 | sb.append(CodeModelUtils.getLocalClassName(classOutline.ref)); 30 | sb.append("\n"); 31 | } 32 | 33 | final JTextFile indexFile = new JTextFile("jaxb.index"); 34 | indexFile.setContents(sb.toString()); 35 | packageOutline._package().addResourceFile(indexFile); 36 | } 37 | return true; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/mergeable/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.mergeable; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/mergeable"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/setters/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.setters; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/collectionsetters"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/simplify/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.simplify; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/simplify"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | public static QName AS_ELEMENT_PROPERTY_ELEMENT_NAME = new QName( 13 | NAMESPACE_URI, "as-element-property"); 14 | 15 | public static QName AS_REFERENCE_PROPERTY_ELEMENT_NAME = new QName( 16 | NAMESPACE_URI, "as-reference-property"); 17 | 18 | } 19 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/tostring/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.tostring; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/toString"; 8 | 9 | public static QName IGNORED_ELEMENT_NAME = new QName(NAMESPACE_URI, 10 | "ignored"); 11 | 12 | } 13 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/util/ArrayUtils.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.util; 2 | 3 | import java.lang.reflect.Array; 4 | import java.util.LinkedList; 5 | import java.util.List; 6 | 7 | public class ArrayUtils { 8 | 9 | private ArrayUtils() { 10 | 11 | } 12 | 13 | public static T[] filter(T[] array, Predicate predicate, 14 | Class theClass) { 15 | 16 | if (array == null) { 17 | return null; 18 | } else { 19 | final List list = new LinkedList(); 20 | for (T item : array) { 21 | if (predicate.evaluate(item)) { 22 | list.add(item); 23 | } 24 | } 25 | @SuppressWarnings("unchecked") 26 | final T[] newArray = (T[]) Array.newInstance(theClass, list.size()); 27 | return list.toArray(newArray); 28 | } 29 | 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/util/FieldOutlineUtils.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.util; 2 | 3 | import org.jvnet.jaxb2_commons.plugin.Ignoring; 4 | 5 | import com.sun.tools.xjc.outline.FieldOutline; 6 | 7 | public class FieldOutlineUtils { 8 | 9 | private FieldOutlineUtils() { 10 | 11 | } 12 | 13 | public static FieldOutline[] filter(final FieldOutline[] fieldOutlines, 14 | final Ignoring ignoring) { 15 | return ArrayUtils.filter(fieldOutlines, new Predicate() { 16 | public boolean evaluate(FieldOutline fieldOutline) { 17 | return !ignoring.isIgnored(fieldOutline); 18 | 19 | } 20 | }, FieldOutline.class); 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/util/Predicate.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.util; 2 | 3 | public interface Predicate { 4 | 5 | public boolean evaluate(T object); 6 | 7 | } -------------------------------------------------------------------------------- /basics/basic/src/main/java/org/jvnet/jaxb2_commons/plugin/wildcard/Customizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.wildcard; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public class Customizations { 6 | 7 | public static String NAMESPACE_URI = "http://jaxb2-commons.dev.java.net/basic/wildcard"; 8 | 9 | public static QName LAX_ELEMENT_NAME = new QName(NAMESPACE_URI, "lax"); 10 | public static QName STRICT_ELEMENT_NAME = new QName(NAMESPACE_URI, "strict"); 11 | public static QName SKIP_ELEMENT_NAME = new QName(NAMESPACE_URI, "skip"); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /basics/basic/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2_commons.plugin.jaxbindex.JaxbIndexPlugin 2 | org.jvnet.jaxb2_commons.plugin.tostring.ToStringPlugin 3 | org.jvnet.jaxb2_commons.plugin.equals.EqualsPlugin 4 | org.jvnet.jaxb2_commons.plugin.hashcode.HashCodePlugin 5 | org.jvnet.jaxb2_commons.plugin.copyable.CopyablePlugin 6 | org.jvnet.jaxb2_commons.plugin.mergeable.MergeablePlugin 7 | org.jvnet.jaxb2_commons.plugin.inheritance.InheritancePlugin 8 | org.jvnet.jaxb2_commons.plugin.setters.SettersPlugin 9 | org.jvnet.jaxb2_commons.plugin.wildcard.WildcardPlugin 10 | org.jvnet.jaxb2_commons.plugin.autoinheritance.AutoInheritancePlugin 11 | org.jvnet.jaxb2_commons.plugin.elementwrapper.ElementWrapperPlugin 12 | org.jvnet.jaxb2_commons.plugin.simplify.SimplifyPlugin 13 | org.jvnet.jaxb2_commons.plugin.enumvalue.EnumValuePlugin -------------------------------------------------------------------------------- /basics/basic/src/test/java/org/jvnet/jaxb2_commons/plugin/copyable/tests/RunCopyablePlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.copyable.tests; 2 | 3 | import java.io.File; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; 8 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 9 | 10 | public class RunCopyablePlugin extends RunXJC2Mojo { 11 | 12 | @Override 13 | public File getSchemaDirectory() { 14 | return new File(getBaseDir(), "src/test/resources"); 15 | } 16 | 17 | @Override 18 | protected void configureMojo(AbstractXJC2Mojo mojo) { 19 | super.configureMojo(mojo); 20 | mojo.setForceRegenerate(true); 21 | } 22 | 23 | @Override 24 | public List getArgs() { 25 | final List args = new ArrayList(super.getArgs()); 26 | args.add("-Xcopyable"); 27 | return args; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basics/basic/src/test/java/org/jvnet/jaxb2_commons/plugin/equals/tests/RunEqualsPlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.equals.tests; 2 | 3 | import java.io.File; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; 8 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 9 | 10 | public class RunEqualsPlugin extends RunXJC2Mojo { 11 | 12 | @Override 13 | public File getSchemaDirectory() { 14 | return new File(getBaseDir(), "src/test/resources"); 15 | } 16 | 17 | @Override 18 | protected void configureMojo(AbstractXJC2Mojo mojo) { 19 | super.configureMojo(mojo); 20 | mojo.setForceRegenerate(true); 21 | } 22 | 23 | @Override 24 | public List getArgs() { 25 | final List args = new ArrayList(super.getArgs()); 26 | args.add("-Xequals"); 27 | return args; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basics/basic/src/test/java/org/jvnet/jaxb2_commons/plugin/inheritance/tests/JavaParserTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.inheritance.tests; 2 | 3 | import junit.framework.TestCase; 4 | 5 | import org.jvnet.jaxb2_commons.plugin.inheritance.util.JavaTypeParser; 6 | 7 | import com.sun.codemodel.JClass; 8 | import com.sun.codemodel.JCodeModel; 9 | 10 | public class JavaParserTest extends TestCase { 11 | 12 | public void testParse() throws Exception { 13 | 14 | final String text = "public class Dummy implements java.util.Comparator{}"; 15 | 16 | final JavaTypeParser javaTypeParser = new JavaTypeParser(); 17 | final JCodeModel codeModel = new JCodeModel(); 18 | JClass comparator = javaTypeParser.parseClass("java.util.Comparator", 19 | codeModel); 20 | assertNotNull(comparator); 21 | JClass integerComparator = javaTypeParser.parseClass( 22 | "java.util.Comparator", codeModel); 23 | assertNotNull(integerComparator); 24 | JClass wildcardIntegerComparator = javaTypeParser.parseClass( 25 | "java.util.Comparator", codeModel); 26 | assertNotNull(wildcardIntegerComparator); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /basics/basic/src/test/java/org/jvnet/jaxb2_commons/plugin/mergeable/tests/RunMergeablePlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.mergeable.tests; 2 | 3 | import java.io.File; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; 8 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 9 | 10 | public class RunMergeablePlugin extends RunXJC2Mojo { 11 | 12 | @Override 13 | public File getSchemaDirectory() { 14 | return new File(getBaseDir(), "src/test/resources"); 15 | } 16 | 17 | @Override 18 | protected void configureMojo(AbstractXJC2Mojo mojo) { 19 | super.configureMojo(mojo); 20 | mojo.setForceRegenerate(true); 21 | } 22 | 23 | @Override 24 | public List getArgs() { 25 | final List args = new ArrayList(super.getArgs()); 26 | args.add("-Xmergeable"); 27 | return args; 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basics/basic/src/test/java/org/jvnet/jaxb2_commons/plugin/tostring/tests/RunToStringPlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.plugin.tostring.tests; 2 | 3 | import java.io.File; 4 | import java.util.ArrayList; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; 8 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 9 | import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 10 | 11 | public class RunToStringPlugin extends RunXJC2Mojo { 12 | 13 | @Override 14 | public File getSchemaDirectory() { 15 | return new File(getBaseDir(), "src/test/resources"); 16 | } 17 | 18 | @Override 19 | protected void configureMojo(AbstractXJC2Mojo mojo) { 20 | super.configureMojo(mojo); 21 | mojo.setForceRegenerate(true); 22 | } 23 | 24 | @Override 25 | public List getArgs() { 26 | final List args = new ArrayList(super.getArgs()); 27 | args.add("-XtoString"); 28 | args.add("-XtoString-toStringStrategy=" 29 | + JAXBToStringStrategy.class.getName()); 30 | return args; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basics/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /basics/deploy.bat: -------------------------------------------------------------------------------- 1 | call mvn -DperformRelease -DcontinuousIntegrationDeploy clean deploy >std 2>err -------------------------------------------------------------------------------- /basics/dist/src/main/assembly/dist-with-dependencies.xml: -------------------------------------------------------------------------------- 1 | 2 | dist-with-dependencies 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | 16 | 17 | dist 18 | 19 | false 20 | 21 | org.jvnet.jaxb2_commons:* 22 | 23 | 24 | 25 | lib 26 | 27 | false 28 | 29 | org.jvnet.jaxb2_commons:* 30 | 31 | 32 | 33 | 34 | -------------------------------------------------------------------------------- /basics/dist/src/main/assembly/dist.xml: -------------------------------------------------------------------------------- 1 | 2 | dist 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | 16 | 17 | dist 18 | 19 | false 20 | 21 | org.jvnet.jaxb2_commons:* 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /basics/install-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn -X -DperformRelease -Psamples,tests,dist clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /basics/install.bat: -------------------------------------------------------------------------------- 1 | call mvn -X -DperformRelease -DcontinuousIntegrationInstall clean install >std 2>err -------------------------------------------------------------------------------- /basics/jaxb/release.bat: -------------------------------------------------------------------------------- 1 | call mvn clean deploy -DperformRelease=true -Psonatype-oss-release -------------------------------------------------------------------------------- /basics/runtime/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /basics/runtime/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-runtime 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.pde.PluginNature 21 | org.eclipse.jdt.core.javanature 22 | org.eclipse.m2e.core.maven2Nature 23 | 24 | 25 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/i18n/Reportable.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.i18n; 2 | 3 | import java.util.ResourceBundle; 4 | 5 | /** 6 | * Reportable object. 7 | * 8 | * @author Aleksei Valikov 9 | */ 10 | public interface Reportable 11 | { 12 | /** 13 | * Returns message code. This code will be used to locate message resource. 14 | * 15 | * @return String code that uniquely identifies this problem. May be used to reference messages. 16 | */ 17 | public String getMessageCode(); 18 | 19 | /** 20 | * Returns parameters used to format the message. 21 | * 22 | * @return Array of parameters used to format problem message. 23 | */ 24 | public abstract Object[] getMessageParameters(); 25 | 26 | /** 27 | * Formats the message using given resource bundle. 28 | * 29 | * @param bundle bundle to use resources from. 30 | * @return Formatted message. 31 | */ 32 | public String getMessage(final ResourceBundle bundle); 33 | 34 | /** 35 | * Returns the message. 36 | * 37 | * @return The message. 38 | */ 39 | public String getMessage(); 40 | } 41 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/ContextUtils.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import java.io.StringWriter; 4 | 5 | import javax.xml.bind.JAXBContext; 6 | import javax.xml.bind.JAXBException; 7 | import javax.xml.bind.Marshaller; 8 | 9 | public class ContextUtils { 10 | 11 | public static String getContextPath(Class... classes) { 12 | if (classes == null) { 13 | throw new IllegalArgumentException("The validated object is null"); 14 | } 15 | for (int i = 0; i < classes.length; i++) { 16 | if (classes[i] == null) { 17 | throw new IllegalArgumentException("The validated array contains null element at index: " + i); 18 | } 19 | } 20 | 21 | final StringBuilder contextPath = new StringBuilder(); 22 | 23 | for (int index = 0; index < classes.length; index++) { 24 | if (index > 0) { 25 | contextPath.append(':'); 26 | } 27 | contextPath.append(classes[index].getPackage().getName()); 28 | } 29 | return contextPath.toString(); 30 | } 31 | 32 | public static String toString(JAXBContext context, Object object) 33 | throws JAXBException { 34 | final Marshaller marshaller = context.createMarshaller(); 35 | marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); 36 | final StringWriter sw = new StringWriter(); 37 | marshaller.marshal(object, sw); 38 | return sw.toString(); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/CopyStrategy.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface CopyStrategy { 6 | 7 | public boolean copy(ObjectLocator locator, boolean value); 8 | 9 | public byte copy(ObjectLocator locator, byte value); 10 | 11 | public char copy(ObjectLocator locator, char value); 12 | 13 | public double copy(ObjectLocator locator, double value); 14 | 15 | public float copy(ObjectLocator locator, float value); 16 | 17 | public int copy(ObjectLocator locator, int value); 18 | 19 | public long copy(ObjectLocator locator, long value); 20 | 21 | public short copy(ObjectLocator locator, short value); 22 | 23 | public Object copy(ObjectLocator locator, Object value); 24 | 25 | public boolean[] copy(ObjectLocator locator, boolean[] value); 26 | 27 | public byte[] copy(ObjectLocator locator, byte[] value); 28 | 29 | public char[] copy(ObjectLocator locator, char[] value); 30 | 31 | public double[] copy(ObjectLocator locator, double[] value); 32 | 33 | public float[] copy(ObjectLocator locator, float[] value); 34 | 35 | public int[] copy(ObjectLocator locator, int[] value); 36 | 37 | public long[] copy(ObjectLocator locator, long[] value); 38 | 39 | public short[] copy(ObjectLocator locator, short[] value); 40 | 41 | public Object[] copy(ObjectLocator locator, Object[] value); 42 | 43 | } 44 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/CopyTo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface CopyTo { 6 | 7 | public Object createNewInstance(); 8 | 9 | public Object copyTo(Object target); 10 | 11 | public Object copyTo(ObjectLocator locator, Object target, 12 | CopyStrategy copyStrategy); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/EnumValue.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | public interface EnumValue { 4 | 5 | public T enumValue(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/Equals.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface Equals { 6 | 7 | public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, 8 | Object that, EqualsStrategy equalsStrategy); 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/HashCode.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface HashCode { 6 | 7 | public int hashCode(ObjectLocator locator, HashCodeStrategy hashCodeStrategy); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/JAXBMergeCollectionsStrategy.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import java.util.ArrayList; 4 | import java.util.Collection; 5 | import java.util.HashSet; 6 | import java.util.List; 7 | import java.util.Set; 8 | 9 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 10 | 11 | public class JAXBMergeCollectionsStrategy extends JAXBMergeStrategy { 12 | 13 | @Override 14 | protected Object mergeInternal(ObjectLocator leftLocator, 15 | ObjectLocator rightLocator, Collection leftCollection, 16 | Collection rightCollection) { 17 | 18 | if (leftCollection instanceof List && rightCollection instanceof List) { 19 | final List list = new ArrayList(leftCollection 20 | .size() 21 | + rightCollection.size()); 22 | list.addAll(leftCollection); 23 | list.addAll(rightCollection); 24 | return list; 25 | } else if (leftCollection instanceof Set 26 | && rightCollection instanceof Set) { 27 | final Set set = new HashSet(leftCollection.size() 28 | + rightCollection.size()); 29 | set.addAll(leftCollection); 30 | set.addAll(rightCollection); 31 | return set; 32 | } else { 33 | return super.mergeInternal(leftLocator, rightLocator, 34 | leftCollection, rightCollection); 35 | } 36 | } 37 | 38 | public static final MergeStrategy INSTANCE = new JAXBMergeCollectionsStrategy(); 39 | } 40 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/JAXBMergeStrategy.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import java.util.Collection; 4 | 5 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 6 | 7 | public class JAXBMergeStrategy extends DefaultMergeStrategy { 8 | 9 | @SuppressWarnings("unchecked") 10 | @Override 11 | protected Object mergeInternal(ObjectLocator leftLocator, 12 | ObjectLocator rightLocator, Object left, Object right) { 13 | if (left instanceof Collection && right instanceof Collection) { 14 | Collection leftCollection = (Collection) left; 15 | Collection rightCollection = (Collection) right; 16 | return mergeInternal(leftLocator, rightLocator, leftCollection, 17 | rightCollection); 18 | } else { 19 | return super.mergeInternal(leftLocator, rightLocator, left, right); 20 | } 21 | } 22 | 23 | @SuppressWarnings("unchecked") 24 | protected Object mergeInternal(ObjectLocator leftLocator, 25 | ObjectLocator rightLocator, Collection leftCollection, 26 | Collection rightCollection) { 27 | return !leftCollection.isEmpty() ? leftCollection : rightCollection; 28 | } 29 | 30 | public static final MergeStrategy INSTANCE = new JAXBMergeStrategy(); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/MergeFrom.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface MergeFrom { 6 | 7 | public Object createNewInstance(); 8 | 9 | public void mergeFrom(Object left, Object right); 10 | 11 | public void mergeFrom(ObjectLocator leftLocator, 12 | ObjectLocator rightLocator, Object left, Object right, 13 | MergeStrategy mergeStrategy); 14 | 15 | } 16 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/ToString.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 4 | 5 | public interface ToString { 6 | 7 | public StringBuilder append(ObjectLocator locator, StringBuilder stringBuilder, 8 | ToStringStrategy toStringStrategy); 9 | 10 | public StringBuilder appendFields(ObjectLocator locator, StringBuilder stringBuilder, 11 | ToStringStrategy toStringStrategy); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/lang/Validate.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.lang; 2 | 3 | import java.util.Collection; 4 | import java.util.Iterator; 5 | 6 | public class Validate { 7 | 8 | public static void notNull(Object object) { 9 | if (object == null) { 10 | throw new IllegalArgumentException("The validated object is null"); 11 | } 12 | } 13 | 14 | public static void isTrue(boolean expression) { 15 | if (expression == false) { 16 | throw new IllegalArgumentException( 17 | "The validated expression is false"); 18 | } 19 | } 20 | 21 | public static void notEmpty(Collection collection) { 22 | if (collection == null || collection.size() == 0) { 23 | throw new IllegalArgumentException( 24 | "The validated collection is empty"); 25 | } 26 | } 27 | 28 | public static void noNullElements(Collection collection) { 29 | Validate.notNull(collection); 30 | int i = 0; 31 | for (Iterator it = collection.iterator(); it.hasNext(); i++) { 32 | if (it.next() == null) { 33 | throw new IllegalArgumentException( 34 | "The validated collection contains null element at index: " 35 | + i); 36 | } 37 | } 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/locator/DefaultItemObjectLocator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.locator; 2 | 3 | import java.text.MessageFormat; 4 | 5 | /** 6 | * Locator for the collection item. 7 | */ 8 | public final class DefaultItemObjectLocator extends AbstractObjectLocator 9 | implements ItemObjectLocator { 10 | /** 11 | * Item index. 12 | */ 13 | protected final int index; 14 | 15 | /** 16 | * Constructs a new item locator. 17 | * 18 | * @param parentLocator 19 | * parent locator. 20 | * @param itemIndex 21 | * item index. 22 | * @param itemValue 23 | * item value. 24 | */ 25 | protected DefaultItemObjectLocator(final ObjectLocator parentLocator, 26 | final int itemIndex, Object itemValue) { 27 | super(parentLocator, itemValue); 28 | this.index = itemIndex; 29 | } 30 | 31 | /** 32 | * Returns item index. 33 | * 34 | * @return Index of the item. 35 | */ 36 | public int getIndex() { 37 | return index; 38 | } 39 | 40 | public Object[] getMessageParameters() { 41 | return new Object[] { getObject(), Integer.valueOf(getIndex()) }; 42 | } 43 | 44 | @Override 45 | protected String getDefaultMessage() { 46 | return MessageFormat.format("Item index: {1}\nItem value: {0}.", 47 | getMessageParameters()); 48 | } 49 | 50 | @Override 51 | protected String getStepAsString() { 52 | return "[" + getIndex() + "]"; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/locator/DefaultRootObjectLocator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.locator; 2 | 3 | import java.text.MessageFormat; 4 | 5 | public final class DefaultRootObjectLocator extends AbstractObjectLocator 6 | implements RootObjectLocator { 7 | 8 | public DefaultRootObjectLocator(Object rootObject) { 9 | super(null, rootObject); 10 | } 11 | 12 | public Object[] getMessageParameters() { 13 | return new Object[] { getObject() }; 14 | } 15 | 16 | @Override 17 | protected String getDefaultMessage() { 18 | return MessageFormat 19 | .format("Root object: {0}.", getMessageParameters()); 20 | } 21 | 22 | @Override 23 | protected String getStepAsString() { 24 | return ""; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/locator/ItemObjectLocator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.locator; 2 | 3 | /** 4 | * Models item locator. 5 | * 6 | * @author Aleksei Valikov 7 | * 8 | */ 9 | public interface ItemObjectLocator extends ObjectLocator { 10 | 11 | /** 12 | * @return Item index. 13 | */ 14 | public int getIndex(); 15 | 16 | /** 17 | * @return Item value. 18 | */ 19 | public Object getObject(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/locator/PropertyObjectLocator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.locator; 2 | 3 | /** 4 | * Models a property locator. 5 | * 6 | * @author Aleksei Valikov 7 | * 8 | */ 9 | public interface PropertyObjectLocator extends ObjectLocator { 10 | 11 | /** 12 | * @return Name of the property. 13 | */ 14 | public String getPropertyName(); 15 | 16 | /** 17 | * @return Returns value of the property. 18 | */ 19 | public Object getObject(); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/locator/RootObjectLocator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.locator; 2 | 3 | public interface RootObjectLocator extends ObjectLocator { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/AfterMarshallCallback.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind; 2 | 3 | import javax.xml.bind.Marshaller; 4 | 5 | public interface AfterMarshallCallback { 6 | 7 | public void afterMarshal(Marshaller marshaller); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/AfterUnmarshallCallback.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind; 2 | 3 | import javax.xml.bind.Unmarshaller; 4 | 5 | public interface AfterUnmarshallCallback { 6 | 7 | public void afterUnmarshal(Unmarshaller unmarshaller, Object parent); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/BeforeMarshallCallback.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind; 2 | 3 | import javax.xml.bind.Marshaller; 4 | 5 | public interface BeforeMarshallCallback { 6 | 7 | public void beforeMarshal(Marshaller marshaller); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/BeforeUnmarshallCallback.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind; 2 | 3 | import javax.xml.bind.Unmarshaller; 4 | 5 | public interface BeforeUnmarshallCallback { 6 | 7 | public void beforeUnmarshal(Unmarshaller unmarshaller, Object parent); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/ContextPathAware.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind; 2 | 3 | 4 | /** 5 | * Implemented by classes which are aware of JAXB context path. 6 | * 7 | * @author valikov 8 | */ 9 | public interface ContextPathAware { 10 | 11 | /** 12 | * Returns JAXB context path which could be used to 13 | * create a JAXBContext instance. 14 | * 15 | * @return JAXB context path. 16 | */ 17 | public String getContextPath(); 18 | 19 | } 20 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/annotation/adapters/CommaDelimitedStringAdapter.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.annotation.adapters; 2 | 3 | import java.util.LinkedList; 4 | import java.util.List; 5 | 6 | import javax.xml.bind.annotation.adapters.XmlAdapter; 7 | 8 | import org.jvnet.jaxb2_commons.lang.StringUtils; 9 | 10 | public class CommaDelimitedStringAdapter extends 11 | XmlAdapter> { 12 | 13 | @Override 14 | public String marshal(List value) throws Exception { 15 | if (value == null) { 16 | return null; 17 | } else { 18 | return StringUtils.join(value.iterator(), ", "); 19 | } 20 | } 21 | 22 | @Override 23 | public List unmarshal(String text) throws Exception { 24 | 25 | if (text == null) { 26 | return null; 27 | } else 28 | 29 | { 30 | final List value = new LinkedList(); 31 | final String[] items = StringUtils.split(text, ','); 32 | for (String item : items) { 33 | final String trimmedItem = item.trim(); 34 | if (!StringUtils.isEmpty(trimmedItem)) { 35 | value.add(trimmedItem); 36 | } 37 | } 38 | return value; 39 | } 40 | } 41 | 42 | } -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MAnyAttributePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MAnyAttributePropertyInfo extends MPropertyInfo { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MAnyElementPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MAnyElementPropertyInfo extends MPropertyInfo, 4 | MWildcard, MMixable { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MAttributePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public interface MAttributePropertyInfo extends 6 | MSingleTypePropertyInfo { 7 | 8 | public QName getAttributeName(); 9 | 10 | } -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MBuiltinLeafInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MBuiltinLeafInfoOrigin; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 7 | 8 | public interface MBuiltinLeafInfo extends MTypeInfo, 9 | MOriginated { 10 | 11 | public QName getTypeName(); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MClassInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import java.util.List; 4 | 5 | import javax.xml.namespace.QName; 6 | 7 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MClassInfoOrigin; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 9 | 10 | public interface MClassInfo extends MClassTypeInfo, 11 | MOriginated { 12 | 13 | public MClassTypeInfo getBaseTypeInfo(); 14 | 15 | public List> getProperties(); 16 | 17 | public QName getElementName(); 18 | 19 | public MElementInfo createElementInfo(MTypeInfo scope, 20 | QName substitutionHead); 21 | 22 | public void addProperty(MPropertyInfo propertyInfo); 23 | 24 | public void removeProperty(MPropertyInfo propertyInfo); 25 | 26 | } 27 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MClassRef.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MClassRef extends MClassTypeInfo { 4 | } 5 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MClassTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MClassTypeInfo extends MPackagedTypeInfo, 4 | MContainer { 5 | 6 | public C getTargetClass(); 7 | 8 | public V acceptClassTypeInfoVisitor( 9 | MClassTypeInfoVisitor visitor); 10 | 11 | } 12 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MClassTypeInfoVisitor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MClassTypeInfoVisitor { 4 | 5 | public V visitClassInfo(MClassInfo info); 6 | 7 | public V visitClassRef(MClassRef info); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MContained.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MContained { 4 | 5 | public MContainer getContainer(); 6 | 7 | public String getContainerLocalName(String delimiter); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MContainer.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MContainer extends MPackaged { 4 | 5 | public String getLocalName(); 6 | 7 | public String getContainerLocalName(String delimiter); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MCustomizable.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MCustomizable { 4 | 5 | public MCustomizations getCustomizations(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MCustomization.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MCustomization { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MCustomizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import java.util.List; 4 | 5 | public interface MCustomizations { 6 | 7 | public List getCustomizations(); 8 | 9 | public void addCustomization(MCustomization customization); 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 7 | 8 | public interface MElementInfo extends MElementTypeInfo, MPackaged, 9 | MOriginated, MContained, MContainer { 10 | 11 | public QName getElementName(); 12 | 13 | public MTypeInfo getScope(); 14 | 15 | public QName getSubstitutionHead(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MElementPropertyInfo extends MPropertyInfo, 4 | MWrappable, MElementTypeInfo { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementRefPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MElementRefPropertyInfo extends MPropertyInfo, 4 | MMixable, MWrappable, MWildcard, MElementTypeInfo { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementRefsPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | 4 | public interface MElementRefsPropertyInfo extends MPropertyInfo, 5 | MMixable, MWrappable, MWildcard, MElementTypeInfos { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public interface MElementTypeInfo extends MTyped { 6 | 7 | public QName getElementName(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementTypeInfos.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import java.util.List; 4 | 5 | public interface MElementTypeInfos { 6 | public List> getElementTypeInfos(); 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MElementsPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | 4 | public interface MElementsPropertyInfo extends MPropertyInfo, 5 | MWrappable, MElementTypeInfos { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MEnumConstantInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MEnumConstantInfoOrigin; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 5 | 6 | public interface MEnumConstantInfo extends 7 | MOriginated { 8 | 9 | public String getLexicalValue(); 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MEnumLeafInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import java.util.List; 4 | 5 | import javax.xml.namespace.QName; 6 | 7 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MEnumLeafInfoOrigin; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 9 | 10 | public interface MEnumLeafInfo extends MPackagedTypeInfo, 11 | MOriginated { 12 | 13 | public C getTargetClass(); 14 | 15 | public MTypeInfo getBaseTypeInfo(); 16 | 17 | public List> getConstants(); 18 | 19 | public void addEnumConstantInfo(MEnumConstantInfo enumConstantInfo); 20 | 21 | public void removeEnumConstantInfo(MEnumConstantInfo enumConstantInfo); 22 | 23 | public QName getElementName(); 24 | 25 | public MElementInfo createElementInfo(MTypeInfo scope, 26 | QName substitutionHead); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MID.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MID extends MTypeInfo { 4 | 5 | public MTypeInfo getValueTypeInfo(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MIDREF.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MIDREF extends MTypeInfo { 4 | 5 | public MTypeInfo getValueTypeInfo(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MIDREFS.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MIDREFS extends MList { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MList.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MList extends MTypeInfo { 4 | 5 | public MTypeInfo getItemTypeInfo(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MMixable.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MMixable { 4 | 5 | public boolean isMixed(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MModelInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import java.util.Collection; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MModelInfoOrigin; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 7 | 8 | public interface MModelInfo extends MCustomizable, 9 | MOriginated { 10 | 11 | public Collection> getBuiltinLeafInfos(); 12 | 13 | public Collection> getClassInfos(); 14 | 15 | public Collection> getEnumLeafInfos(); 16 | 17 | public Collection> getTypeInfos(); 18 | 19 | public Collection> getElementInfos(); 20 | 21 | public void addBuiltinLeafInfo(MBuiltinLeafInfo builtinLeafInfo); 22 | 23 | public void addEnumLeafInfo(MEnumLeafInfo enumLeafInfo); 24 | 25 | public void removeEnumLeafInfo(MEnumLeafInfo enumLeafInfo); 26 | 27 | public void addClassInfo(MClassInfo classInfo); 28 | 29 | public void removeClassInfo(MClassInfo classInfo); 30 | 31 | public void addElementInfo(MElementInfo elementInfo); 32 | 33 | public void removeElementInfo(MElementInfo elementInfo); 34 | } 35 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPackageInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPackageInfoOrigin; 5 | 6 | public interface MPackageInfo extends MOriginated, 7 | MContainer { 8 | 9 | public String getPackageName(); 10 | 11 | public String getPackagedName(String localName); 12 | } 13 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPackaged.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MPackaged { 4 | 5 | public MPackageInfo getPackageInfo(); 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPackagedTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MPackagedTypeInfo extends MTypeInfo, MPackaged, 4 | MContained { 5 | 6 | public String getName(); 7 | 8 | public String getLocalName(); 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPackagedTypeInfoVisitor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public abstract class MPackagedTypeInfoVisitor implements 4 | MTypeInfoVisitor { 5 | 6 | public abstract V visitPackagedTypeInfo(MPackagedTypeInfo info); 7 | 8 | public V visitList(MList info) { 9 | return null; 10 | } 11 | 12 | public V visitBuiltinLeafInfo(MBuiltinLeafInfo info) { 13 | return null; 14 | } 15 | 16 | public V visitID(MID info) { 17 | return null; 18 | } 19 | 20 | public V visitIDREF(MIDREF info) { 21 | return null; 22 | } 23 | 24 | public V visitIDREFS(MIDREFS info) { 25 | return null; 26 | } 27 | 28 | public V visitEnumLeafInfo(MEnumLeafInfo info) { 29 | return visitPackagedTypeInfo(info); 30 | } 31 | 32 | public V visitWildcardTypeInfo(MWildcardTypeInfo info) { 33 | return null; 34 | } 35 | 36 | public V visitClassInfo(MClassInfo info) { 37 | return visitPackagedTypeInfo(info); 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 5 | 6 | public interface MPropertyInfo extends MOriginated { 7 | 8 | public MClassInfo getClassInfo(); 9 | 10 | public String getPrivateName(); 11 | 12 | public String getPublicName(); 13 | 14 | public boolean isCollection(); 15 | 16 | public V acceptPropertyInfoVisitor(MPropertyInfoVisitor visitor); 17 | } 18 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MPropertyInfoVisitor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MPropertyInfoVisitor { 4 | 5 | public V visitElementPropertyInfo(MElementPropertyInfo info); 6 | 7 | public V visitElementsPropertyInfo(MElementsPropertyInfo info); 8 | 9 | public V visitAnyElementPropertyInfo(MAnyElementPropertyInfo info); 10 | 11 | public V visitAttributePropertyInfo(MAttributePropertyInfo info); 12 | 13 | public V visitAnyAttributePropertyInfo(MAnyAttributePropertyInfo info); 14 | 15 | public V visitValuePropertyInfo(MValuePropertyInfo info); 16 | 17 | public V visitElementRefPropertyInfo(MElementRefPropertyInfo info); 18 | 19 | public V visitElementRefsPropertyInfo(MElementRefsPropertyInfo info); 20 | 21 | } 22 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MSingleTypePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MSingleTypePropertyInfo extends MPropertyInfo, 4 | MTyped { 5 | 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MSourced.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MSourced { 4 | 5 | public S getSource(); 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MTargeted.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MTargeted { 4 | 5 | public T getTarget(); 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MTransientPropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MTransientPropertyInfo { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MTypeInfo extends MCustomizable { 4 | 5 | public T getTargetType(); 6 | 7 | public V acceptTypeInfoVisitor(MTypeInfoVisitor visitor); 8 | } 9 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MTypeInfoVisitor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MTypeInfoVisitor extends 4 | MClassTypeInfoVisitor { 5 | 6 | public V visitList(MList info); 7 | 8 | public V visitID(MID info); 9 | 10 | public V visitIDREF(MIDREF info); 11 | 12 | public V visitIDREFS(MIDREFS info); 13 | 14 | public V visitBuiltinLeafInfo(MBuiltinLeafInfo info); 15 | 16 | public V visitEnumLeafInfo(MEnumLeafInfo info); 17 | 18 | public V visitWildcardTypeInfo(MWildcardTypeInfo info); 19 | 20 | } 21 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MTyped.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MTyped { 4 | 5 | public MTypeInfo getTypeInfo(); 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MValuePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MValuePropertyInfo extends MSingleTypePropertyInfo { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MWildcard.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | public interface MWildcard { 4 | 5 | public boolean isDomAllowed(); 6 | 7 | public boolean isTypedObjectAllowed(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MWildcardTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MOriginated; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MWildcardTypeInfoOrigin; 5 | 6 | public interface MWildcardTypeInfo extends MTypeInfo, 7 | MOriginated { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/MWrappable.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public interface MWrappable { 6 | 7 | public QName getWrapperElementName(); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMAnyAttributePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MAnyAttributePropertyInfo; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfoVisitor; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 7 | 8 | public class CMAnyAttributePropertyInfo extends CMPropertyInfo 9 | implements MAnyAttributePropertyInfo { 10 | 11 | public CMAnyAttributePropertyInfo(MPropertyInfoOrigin origin, 12 | MClassInfo classInfo, String privateName) { 13 | super(origin, classInfo, privateName, false); 14 | } 15 | 16 | public V acceptPropertyInfoVisitor(MPropertyInfoVisitor visitor) { 17 | return visitor.visitAnyAttributePropertyInfo(this); 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMAttributePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | import org.jvnet.jaxb2_commons.lang.Validate; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MAttributePropertyInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfoVisitor; 9 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 10 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 11 | 12 | public class CMAttributePropertyInfo extends 13 | CMSingleTypePropertyInfo implements MAttributePropertyInfo { 14 | 15 | private final QName attributeName; 16 | 17 | public CMAttributePropertyInfo(MPropertyInfoOrigin origin, 18 | MClassInfo classInfo, String privateName, 19 | MTypeInfo typeInfo, QName attributeName) { 20 | super(origin, classInfo, privateName, false, typeInfo); 21 | Validate.notNull(attributeName); 22 | this.attributeName = attributeName; 23 | } 24 | 25 | public QName getAttributeName() { 26 | return attributeName; 27 | } 28 | 29 | public V acceptPropertyInfoVisitor(MPropertyInfoVisitor visitor) { 30 | return visitor.visitAttributePropertyInfo(this); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMCustomization.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MCustomization; 4 | import org.w3c.dom.Element; 5 | 6 | public class CMCustomization implements MCustomization { 7 | 8 | private final Element element; 9 | 10 | public CMCustomization(Element element) { 11 | this.element = element; 12 | } 13 | 14 | public Element getElement() { 15 | return element; 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMCustomizations.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import java.util.Collections; 4 | import java.util.LinkedList; 5 | import java.util.List; 6 | 7 | import org.jvnet.jaxb2_commons.lang.Validate; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.MCustomization; 9 | import org.jvnet.jaxb2_commons.xml.bind.model.MCustomizations; 10 | 11 | public class CMCustomizations implements MCustomizations { 12 | 13 | private final List customizations = new LinkedList(); 14 | private final List unmodifiableCustomizations = Collections 15 | .unmodifiableList(this.customizations); 16 | 17 | public List getCustomizations() { 18 | return unmodifiableCustomizations; 19 | } 20 | 21 | public void addCustomization(MCustomization customization) { 22 | Validate.notNull(customization); 23 | this.customizations.add(customization); 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMElementTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | import org.jvnet.jaxb2_commons.lang.Validate; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MElementTypeInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 8 | 9 | public class CMElementTypeInfo implements MElementTypeInfo { 10 | 11 | private final QName elementName; 12 | 13 | private final MTypeInfo typeInfo; 14 | 15 | public CMElementTypeInfo(QName elementName, MTypeInfo typeInfo) { 16 | Validate.notNull(elementName); 17 | Validate.notNull(typeInfo); 18 | this.elementName = elementName; 19 | this.typeInfo = typeInfo; 20 | } 21 | 22 | public QName getElementName() { 23 | return elementName; 24 | } 25 | 26 | public MTypeInfo getTypeInfo() { 27 | return typeInfo; 28 | } 29 | 30 | @Override 31 | public String toString() { 32 | return "Element [" + getElementName() + ":" + getTypeInfo() + "]"; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMEnumConstantInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumConstantInfo; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumLeafInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MEnumConstantInfoOrigin; 7 | 8 | public class CMEnumConstantInfo implements MEnumConstantInfo { 9 | 10 | private final MEnumConstantInfoOrigin origin; 11 | private final MEnumLeafInfo enumLeafInfo; 12 | private final String lexicalValue; 13 | 14 | public CMEnumConstantInfo(MEnumConstantInfoOrigin origin, 15 | MEnumLeafInfo enumLeafInfo, String lexicalValue) { 16 | Validate.notNull(origin); 17 | Validate.notNull(enumLeafInfo); 18 | Validate.notNull(lexicalValue); 19 | this.origin = origin; 20 | this.enumLeafInfo = enumLeafInfo; 21 | this.lexicalValue = lexicalValue; 22 | } 23 | 24 | public MEnumConstantInfoOrigin getOrigin() { 25 | return origin; 26 | } 27 | 28 | public MEnumLeafInfo getEnumLeafInfo() { 29 | return enumLeafInfo; 30 | } 31 | 32 | public String getLexicalValue() { 33 | return lexicalValue; 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMIDREFS.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import java.text.MessageFormat; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MIDREFS; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfoVisitor; 8 | 9 | public class CMIDREFS extends CMList implements MIDREFS { 10 | 11 | public CMIDREFS(T targetType, MTypeInfo itemTypeInfo) { 12 | super(targetType, itemTypeInfo); 13 | } 14 | 15 | @Override 16 | public String toString() { 17 | return MessageFormat.format("IDREFS [{0}]", getItemTypeInfo()); 18 | } 19 | 20 | public V acceptTypeInfoVisitor(MTypeInfoVisitor visitor) { 21 | return visitor.visitIDREFS(this); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMList.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import java.text.MessageFormat; 4 | 5 | import org.jvnet.jaxb2_commons.lang.Validate; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MCustomizations; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.MList; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 9 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfoVisitor; 10 | 11 | public class CMList implements MList { 12 | 13 | private final MTypeInfo itemTypeInfo; 14 | private final T targetType; 15 | private final MCustomizations customizations = new CMCustomizations(); 16 | 17 | public CMList(T targetType, MTypeInfo itemTypeInfo) { 18 | Validate.notNull(targetType); 19 | Validate.notNull(itemTypeInfo); 20 | this.targetType = targetType; 21 | this.itemTypeInfo = itemTypeInfo; 22 | } 23 | 24 | public MCustomizations getCustomizations() { 25 | return customizations; 26 | } 27 | 28 | public T getTargetType() { 29 | return targetType; 30 | } 31 | 32 | public MTypeInfo getItemTypeInfo() { 33 | return itemTypeInfo; 34 | } 35 | 36 | @Override 37 | public String toString() { 38 | return MessageFormat.format("List [{0}]", getItemTypeInfo()); 39 | } 40 | 41 | public V acceptTypeInfoVisitor(MTypeInfoVisitor visitor) { 42 | return visitor.visitList(this); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMPackageInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.lang.StringUtils; 4 | import org.jvnet.jaxb2_commons.lang.Validate; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPackageInfoOrigin; 7 | 8 | public class CMPackageInfo implements MPackageInfo { 9 | 10 | private final MPackageInfoOrigin origin; 11 | private final String packageName; 12 | 13 | public CMPackageInfo(MPackageInfoOrigin origin, String packageName) { 14 | Validate.notNull(origin); 15 | Validate.notNull(packageName); 16 | this.origin = origin; 17 | this.packageName = packageName; 18 | } 19 | 20 | public MPackageInfoOrigin getOrigin() { 21 | return origin; 22 | } 23 | 24 | public String getPackageName() { 25 | return packageName; 26 | } 27 | 28 | public String getPackagedName(String localName) { 29 | if (StringUtils.isEmpty(packageName)) { 30 | return localName; 31 | } else { 32 | return packageName + "." + localName; 33 | } 34 | } 35 | 36 | public String getLocalName() { 37 | return null; 38 | } 39 | 40 | public String getContainerLocalName(String delimiter) { 41 | return null; 42 | } 43 | 44 | public MPackageInfo getPackageInfo() { 45 | return this; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMSingleTypePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MSingleTypePropertyInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 8 | 9 | public abstract class CMSingleTypePropertyInfo extends 10 | CMPropertyInfo implements MSingleTypePropertyInfo { 11 | 12 | private final MTypeInfo typeInfo; 13 | 14 | public CMSingleTypePropertyInfo(MPropertyInfoOrigin origin, 15 | MClassInfo classInfo, String privateName, boolean collection, 16 | MTypeInfo typeInfo) { 17 | super(origin, classInfo, privateName, collection); 18 | Validate.notNull(typeInfo); 19 | this.typeInfo = typeInfo; 20 | } 21 | 22 | public MTypeInfo getTypeInfo() { 23 | return typeInfo; 24 | } 25 | 26 | } 27 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMValuePropertyInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfoVisitor; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MValuePropertyInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 8 | 9 | public class CMValuePropertyInfo extends CMSingleTypePropertyInfo 10 | implements MValuePropertyInfo { 11 | 12 | public CMValuePropertyInfo(MPropertyInfoOrigin origin, 13 | MClassInfo classInfo, String privateName, 14 | MTypeInfo typeInfo) { 15 | super(origin, classInfo, privateName, false, typeInfo); 16 | } 17 | 18 | public V acceptPropertyInfoVisitor(MPropertyInfoVisitor visitor) { 19 | return visitor.visitValuePropertyInfo(this); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/CMWildcardTypeInfo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MCustomizations; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MTypeInfoVisitor; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MWildcardTypeInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MWildcardTypeInfoOrigin; 8 | 9 | public class CMWildcardTypeInfo implements MWildcardTypeInfo { 10 | 11 | private final T targetType; 12 | private final MWildcardTypeInfoOrigin origin; 13 | private final MCustomizations customizations = new CMCustomizations(); 14 | 15 | public CMWildcardTypeInfo(MWildcardTypeInfoOrigin origin, T targetType) { 16 | Validate.notNull(origin); 17 | this.origin = origin; 18 | this.targetType = targetType; 19 | } 20 | 21 | public MCustomizations getCustomizations() { 22 | return customizations; 23 | } 24 | 25 | public T getTargetType() { 26 | return targetType; 27 | } 28 | 29 | public MWildcardTypeInfoOrigin getOrigin() { 30 | return origin; 31 | } 32 | 33 | public V acceptTypeInfoVisitor(MTypeInfoVisitor visitor) { 34 | return visitor.visitWildcardTypeInfo(this); 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/BuiltinLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.BuiltinLeafInfo; 6 | 7 | public interface BuiltinLeafInfoOrigin> extends MSourced{ 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMAnyAttributePropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 4 | 5 | public class CMAnyAttributePropertyInfoOrigin implements MPropertyInfoOrigin { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMBuiltinLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MBuiltinLeafInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.BuiltinLeafInfo; 7 | 8 | public class CMBuiltinLeafInfoOrigin> 9 | implements MBuiltinLeafInfoOrigin, BuiltinLeafInfoOrigin { 10 | 11 | private final BLI source; 12 | 13 | public CMBuiltinLeafInfoOrigin(BLI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public BLI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMClassElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.ClassInfo; 7 | 8 | public class CMClassElementInfoOrigin> 9 | implements MElementInfoOrigin, ClassInfoOrigin { 10 | 11 | private final CI source; 12 | 13 | public CMClassElementInfoOrigin(CI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public CI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMClassInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MClassInfoOrigin; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 6 | 7 | import com.sun.xml.bind.v2.model.core.ClassInfo; 8 | 9 | public class CMClassInfoOrigin> implements 10 | MClassInfoOrigin, ClassInfoOrigin { 11 | 12 | private final CI source; 13 | 14 | public CMClassInfoOrigin(CI source) { 15 | Validate.notNull(source); 16 | this.source = source; 17 | } 18 | 19 | public CI getSource() { 20 | return source; 21 | } 22 | 23 | public MElementInfoOrigin createElementInfoOrigin() { 24 | return new CMClassElementInfoOrigin(getSource()); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.ElementInfo; 7 | 8 | public class CMElementInfoOrigin> implements 9 | MElementInfoOrigin, ElementInfoOrigin { 10 | 11 | private final EI source; 12 | 13 | public CMElementInfoOrigin(EI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public EI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMEnumConstantInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MEnumConstantInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.EnumConstant; 7 | 8 | public class CMEnumConstantInfoOrigin> 9 | implements MEnumConstantInfoOrigin, EnumConstantOrigin { 10 | 11 | private final ECI source; 12 | 13 | public CMEnumConstantInfoOrigin(ECI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public ECI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMEnumElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.EnumLeafInfo; 7 | 8 | public class CMEnumElementInfoOrigin> 9 | implements MElementInfoOrigin, EnumLeafInfoOrigin { 10 | 11 | private final ELI source; 12 | 13 | public CMEnumElementInfoOrigin(ELI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public ELI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMEnumLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MElementInfoOrigin; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MEnumLeafInfoOrigin; 6 | 7 | import com.sun.xml.bind.v2.model.core.EnumLeafInfo; 8 | 9 | public class CMEnumLeafInfoOrigin> 10 | implements MEnumLeafInfoOrigin, EnumLeafInfoOrigin { 11 | 12 | private final ELI source; 13 | 14 | public CMEnumLeafInfoOrigin(ELI source) { 15 | Validate.notNull(source); 16 | this.source = source; 17 | } 18 | 19 | public ELI getSource() { 20 | return source; 21 | } 22 | 23 | public MElementInfoOrigin createElementInfoOrigin() { 24 | return new CMEnumElementInfoOrigin( 25 | getSource()); 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMModelInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MModelInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.TypeInfoSet; 7 | 8 | public class CMModelInfoOrigin> 9 | implements MModelInfoOrigin, TypeInfoSetOrigin { 10 | 11 | private final TIS source; 12 | 13 | public CMModelInfoOrigin(TIS source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public TIS getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMPackageInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPackageInfoOrigin; 4 | 5 | public class CMPackageInfoOrigin implements MPackageInfoOrigin { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMPropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.PropertyInfo; 7 | 8 | public class CMPropertyInfoOrigin> implements MPropertyInfoOrigin, 9 | PropertyInfoOrigin { 10 | 11 | private final PI source; 12 | 13 | public CMPropertyInfoOrigin(PI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public PI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/CMWildcardTypeInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MWildcardTypeInfoOrigin; 5 | 6 | import com.sun.xml.bind.v2.model.core.WildcardTypeInfo; 7 | 8 | public class CMWildcardTypeInfoOrigin> 9 | implements MWildcardTypeInfoOrigin, WildcardTypeInfoOrigin { 10 | 11 | private final WTI source; 12 | 13 | public CMWildcardTypeInfoOrigin(WTI source) { 14 | Validate.notNull(source); 15 | this.source = source; 16 | } 17 | 18 | public WTI getSource() { 19 | return source; 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/ClassInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.ClassInfo; 6 | 7 | public interface ClassInfoOrigin> extends 8 | MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/ElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.ElementInfo; 6 | 7 | public interface ElementInfoOrigin> extends 8 | MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/EnumConstantOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.EnumConstant; 6 | 7 | public interface EnumConstantOrigin> 8 | extends MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/EnumLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.EnumLeafInfo; 6 | 7 | public interface EnumLeafInfoOrigin> extends 8 | MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/PropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.PropertyInfo; 6 | 7 | public interface PropertyInfoOrigin> 8 | extends MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/TypeInfoSetOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.TypeInfoSet; 6 | 7 | public interface TypeInfoSetOrigin> 8 | extends MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/concrete/origin/WildcardTypeInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.xml.bind.v2.model.core.WildcardTypeInfo; 6 | 7 | public interface WildcardTypeInfoOrigin> 8 | extends MSourced { 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MBuiltinLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MBuiltinLeafInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MClassInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MClassInfoOrigin { 4 | 5 | public MElementInfoOrigin createElementInfoOrigin(); 6 | } 7 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MElementInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MEnumConstantInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MEnumConstantInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MEnumLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MEnumLeafInfoOrigin { 4 | 5 | public MElementInfoOrigin createElementInfoOrigin(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MModelInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MModelInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MOriginated.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MOriginated { 4 | 5 | public O getOrigin(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MPackageInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MPackageInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MPropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MPropertyInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/origin/MWildcardTypeInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.origin; 2 | 3 | public interface MWildcardTypeInfoOrigin { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/runtime/src/main/java/org/jvnet/jaxb2_commons/xml/bind/model/util/QNameCollector.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xml.bind.model.util; 2 | 3 | import javax.xml.namespace.QName; 4 | 5 | public interface QNameCollector { 6 | 7 | public void element(QName name); 8 | 9 | public void attribute(QName name); 10 | } 11 | -------------------------------------------------------------------------------- /basics/runtime/src/main/resources/org/jvnet/jaxb2_commons/locator/messages.properties: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxbcommons.locator.DefaultRootObjectLocator = \ 2 | Object: {0}. 3 | 4 | org.jvnet.jaxbcommons.locator.DefaultPropertyObjectLocator = \ 5 | Property name: {1}.\n\ 6 | Property value: {0}. 7 | 8 | org.jvnet.jaxbcommons.locator.DefaultItemObjectLocator = \ 9 | Item index: {1}.\n\ 10 | Item value: {0}. -------------------------------------------------------------------------------- /basics/runtime/src/test/resources/org/jvnet/jaxb2_commons/lang/builder/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/runtime/src/test/resources/org/jvnet/jaxb2_commons/lang/builder/.gitkeep -------------------------------------------------------------------------------- /basics/runtime/src/test/resources/org/jvnet/jaxb2_commons/lang/tests/Test[0].xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /basics/samples/basic/src/main/assembly/src.xml: -------------------------------------------------------------------------------- 1 | 2 | src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | *.xml 13 | 14 | 15 | 16 | src 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /basics/samples/basic/src/main/java/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/samples/basic/src/main/java/.placeholder -------------------------------------------------------------------------------- /basics/samples/basic/src/test/java/org/jvnet/jaxb2_commons/tests/one/CopyableTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import junit.framework.Assert; 6 | 7 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 8 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 9 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 10 | 11 | public class CopyableTest extends AbstractSamplesTest { 12 | 13 | @Override 14 | protected void checkSample(File sample) throws Exception { 15 | 16 | final Object object = createContext().createUnmarshaller().unmarshal( 17 | sample); 18 | final Object copy = JAXBCopyStrategy.INSTANCE.copy(null, object); 19 | Assert.assertTrue("Source and copy must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, object, copy)); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/samples/basic/src/test/java/org/jvnet/jaxb2_commons/tests/one/EqualsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 6 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 7 | 8 | public class EqualsTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object lhs = createContext().createUnmarshaller().unmarshal(sample); 14 | final Object rhs = createContext().createUnmarshaller().unmarshal(sample); 15 | assertTrue("Values must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, lhs, rhs)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/basic/src/test/java/org/jvnet/jaxb2_commons/tests/one/ToStringTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 6 | import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 7 | 8 | public class ToStringTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object object = createContext().createUnmarshaller().unmarshal(sample); 14 | logger.debug(JAXBToStringStrategy.INSTANCE.append(null, new StringBuilder(), object).toString()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/basic/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /basics/samples/basic/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | b 4 | c 5 | d 6 | e 7 | 8 | 0 9 | 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/main/assembly/src.xml: -------------------------------------------------------------------------------- 1 | 2 | src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | build.xml 13 | 14 | 15 | 16 | src 17 | 18 | 19 | 20 | 21 | lib 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/main/java/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/samples/modular-ant/src/main/java/.placeholder -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/test/java/org/jvnet/jaxb2_commons/tests/one/CopyableTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import junit.framework.Assert; 6 | 7 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 8 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 9 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 10 | 11 | public class CopyableTest extends AbstractSamplesTest { 12 | 13 | @Override 14 | protected void checkSample(File sample) throws Exception { 15 | 16 | final Object object = createContext().createUnmarshaller().unmarshal( 17 | sample); 18 | final Object copy = JAXBCopyStrategy.INSTANCE.copy(null, object); 19 | Assert.assertTrue("Source and copy must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, object, copy)); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/test/java/org/jvnet/jaxb2_commons/tests/one/EqualsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 6 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 7 | 8 | public class EqualsTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object lhs = createContext().createUnmarshaller().unmarshal(sample); 14 | final Object rhs = createContext().createUnmarshaller().unmarshal(sample); 15 | assertTrue("Values must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, lhs, rhs)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/test/java/org/jvnet/jaxb2_commons/tests/one/ToStringTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 6 | import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 7 | 8 | public class ToStringTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object object = createContext().createUnmarshaller().unmarshal(sample); 14 | logger.debug(JAXBToStringStrategy.INSTANCE.append(null, new StringBuilder(), object).toString()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /basics/samples/modular-ant/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | b 4 | c 5 | d 6 | e 7 | 8 | 0 9 | 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /basics/samples/po/src/main/java/.placeholder: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/samples/po/src/main/java/.placeholder -------------------------------------------------------------------------------- /basics/samples/po/src/main/resources/bindings.xjb: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /basics/samples/po/src/test/java/org/jvnet/jaxb2_commons/tests/po/CopyableTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.po; 2 | 3 | import java.io.File; 4 | 5 | import junit.framework.Assert; 6 | 7 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 8 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 9 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 10 | 11 | public class CopyableTest extends AbstractSamplesTest { 12 | 13 | @Override 14 | protected void checkSample(File sample) throws Exception { 15 | 16 | final Object object = createContext().createUnmarshaller().unmarshal( 17 | sample); 18 | final Object copy = JAXBCopyStrategy.INSTANCE.copy(null, object); 19 | Assert.assertTrue("Source and copy must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, object, copy)); 20 | } 21 | 22 | } 23 | -------------------------------------------------------------------------------- /basics/samples/po/src/test/java/org/jvnet/jaxb2_commons/tests/po/EqualsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.po; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 6 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 7 | 8 | public class EqualsTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object lhs = createContext().createUnmarshaller().unmarshal(sample); 14 | final Object rhs = createContext().createUnmarshaller().unmarshal(sample); 15 | assertTrue("Values must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, lhs, rhs)); 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/po/src/test/java/org/jvnet/jaxb2_commons/tests/po/ToStringTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.po; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 6 | import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 7 | 8 | public class ToStringTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object object = createContext().createUnmarshaller().unmarshal(sample); 14 | logger.debug(JAXBToStringStrategy.INSTANCE.append(null, new StringBuilder(), object).toString()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/samples/po/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /basics/samples/po/src/test/samples/po.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Alice Smith 4 | 123 Maple Street 5 | Mill Valley 6 | CA 7 | 90952 8 | 9 | 10 | Robert Smith 11 | 8 Oak Avenue 12 | Old Town 13 | PA 14 | 95819 15 | 16 | Hurry, my lawn is going wild! 17 | 18 | 19 | Lawnmower 20 | 1 21 | 148.95 22 | Confirm this is electric 23 | 24 | 25 | Baby Monitor 26 | 1 27 | 39.98 28 | 1999-05-21 29 | 30 | 31 | -------------------------------------------------------------------------------- /basics/samples/src/main/assembly/ant-src.xml: -------------------------------------------------------------------------------- 1 | 2 | ant-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | build.xml 13 | 14 | 15 | 16 | src 17 | 18 | 19 | 20 | 21 | lib 22 | 23 | 24 | 25 | 26 | ${basedir}/project-build.xml 27 | build.xml 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /basics/samples/src/main/assembly/maven-src.xml: -------------------------------------------------------------------------------- 1 | 2 | maven-src 3 | 4 | zip 5 | 6 | 7 | 8 | 9 | README* 10 | LICENSE* 11 | NOTICE* 12 | 13 | 14 | 15 | src 16 | 17 | 18 | a 19 | 20 | 21 | b 22 | 23 | 24 | 25 | 26 | ${basedir}/project-pom.xml 27 | pom.xml 28 | true 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /basics/testing/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /basics/testing/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-testing 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/testing/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /basics/testing/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /basics/testing/src/test/java/org/jvnet/jaxb2_commons/test/tests/TrivialSamplesTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.test.tests; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 6 | 7 | public class TrivialSamplesTest extends AbstractSamplesTest { 8 | 9 | @Override 10 | protected void checkSample(File sample) throws Exception { 11 | assertTrue("Wrong extension.", sample.getName().endsWith(".xml")); 12 | } 13 | 14 | } 15 | -------------------------------------------------------------------------------- /basics/testing/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /basics/testing/src/test/samples/2.xml: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /basics/tests/build-1.5.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA5_HOME% 3 | call mvn clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /basics/tests/build-1.6.bat: -------------------------------------------------------------------------------- 1 | setlocal 2 | set JAVA_HOME=%JAVA6_HOME% 3 | call mvn clean install >std 2>err 4 | endlocal -------------------------------------------------------------------------------- /basics/tests/episodes/a/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | org.jvnet.jaxb2_commons 7 | jaxb2-basics-test-episodes 8 | 0.8.3-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxb2-basics-test-episodes-a 12 | jar 13 | JAXB2 Basics - Test [episodes-a] 14 | 15 | test 16 | 17 | 18 | org.jvnet.jaxb2.maven2 19 | maven-jaxb2-plugin 20 | 21 | true 22 | 23 | -XtoString 24 | -Xequals 25 | -XhashCode 26 | -Xcopyable 27 | -Xmergeable 28 | 29 | 30 | 31 | org.jvnet.jaxb2_commons 32 | jaxb2-basics 33 | 34 | 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /basics/tests/episodes/a/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /basics/tests/episodes/a/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /basics/tests/episodes/a/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/episodes/a/src/test/java/.gitkeep -------------------------------------------------------------------------------- /basics/tests/episodes/a/src/test/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/episodes/a/src/test/resources/.gitkeep -------------------------------------------------------------------------------- /basics/tests/episodes/a/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | test 4 | 5 | -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/main/resources/a.xsd: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/main/resources/b.xsd: -------------------------------------------------------------------------------- 1 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/episodes/b/src/test/java/.gitkeep -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/test/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/episodes/b/src/test/resources/.gitkeep -------------------------------------------------------------------------------- /basics/tests/episodes/b/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | test 4 | 5 | 6 | test 7 | 8 | -------------------------------------------------------------------------------- /basics/tests/episodes/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | org.jvnet.jaxb2_commons 7 | jaxb2-basics-tests 8 | 0.8.3-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxb2-basics-test-episodes 12 | pom 13 | JAXB2 Basics - Test [episodes] 14 | 15 | a 16 | b 17 | 18 | 19 | test 20 | 21 | -------------------------------------------------------------------------------- /basics/tests/ignoring/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | org.jvnet.jaxb2_commons 7 | jaxb2-basics-tests 8 | 0.7.1-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxb2-basics-test-ignoring 12 | jar 13 | JAXB2 Basics - Test [ignoring] 14 | 15 | test 16 | 17 | 18 | org.jvnet.jaxb2.maven2 19 | maven-jaxb2-plugin 20 | 21 | true 22 | 23 | -XtoString 24 | -Xequals 25 | -XhashCode 26 | -Xcopyable 27 | -Xmergeable 28 | 29 | 30 | 31 | org.jvnet.jaxb2_commons 32 | jaxb2-basics 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /basics/tests/issues/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-test-issues 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB14BaseClass.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public class IssueJIIB14BaseClass { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB14BaseInterfaceFour.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public interface IssueJIIB14BaseInterfaceFour { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB14BaseInterfaceOne.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public interface IssueJIIB14BaseInterfaceOne { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB14BaseInterfaceThree.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public interface IssueJIIB14BaseInterfaceThree { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB14BaseInterfaceTwo.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public interface IssueJIIB14BaseInterfaceTwo { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB42EqualsStrategy.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 4 | import org.jvnet.jaxb2_commons.locator.ObjectLocator; 5 | 6 | public class IssueJIIB42EqualsStrategy extends JAXBEqualsStrategy { 7 | 8 | @Override 9 | public boolean equals(ObjectLocator leftLocator, 10 | ObjectLocator rightLocator, Object lhs, Object rhs) { 11 | if (lhs instanceof IssueJIIB1Type && rhs instanceof IssueJIIB1Type) { 12 | // Quasi custom equals 13 | return super.equals(leftLocator, rightLocator, lhs, rhs); 14 | } else { 15 | return super.equals(leftLocator, rightLocator, lhs, rhs); 16 | } 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB48Interface.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public interface IssueJIIB48Interface { 4 | 5 | public T getValue(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/java/org/jvnet/jaxb2_commons/tests/issues/IssueJIIB53ABaseClass.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | public class IssueJIIB53ABaseClass { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tests/issues/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | java.lang.Cloneable 12 | 13 | 14 | 15 | java.lang.Cloneable 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/CopyableTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import java.io.File; 4 | 5 | import junit.framework.Assert; 6 | 7 | import org.jvnet.jaxb2_commons.lang.CopyStrategy; 8 | import org.jvnet.jaxb2_commons.lang.EqualsStrategy; 9 | import org.jvnet.jaxb2_commons.lang.ExtendedJAXBEqualsStrategy; 10 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 11 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 12 | 13 | public class CopyableTest extends AbstractSamplesTest { 14 | 15 | @Override 16 | protected void checkSample(File sample) throws Exception { 17 | 18 | final Object original = createContext().createUnmarshaller().unmarshal( 19 | sample); 20 | final CopyStrategy copyStrategy = new JAXBCopyStrategy(); 21 | final Object copy = copyStrategy.copy(null, original); 22 | final EqualsStrategy equalsStrategy = new ExtendedJAXBEqualsStrategy(); 23 | Assert.assertTrue("Source and copy must be equal.", equalsStrategy 24 | .equals(null, null, original, copy)); 25 | } 26 | 27 | } 28 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB10Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import java.lang.reflect.Field; 4 | 5 | import javax.xml.bind.annotation.XmlAnyElement; 6 | 7 | import junit.framework.Assert; 8 | import junit.framework.TestCase; 9 | 10 | public class JIIB10Test extends TestCase { 11 | 12 | public void testXmlAnyElementLax() throws Exception { 13 | 14 | final Field contentField = IssueJIIB10Type.class.getDeclaredField("content"); 15 | final XmlAnyElement xmlAnyElementAnnotation = contentField 16 | .getAnnotation(XmlAnyElement.class); 17 | Assert.assertTrue(xmlAnyElementAnnotation.lax()); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB14Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import junit.framework.Assert; 4 | import junit.framework.TestCase; 5 | 6 | public class JIIB14Test extends TestCase { 7 | 8 | public void testIssueJIIB14() throws Exception { 9 | Assert.assertEquals(IssueJIIB14BaseClass.class, 10 | IssueJIIB14Element.class.getSuperclass()); 11 | Assert.assertTrue(IssueJIIB14BaseInterfaceOne.class 12 | .isAssignableFrom(IssueJIIB14Element.class)); 13 | Assert.assertTrue(IssueJIIB14BaseInterfaceTwo.class 14 | .isAssignableFrom(IssueJIIB14Element.class)); 15 | Assert.assertTrue(IssueJIIB14BaseInterfaceThree.class 16 | .isAssignableFrom(IssueJIIB14JAXBElement.class)); 17 | Assert.assertTrue(IssueJIIB14BaseInterfaceFour.class 18 | .isAssignableFrom(IssueJIIB14JAXBElement.class)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB20Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import java.util.Arrays; 4 | import java.util.List; 5 | 6 | import junit.framework.Assert; 7 | import junit.framework.TestCase; 8 | 9 | public class JIIB20Test extends TestCase { 10 | 11 | public void testException() throws Exception { 12 | 13 | final List strings = Arrays.asList("a", "b", "c"); 14 | final IssueJIIB20 one = new IssueJIIB20(); 15 | one.setStrings(strings); 16 | Assert.assertEquals(strings, one.getStrings()); 17 | Assert.assertSame(strings, one.getStrings()); 18 | 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB35Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import javax.xml.bind.JAXBContext; 4 | 5 | import junit.framework.Assert; 6 | import junit.framework.TestCase; 7 | 8 | import org.jvnet.jaxb2_commons.lang.ContextUtils; 9 | 10 | public class JIIB35Test extends TestCase { 11 | 12 | public void testException() throws Exception { 13 | 14 | final ObjectFactory objectFactory = new ObjectFactory(); 15 | 16 | final IssueJIIB35 one = objectFactory.createIssueJIIB35(); 17 | final IssueJIIB35 two = objectFactory.createIssueJIIB35(); 18 | final IssueJIIB35 three = objectFactory.createIssueJIIB35(); 19 | final IssueJIIB35 four = objectFactory.createIssueJIIB35(); 20 | 21 | final JAXBContext context = JAXBContext.newInstance(IssueJIIB35.class); 22 | 23 | final String alpha = ContextUtils.toString(context, one); 24 | two.hashCode(); 25 | final String beta = ContextUtils.toString(context, two); 26 | three.equals(null); 27 | final String gamma = ContextUtils.toString(context, three); 28 | four.toString(); 29 | final String delta = ContextUtils.toString(context, four); 30 | 31 | Assert.assertEquals(alpha, beta); 32 | Assert.assertEquals(beta, gamma); 33 | Assert.assertEquals(gamma, delta); 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB36Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import junit.framework.Assert; 4 | import junit.framework.TestCase; 5 | 6 | public class JIIB36Test extends TestCase { 7 | 8 | public void testException() throws Exception { 9 | 10 | final IssueJIIB36 one = new IssueJIIB36(); 11 | final IssueJIIB36 two = new IssueJIIB36(); 12 | 13 | Assert.assertTrue(one.equals(two)); 14 | Assert.assertTrue(two.equals(one)); 15 | Assert.assertEquals(one.hashCode(), two.hashCode()); 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB38Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import junit.framework.Assert; 4 | import junit.framework.TestCase; 5 | 6 | public class JIIB38Test extends TestCase { 7 | 8 | public void testException() throws Exception { 9 | 10 | final IssueJIIB38 one = new IssueJIIB38(); 11 | final IssueJIIB38Type two = IssueJIIB38Type.A; 12 | 13 | Assert.assertTrue(one instanceof Cloneable); 14 | Assert.assertTrue(two instanceof Cloneable); 15 | 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/java/org/jvnet/jaxb2_commons/tests/issues/JIIB8Test.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.issues; 2 | 3 | import java.util.Arrays; 4 | 5 | import junit.framework.Assert; 6 | import junit.framework.TestCase; 7 | 8 | public class JIIB8Test extends TestCase { 9 | 10 | public void testCollectionSetters() throws Exception { 11 | 12 | final IssueJIIB8Type one = new IssueJIIB8Type(); 13 | 14 | one.setValue(Arrays.asList("1", "2", "3")); 15 | 16 | Assert.assertEquals(3, one.getValue().size()); 17 | 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/resources/org/jvnet/jaxb2_commons/tests/issues/issueJIIB44_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/resources/org/jvnet/jaxb2_commons/tests/issues/issueJIIB44_1.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/resources/org/jvnet/jaxb2_commons/tests/issues/issueJIIB44_2.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | b 4 | 0 5 | c 6 | 1 7 | 2 8 | -------------------------------------------------------------------------------- /basics/tests/issues/src/test/samples/issue16[0].xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /basics/tests/one/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-test-one 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/tests/one/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/resources=UTF-8 3 | encoding//src/test/java=UTF-8 4 | encoding//src/test/resources=UTF-8 5 | encoding//target/generated-sources/xjc=UTF-8 6 | encoding/=UTF-8 7 | -------------------------------------------------------------------------------- /basics/tests/one/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /basics/tests/one/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 14 | 15 | 17 | 18 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/java/org/jvnet/jaxb2_commons/tests/one/CopyableTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import junit.framework.Assert; 6 | 7 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 8 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 9 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 10 | 11 | public class CopyableTest extends AbstractSamplesTest { 12 | 13 | @Override 14 | protected void checkSample(File sample) throws Exception { 15 | 16 | final Object original = createContext().createUnmarshaller().unmarshal( 17 | sample); 18 | final Object copy = JAXBCopyStrategy.INSTANCE.copy(null, original); 19 | Assert.assertTrue("Source and copy must be equal.", 20 | JAXBEqualsStrategy.INSTANCE.equals(null, null, original, copy)); 21 | } 22 | 23 | } 24 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/java/org/jvnet/jaxb2_commons/tests/one/EqualsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 6 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 7 | 8 | public class EqualsTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object lhs = createContext().createUnmarshaller().unmarshal( 14 | sample); 15 | final Object rhs = createContext().createUnmarshaller().unmarshal( 16 | sample); 17 | assertTrue("Values must be equal.", JAXBEqualsStrategy.INSTANCE.equals( 18 | null, null, lhs, rhs)); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/java/org/jvnet/jaxb2_commons/tests/one/HashCodeTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBCopyStrategy; 6 | import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy; 7 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 8 | 9 | public class HashCodeTest extends AbstractSamplesTest { 10 | 11 | @Override 12 | protected void checkSample(File sample) throws Exception { 13 | 14 | final Object lhs = createContext().createUnmarshaller().unmarshal( 15 | sample); 16 | final Object rhs = createContext().createUnmarshaller().unmarshal( 17 | sample); 18 | final Object chs = JAXBCopyStrategy.INSTANCE.copy(null, rhs); 19 | final int leftHashCode = JAXBHashCodeStrategy.INSTANCE.hashCode(null, 20 | 0, lhs); 21 | final int rightHashCode = JAXBHashCodeStrategy.INSTANCE.hashCode(null, 22 | 0, rhs); 23 | final int copyHashCode = JAXBHashCodeStrategy.INSTANCE.hashCode(null, 24 | 0, chs); 25 | assertEquals("Values must be equal.", leftHashCode, rightHashCode); 26 | assertEquals("Values must be equal.", leftHashCode, copyHashCode); 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/java/org/jvnet/jaxb2_commons/tests/one/RunOnePlugin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.util.ArrayList; 4 | import java.util.List; 5 | 6 | import org.jvnet.jaxb2.maven2.AbstractXJC2Mojo; 7 | import org.jvnet.jaxb2.maven2.test.RunXJC2Mojo; 8 | 9 | public class RunOnePlugin extends RunXJC2Mojo { 10 | 11 | @Override 12 | protected void configureMojo(AbstractXJC2Mojo mojo) { 13 | super.configureMojo(mojo); 14 | mojo.setExtension(true); 15 | mojo.setForceRegenerate(true); 16 | mojo.setDebug(false); 17 | } 18 | 19 | @Override 20 | public List getArgs() { 21 | final List args = new ArrayList(super.getArgs()); 22 | args.add("-XtoString"); 23 | args.add("-Xequals"); 24 | args.add("-XhashCode"); 25 | args.add("-Xcopyable"); 26 | args.add("-Xmergeable"); 27 | args.add("-Xinheritance"); 28 | args.add("-Xsetters"); 29 | args.add("-Xwildcard"); 30 | return args; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/java/org/jvnet/jaxb2_commons/tests/one/ToStringTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.one; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 6 | import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy; 7 | 8 | public class ToStringTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | protected void checkSample(File sample) throws Exception { 12 | 13 | final Object object = createContext().createUnmarshaller().unmarshal(sample); 14 | System.out.println(JAXBToStringStrategy.INSTANCE.append(null, new StringBuilder(), object).toString()); 15 | } 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /basics/tests/one/src/test/samples/1.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | b 4 | c 5 | d 6 | e 7 | 8 | 0 9 | 1 10 | 11 | 12 | -------------------------------------------------------------------------------- /basics/tests/one/src/test/samples/2.xml: -------------------------------------------------------------------------------- 1 | 2 | a 3 | 2001-01-01T00:00:00 4 | 5 | -------------------------------------------------------------------------------- /basics/tests/wildcard/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-test-wildcard 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/tests/wildcard/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding//src/test/java=UTF-8 5 | encoding//src/test/resources=UTF-8 6 | encoding//target/generated-sources/xjc=UTF-8 7 | encoding/=UTF-8 8 | -------------------------------------------------------------------------------- /basics/tests/wildcard/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 3 | org.eclipse.jdt.core.compiler.compliance=1.6 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.6 6 | -------------------------------------------------------------------------------- /basics/tests/wildcard/src/main/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/wildcard/src/main/java/.gitkeep -------------------------------------------------------------------------------- /basics/tests/wildcard/src/main/resources/binding.xjb: -------------------------------------------------------------------------------- 1 | 8 | 9 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /basics/tests/wildcard/src/main/resources/schema.xsd: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 9 | 10 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | -------------------------------------------------------------------------------- /basics/tests/wildcard/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/wildcard/src/test/java/.gitkeep -------------------------------------------------------------------------------- /basics/tests/wildcard/src/test/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/wildcard/src/test/resources/.gitkeep -------------------------------------------------------------------------------- /basics/tests/wildcard/src/test/samples/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tests/wildcard/src/test/samples/.gitkeep -------------------------------------------------------------------------------- /basics/tests/zj/pom.xml: -------------------------------------------------------------------------------- 1 | 4 | 4.0.0 5 | 6 | org.jvnet.jaxb2_commons 7 | jaxb2-basics-tests 8 | 0.8.3-SNAPSHOT 9 | ../pom.xml 10 | 11 | jaxb2-basics-test-zj 12 | jar 13 | JAXB2 Basics - Test [zj] 14 | 15 | test 16 | 17 | 18 | org.jvnet.jaxb2.maven2 19 | maven-jaxb2-plugin 20 | 21 | 22 | -XtoString 23 | -Xequals 24 | -XhashCode 25 | -Xcopyable 26 | 27 | 28 | 29 | org.jvnet.jaxb2_commons 30 | jaxb2-basics 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /basics/tests/zj/src/test/java/org/jvnet/jaxb2_commons/tests/zj/EqualsTest.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.tests.zj; 2 | 3 | import java.io.File; 4 | 5 | import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy; 6 | import org.jvnet.jaxb2_commons.test.AbstractSamplesTest; 7 | 8 | public class EqualsTest extends AbstractSamplesTest { 9 | 10 | @Override 11 | public String getContextPath() { 12 | return "com.oce.obis.sei.api.data"; 13 | } 14 | 15 | @Override 16 | protected void checkSample(File sample) throws Exception { 17 | final Object lhs = createContext().createUnmarshaller().unmarshal(sample); 18 | final Object rhs = createContext().createUnmarshaller().unmarshal(sample); 19 | assertTrue("Values must be equal.", JAXBEqualsStrategy.INSTANCE.equals(null, null, lhs, rhs)); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /basics/tests/zj/src/test/resources/log4j.properties: -------------------------------------------------------------------------------- 1 | log4j.rootCategory=DEBUG, stdout 2 | log4j.appender.stdout=org.apache.log4j.ConsoleAppender 3 | log4j.appender.stdout.target=system.out 4 | log4j.appender.stdout.layout=org.apache.log4j.PatternLayout 5 | log4j.appender.stdout.layout.ConversionPattern=%d %p [%c] - <%m>%n -------------------------------------------------------------------------------- /basics/tools/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /basics/tools/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | jaxb2-basics-tools 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/strategy/ClassOutlineProcessor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.strategy; 2 | 3 | import com.sun.tools.xjc.Options; 4 | import com.sun.tools.xjc.outline.ClassOutline; 5 | 6 | public interface ClassOutlineProcessor { 7 | public T process(C context, ClassOutline classOutline, Options options) throws Exception; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/strategy/FieldOutlineProcessor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.strategy; 2 | 3 | import com.sun.tools.xjc.Options; 4 | import com.sun.tools.xjc.outline.FieldOutline; 5 | 6 | public interface FieldOutlineProcessor { 7 | public T process(C context, FieldOutline fieldOutline, Options options) throws Exception; 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/strategy/OutlineProcessor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.strategy; 2 | 3 | import com.sun.tools.xjc.Options; 4 | import com.sun.tools.xjc.outline.Outline; 5 | 6 | public interface OutlineProcessor { 7 | 8 | public T process(C context, Outline outline, Options options) throws Exception; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/strategy/PackageOutlineProcessor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.strategy; 2 | 3 | import com.sun.tools.xjc.Options; 4 | import com.sun.tools.xjc.outline.PackageOutline; 5 | 6 | public interface PackageOutlineProcessor { 7 | public T process(C context, PackageOutline packageOutline, Options options) 8 | throws Exception; 9 | 10 | } 11 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/util/FieldAccessorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.util; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.FieldAccessorEx; 4 | 5 | import com.sun.codemodel.JExpression; 6 | import com.sun.tools.xjc.outline.FieldOutline; 7 | 8 | public interface FieldAccessorFactory { 9 | 10 | public FieldAccessorEx createFieldAccessor(FieldOutline fieldOutline, 11 | JExpression targetObject); 12 | } 13 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MClassOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MClassOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MClassOutlineGenerator { 12 | 13 | public MClassOutline generate(MPackageOutline parent, MModelInfo modelInfo, 14 | MClassInfo classInfo); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MElementOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MElementOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MElementInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MElementOutlineGenerator { 12 | 13 | public MElementOutline generate(MPackageOutline parent, 14 | MModelInfo modelInfo, 15 | MElementInfo elementInfo); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MEnumConstantOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MEnumConstantOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MEnumOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumConstantInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MEnumConstantOutlineGenerator { 12 | 13 | public MEnumConstantOutline generate(MEnumOutline parent, 14 | MModelInfo modelInfo, 15 | MEnumConstantInfo enumConstantInfo); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MEnumOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MEnumOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumLeafInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MEnumOutlineGenerator { 12 | 13 | public MEnumOutline generate(MPackageOutline parent, 14 | MModelInfo modelInfo, 15 | MEnumLeafInfo enumLeafInfo); 16 | } 17 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MModelOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MModelOutline; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 5 | 6 | import com.sun.tools.xjc.model.nav.NClass; 7 | import com.sun.tools.xjc.model.nav.NType; 8 | 9 | public interface MModelOutlineGenerator { 10 | 11 | public MModelOutline generate(MModelInfo modelInfo); 12 | 13 | } 14 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MObjectFactoryOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MObjectFactoryOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MObjectFactoryOutlineGenerator { 12 | 13 | public MObjectFactoryOutline generate(MPackageOutline parent, 14 | MModelInfo modelInfo, MPackageInfo packageInfo); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MPackageOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MModelOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MPackageOutlineGenerator { 12 | 13 | public MPackageOutline generate(MModelOutline parent, 14 | MModelInfo modelInfo, MPackageInfo packageInfo); 15 | 16 | } 17 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/MPropertyOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.outline.MClassOutline; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyOutline; 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfo; 7 | 8 | import com.sun.tools.xjc.model.nav.NClass; 9 | import com.sun.tools.xjc.model.nav.NType; 10 | 11 | public interface MPropertyOutlineGenerator { 12 | 13 | public MPropertyOutline generate(MClassOutline classOutline, 14 | MModelInfo modelInfo, 15 | MPropertyInfo propertyInfo); 16 | } 17 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/artificial/WrapperPropertyOutlineGenerator.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.artificial; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MPropertyOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MClassOutline; 5 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyAccessor; 6 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyAccessorFactory; 7 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyOutline; 8 | import org.jvnet.jaxb2_commons.xjc.outline.concrete.CMPropertyOutline; 9 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 10 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfo; 11 | 12 | import com.sun.codemodel.JExpression; 13 | import com.sun.tools.xjc.model.nav.NClass; 14 | import com.sun.tools.xjc.model.nav.NType; 15 | 16 | public class WrapperPropertyOutlineGenerator implements 17 | MPropertyOutlineGenerator { 18 | 19 | public MPropertyOutline generate(MClassOutline classOutline, 20 | MModelInfo modelInfo, 21 | MPropertyInfo propertyInfo) { 22 | return new CMPropertyOutline(classOutline, propertyInfo, 23 | new MPropertyAccessorFactory() { 24 | 25 | public MPropertyAccessor createPropertyAccessor( 26 | JExpression target) { 27 | // TODO 28 | throw new UnsupportedOperationException(); 29 | } 30 | }); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/ClassOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MClassOutlineGenerator; 4 | 5 | public interface ClassOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/ElementOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MElementOutlineGenerator; 4 | 5 | public interface ElementOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/EnumConstantOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MEnumConstantOutlineGenerator; 4 | 5 | public interface EnumConstantOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/EnumOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MEnumOutlineGenerator; 4 | 5 | public interface EnumOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/ModelOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MModelOutlineGenerator; 4 | 5 | public interface ModelOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/OutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import com.sun.tools.xjc.outline.Outline; 4 | 5 | public interface OutlineGeneratorFactory { 6 | 7 | public G createGenerator(Outline outline); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/PackageOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MPackageOutlineGenerator; 4 | 5 | public interface PackageOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/concrete/PropertyOutlineGeneratorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.generator.concrete; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MPropertyOutlineGenerator; 4 | 5 | public interface PropertyOutlineGeneratorFactory extends 6 | OutlineGeneratorFactory { 7 | 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/outline/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/generator/outline/.gitkeep -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/DefaultPropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.lang.Validate; 4 | import org.jvnet.jaxb2_commons.xjc.generator.MPropertyOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.PropertyOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 7 | 8 | import com.sun.tools.xjc.outline.Outline; 9 | 10 | public class DefaultPropertyInfoOrigin implements MPropertyInfoOrigin, 11 | PropertyOutlineGeneratorFactory { 12 | 13 | private final MPropertyOutlineGenerator generator; 14 | 15 | public DefaultPropertyInfoOrigin(MPropertyOutlineGenerator generator) { 16 | Validate.notNull(generator); 17 | this.generator = generator; 18 | } 19 | 20 | public MPropertyOutlineGenerator createGenerator(Outline outline) { 21 | return generator; 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/DummyPropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.origin.MPropertyInfoOrigin; 4 | 5 | public class DummyPropertyInfoOrigin implements MPropertyInfoOrigin { 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/PackageInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MSourced; 4 | 5 | import com.sun.codemodel.JPackage; 6 | 7 | public interface PackageInfoOrigin extends MSourced { 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMClassInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MClassOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMClassOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.ClassOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMClassInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.CClassInfo; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMClassInfoOrigin extends 14 | CMClassInfoOrigin implements 15 | ClassOutlineGeneratorFactory { 16 | 17 | public XJCCMClassInfoOrigin(CClassInfo source) { 18 | super(source); 19 | } 20 | 21 | public MClassOutlineGenerator createGenerator(Outline outline) { 22 | return new CMClassOutlineGenerator(outline, getSource()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMElementInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MElementOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMElementOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.ElementOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMElementInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.CElementInfo; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMElementInfoOrigin extends 14 | CMElementInfoOrigin implements 15 | ElementOutlineGeneratorFactory { 16 | 17 | public XJCCMElementInfoOrigin(CElementInfo source) { 18 | super(source); 19 | } 20 | 21 | public MElementOutlineGenerator createGenerator(Outline outline) { 22 | return new CMElementOutlineGenerator(outline, getSource()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMEnumConstantInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MEnumConstantOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMEnumConstantOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.EnumConstantOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMEnumConstantInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.CEnumConstant; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMEnumConstantInfoOrigin extends 14 | CMEnumConstantInfoOrigin implements 15 | EnumConstantOutlineGeneratorFactory { 16 | 17 | public XJCCMEnumConstantInfoOrigin(CEnumConstant source) { 18 | super(source); 19 | } 20 | 21 | public MEnumConstantOutlineGenerator createGenerator(Outline outline) { 22 | return new CMEnumConstantOutlineGenerator(outline, getSource()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMEnumLeafInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MEnumOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMEnumOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.EnumOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMEnumLeafInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.CEnumLeafInfo; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMEnumLeafInfoOrigin extends 14 | CMEnumLeafInfoOrigin implements 15 | EnumOutlineGeneratorFactory { 16 | 17 | public XJCCMEnumLeafInfoOrigin(CEnumLeafInfo source) { 18 | super(source); 19 | } 20 | 21 | public MEnumOutlineGenerator createGenerator(Outline outline) { 22 | return new CMEnumOutlineGenerator(outline, getSource()); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMModelInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MModelOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMModelOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.ModelOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMModelInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.Model; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMModelInfoOrigin extends 14 | CMModelInfoOrigin implements 15 | ModelOutlineGeneratorFactory { 16 | 17 | public XJCCMModelInfoOrigin(Model source) { 18 | super(source); 19 | } 20 | 21 | public MModelOutlineGenerator createGenerator(Outline outline) { 22 | return new CMModelOutlineGenerator(outline, getSource()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMPackageInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.apache.commons.lang3.Validate; 4 | import org.jvnet.jaxb2_commons.xjc.generator.MPackageOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMPackageOutlineGenerator; 6 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.PackageOutlineGeneratorFactory; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMPackageInfoOrigin; 8 | 9 | import com.sun.codemodel.JPackage; 10 | import com.sun.tools.xjc.outline.Outline; 11 | 12 | public class XJCCMPackageInfoOrigin extends CMPackageInfoOrigin implements 13 | PackageInfoOrigin, PackageOutlineGeneratorFactory { 14 | 15 | private final JPackage source; 16 | 17 | public XJCCMPackageInfoOrigin(JPackage source) { 18 | Validate.notNull(source); 19 | this.source = source; 20 | } 21 | 22 | public JPackage getSource() { 23 | return source; 24 | } 25 | 26 | public MPackageOutlineGenerator createGenerator(Outline outline) { 27 | return new CMPackageOutlineGenerator(outline, getSource()); 28 | } 29 | 30 | } 31 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/model/concrete/origin/XJCCMPropertyInfoOrigin.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.model.concrete.origin; 2 | 3 | import org.jvnet.jaxb2_commons.xjc.generator.MPropertyOutlineGenerator; 4 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.CMPropertyOutlineGenerator; 5 | import org.jvnet.jaxb2_commons.xjc.generator.concrete.PropertyOutlineGeneratorFactory; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.concrete.origin.CMPropertyInfoOrigin; 7 | 8 | import com.sun.tools.xjc.model.CPropertyInfo; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | import com.sun.tools.xjc.outline.Outline; 12 | 13 | public class XJCCMPropertyInfoOrigin extends 14 | CMPropertyInfoOrigin implements 15 | PropertyOutlineGeneratorFactory { 16 | 17 | public XJCCMPropertyInfoOrigin(CPropertyInfo source) { 18 | super(source); 19 | } 20 | 21 | public MPropertyOutlineGenerator createGenerator(Outline outline) { 22 | return new CMPropertyOutlineGenerator(outline, getSource()); 23 | } 24 | 25 | } 26 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/FieldAccessorEx.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import com.sun.codemodel.JType; 4 | import com.sun.tools.xjc.outline.FieldAccessor; 5 | 6 | public interface FieldAccessorEx extends FieldAccessor { 7 | 8 | public JType getType(); 9 | 10 | public boolean isConstant(); 11 | 12 | public boolean isVirtual(); 13 | 14 | public boolean isAlwaysSet(); 15 | } 16 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MChildOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | public interface MChildOutline { 4 | 5 | public MModelOutline getParent(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MClassOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import java.util.List; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 7 | 8 | import com.sun.codemodel.JClass; 9 | import com.sun.codemodel.JDefinedClass; 10 | import com.sun.tools.xjc.model.nav.NClass; 11 | import com.sun.tools.xjc.model.nav.NType; 12 | 13 | public interface MClassOutline extends MChildOutline, MPackagedOutline, 14 | MTargeted> { 15 | 16 | public MClassOutline getSuperClassOutline(); 17 | 18 | public List getPropertyOutlines(); 19 | 20 | public List getDeclaredPropertyOutlines(); 21 | 22 | public JDefinedClass getReferenceCode(); 23 | 24 | public JDefinedClass getImplementationCode(); 25 | 26 | public JClass getImplementationReferenceCode(); 27 | } 28 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MElementOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MElementInfo; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 5 | 6 | import com.sun.codemodel.JDefinedClass; 7 | import com.sun.tools.xjc.model.nav.NClass; 8 | import com.sun.tools.xjc.model.nav.NType; 9 | 10 | public interface MElementOutline extends MChildOutline, MPackagedOutline, 11 | MTargeted> { 12 | 13 | public JDefinedClass getCode(); 14 | } 15 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MEnumConstantOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumConstantInfo; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 5 | 6 | import com.sun.codemodel.JEnumConstant; 7 | import com.sun.tools.xjc.model.nav.NClass; 8 | import com.sun.tools.xjc.model.nav.NType; 9 | 10 | public interface MEnumConstantOutline extends 11 | MTargeted> { 12 | 13 | public MEnumOutline getEnumOutline(); 14 | 15 | public JEnumConstant getCode(); 16 | 17 | } 18 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MEnumOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import java.util.List; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumLeafInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 7 | 8 | import com.sun.codemodel.JDefinedClass; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | 12 | public interface MEnumOutline extends MChildOutline, MPackagedOutline, 13 | MTargeted> { 14 | 15 | public List getEnumConstantOutlines(); 16 | 17 | public JDefinedClass getCode(); 18 | } 19 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MModelOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import java.util.Collection; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MClassInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MElementInfo; 7 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumLeafInfo; 8 | import org.jvnet.jaxb2_commons.xml.bind.model.MModelInfo; 9 | import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; 10 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 11 | 12 | import com.sun.codemodel.JCodeModel; 13 | import com.sun.tools.xjc.model.nav.NClass; 14 | import com.sun.tools.xjc.model.nav.NType; 15 | 16 | public interface MModelOutline extends MTargeted> { 17 | 18 | public Collection getPackageOutlines(); 19 | 20 | public MPackageOutline getPackageOutline(MPackageInfo target); 21 | 22 | public Collection getElementOutlines(); 23 | 24 | public MElementOutline getElementOutline(MElementInfo target); 25 | 26 | public Collection getClassOutlines(); 27 | 28 | public MClassOutline getClassOutline(MClassInfo target); 29 | 30 | public Collection getEnumOutlines(); 31 | 32 | public MEnumOutline getEnumOutline(MEnumLeafInfo target); 33 | 34 | public JCodeModel getCode(); 35 | } 36 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MObjectFactoryOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import com.sun.codemodel.JDefinedClass; 4 | 5 | public interface MObjectFactoryOutline extends MChildOutline, MPackagedOutline { 6 | 7 | public JDefinedClass getCode(); 8 | } 9 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MPackageOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import java.util.Collection; 4 | 5 | import org.jvnet.jaxb2_commons.xml.bind.model.MPackageInfo; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 7 | 8 | import com.sun.codemodel.JPackage; 9 | 10 | public interface MPackageOutline extends MChildOutline, MTargeted { 11 | 12 | public MPackageInfo getTarget(); 13 | 14 | public Collection getElementOutlines(); 15 | 16 | public Collection getClassOutlines(); 17 | 18 | public Collection getEnumOutlines(); 19 | 20 | public MObjectFactoryOutline getObjectFactoryOutline(); 21 | 22 | public JPackage getCode(); 23 | 24 | } 25 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MPackagedOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | public interface MPackagedOutline { 4 | 5 | public MPackageOutline getPackageOutline(); 6 | 7 | } 8 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MPropertyAccessor.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import com.sun.codemodel.JBlock; 4 | import com.sun.codemodel.JExpression; 5 | import com.sun.codemodel.JType; 6 | import com.sun.codemodel.JVar; 7 | 8 | public interface MPropertyAccessor { 9 | 10 | public void get(JBlock block, JVar variable); 11 | 12 | public void set(JBlock block, String uniqueName, JExpression value); 13 | 14 | public void unset(JBlock body); 15 | 16 | public JExpression isSet(); 17 | 18 | public JType getType(); 19 | 20 | public boolean isConstant(); 21 | 22 | public boolean isVirtual(); 23 | } 24 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MPropertyAccessorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import com.sun.codemodel.JExpression; 4 | 5 | public interface MPropertyAccessorFactory { 6 | 7 | public MPropertyAccessor createPropertyAccessor(JExpression target); 8 | 9 | } 10 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/MPropertyOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline; 2 | 3 | import org.jvnet.jaxb2_commons.xml.bind.model.MPropertyInfo; 4 | import org.jvnet.jaxb2_commons.xml.bind.model.MTargeted; 5 | 6 | import com.sun.tools.xjc.model.nav.NClass; 7 | import com.sun.tools.xjc.model.nav.NType; 8 | 9 | public interface MPropertyOutline extends 10 | MTargeted>, MPropertyAccessorFactory { 11 | 12 | public MClassOutline getClassOutline(); 13 | 14 | } 15 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/artificial/AbstractPropertyAccessorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline.artificial; 2 | 3 | public class AbstractPropertyAccessorFactory { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/concrete/CMEnumConstantOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline.concrete; 2 | 3 | import org.apache.commons.lang3.Validate; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MEnumConstantOutline; 5 | import org.jvnet.jaxb2_commons.xjc.outline.MEnumOutline; 6 | import org.jvnet.jaxb2_commons.xml.bind.model.MEnumConstantInfo; 7 | 8 | import com.sun.codemodel.JEnumConstant; 9 | import com.sun.tools.xjc.model.nav.NClass; 10 | import com.sun.tools.xjc.model.nav.NType; 11 | 12 | public class CMEnumConstantOutline implements MEnumConstantOutline { 13 | 14 | private final MEnumOutline enumOutline; 15 | 16 | private final MEnumConstantInfo target; 17 | 18 | private final JEnumConstant code; 19 | 20 | public CMEnumConstantOutline(MEnumOutline enumOutline, 21 | MEnumConstantInfo target, JEnumConstant code) { 22 | Validate.notNull(enumOutline); 23 | Validate.notNull(target); 24 | Validate.notNull(code); 25 | this.enumOutline = enumOutline; 26 | this.target = target; 27 | this.code = code; 28 | } 29 | 30 | public MEnumOutline getEnumOutline() { 31 | return enumOutline; 32 | } 33 | 34 | public MEnumConstantInfo getTarget() { 35 | return target; 36 | } 37 | 38 | public JEnumConstant getCode() { 39 | return code; 40 | } 41 | 42 | } 43 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/concrete/CMObjectFactoryOutline.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline.concrete; 2 | 3 | import org.apache.commons.lang3.Validate; 4 | import org.jvnet.jaxb2_commons.xjc.outline.MModelOutline; 5 | import org.jvnet.jaxb2_commons.xjc.outline.MObjectFactoryOutline; 6 | import org.jvnet.jaxb2_commons.xjc.outline.MPackageOutline; 7 | 8 | import com.sun.codemodel.JDefinedClass; 9 | 10 | public class CMObjectFactoryOutline implements MObjectFactoryOutline { 11 | 12 | private final MModelOutline parent; 13 | 14 | private final MPackageOutline packageOutline; 15 | 16 | private final JDefinedClass code; 17 | 18 | public CMObjectFactoryOutline(MModelOutline parent, 19 | MPackageOutline packageOutline, JDefinedClass code) { 20 | Validate.notNull(parent); 21 | Validate.notNull(packageOutline); 22 | Validate.notNull(code); 23 | this.parent = parent; 24 | this.packageOutline = packageOutline; 25 | this.code = code; 26 | } 27 | 28 | public MModelOutline getParent() { 29 | return parent; 30 | } 31 | 32 | public MPackageOutline getPackageOutline() { 33 | return packageOutline; 34 | } 35 | 36 | public JDefinedClass getCode() { 37 | return code; 38 | } 39 | 40 | } 41 | -------------------------------------------------------------------------------- /basics/tools/src/main/java/org/jvnet/jaxb2_commons/xjc/outline/concrete/CMPropertyAccessorFactory.java: -------------------------------------------------------------------------------- 1 | package org.jvnet.jaxb2_commons.xjc.outline.concrete; 2 | 3 | import org.apache.commons.lang3.Validate; 4 | import org.jvnet.jaxb2_commons.util.FieldAccessorFactory; 5 | import org.jvnet.jaxb2_commons.xjc.outline.FieldAccessorEx; 6 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyAccessor; 7 | import org.jvnet.jaxb2_commons.xjc.outline.MPropertyAccessorFactory; 8 | 9 | import com.sun.codemodel.JExpression; 10 | import com.sun.tools.xjc.outline.FieldOutline; 11 | 12 | public class CMPropertyAccessorFactory implements MPropertyAccessorFactory { 13 | 14 | private final FieldAccessorFactory fieldAccessorFactory; 15 | private final FieldOutline fieldOutline; 16 | 17 | public CMPropertyAccessorFactory(FieldAccessorFactory fieldAccessorFactory, 18 | FieldOutline fieldOutline) { 19 | Validate.notNull(fieldAccessorFactory); 20 | Validate.notNull(fieldOutline); 21 | this.fieldAccessorFactory = fieldAccessorFactory; 22 | this.fieldOutline = fieldOutline; 23 | } 24 | 25 | public MPropertyAccessor createPropertyAccessor(JExpression target) { 26 | FieldAccessorEx fieldAccessor = fieldAccessorFactory 27 | .createFieldAccessor(fieldOutline, target); 28 | return new CMPropertyAccessor(fieldAccessor); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /commons-lang-plugin/.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /commons-lang-plugin/.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | commons-lang-plugin 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | org.eclipse.m2e.core.maven2Builder 15 | 16 | 17 | 18 | 19 | 20 | org.eclipse.jdt.core.javanature 21 | org.eclipse.m2e.core.maven2Nature 22 | 23 | 24 | -------------------------------------------------------------------------------- /commons-lang-plugin/.settings/org.eclipse.core.resources.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | encoding//src/main/java=UTF-8 3 | encoding//src/main/resources=UTF-8 4 | encoding/=UTF-8 5 | -------------------------------------------------------------------------------- /commons-lang-plugin/.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 3 | org.eclipse.jdt.core.compiler.compliance=1.5 4 | org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 5 | org.eclipse.jdt.core.compiler.source=1.5 6 | -------------------------------------------------------------------------------- /commons-lang-plugin/.settings/org.eclipse.m2e.core.prefs: -------------------------------------------------------------------------------- 1 | activeProfiles= 2 | eclipse.preferences.version=1 3 | resolveWorkspaceProjects=true 4 | version=1 5 | -------------------------------------------------------------------------------- /commons-lang-plugin/NOTICE: -------------------------------------------------------------------------------- 1 | This product includes software developed by 2 | The Apache Software Foundation (http://www.apache.org/). 3 | -------------------------------------------------------------------------------- /commons-lang-plugin/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | com.sun.tools.xjc.addon.commons_lang.XjcCommonsLangPlugin 2 | -------------------------------------------------------------------------------- /default-value-plugin/src/main/java/org/jvnet/jaxb2_commons/plugin/defaultvalueplugin/DefaultValuePlugin.java: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/default-value-plugin/src/main/java/org/jvnet/jaxb2_commons/plugin/defaultvalueplugin/DefaultValuePlugin.java -------------------------------------------------------------------------------- /default-value-plugin/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2_commons.plugin.defaultvalueplugin.DefaultValuePlugin -------------------------------------------------------------------------------- /default-value-plugin/src/test/java/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/default-value-plugin/src/test/java/.gitkeep -------------------------------------------------------------------------------- /default-value-plugin/src/test/resources/.gitkeep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/javaee/jaxb2-commons/874b99fbfee632a565a7a510486258dcdc9a3d6b/default-value-plugin/src/test/resources/.gitkeep -------------------------------------------------------------------------------- /default-value-plugin/tests/person/src/main/resources/Person.xsd: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /fluent-api/NOTICE: -------------------------------------------------------------------------------- 1 | This product includes software developed by 2 | The Apache Software Foundation (http://www.apache.org/). 3 | -------------------------------------------------------------------------------- /fluent-api/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2_commons.plugin.fluent_api.FluentApiPlugin -------------------------------------------------------------------------------- /namespace-prefix/NOTICE: -------------------------------------------------------------------------------- 1 | This product includes software developed by 2 | The Apache Software Foundation (http://www.apache.org/). 3 | -------------------------------------------------------------------------------- /namespace-prefix/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2_commons.plugin.namespace_prefix.NamespacePrefixPlugin 2 | -------------------------------------------------------------------------------- /namespace-prefix/src/main/resources/prefix-namespace-schema.xsd: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | Prefix for the associated namespace/package. 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /value-constructor/NOTICE: -------------------------------------------------------------------------------- 1 | This product includes software developed by 2 | The Apache Software Foundation (http://www.apache.org/). 3 | -------------------------------------------------------------------------------- /value-constructor/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin: -------------------------------------------------------------------------------- 1 | org.jvnet.jaxb2_commons.plugin.value_constructor.ValueConstructorPlugin -------------------------------------------------------------------------------- /value-constructor/src/test/schema/test.xsd: -------------------------------------------------------------------------------- 1 | 2 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | --------------------------------------------------------------------------------