Example usage for javax.xml.bind.annotation XmlAccessOrder UNDEFINED

List of usage examples for javax.xml.bind.annotation XmlAccessOrder UNDEFINED

Introduction

In this page you can find the example usage for javax.xml.bind.annotation XmlAccessOrder UNDEFINED.

Prototype

XmlAccessOrder UNDEFINED

To view the source code for javax.xml.bind.annotation XmlAccessOrder UNDEFINED.

Click Source Link

Document

The ordering of fields and properties in a class is undefined.

Usage

From source file:org.castor.jaxb.reflection.ClassAnnotationProcessingServiceTest.java

@Test
public void testProcessAnnotationsWithXmlAccessorOrderAnnotation() {
    Class<WithXmlAccessorOrderAnnotation> clazz = WithXmlAccessorOrderAnnotation.class;
    Annotation[] annotations = clazz.getAnnotations();
    JaxbClassNature classInfo = new JaxbClassNature(
            new ClassInfo(WithXmlAccessorOrderAnnotation.class.getName()));
    classAnnotationProcessingService.processAnnotations(classInfo, annotations);

    // XmlRootElement annotations
    Assert.assertNull(classInfo.getRootElementName());
    Assert.assertNull(classInfo.getRootElementNamespace());
    // XmlType annotation
    Assert.assertNull(classInfo.getTypeFactoryClass());
    Assert.assertNull(classInfo.getTypeFactoryMethod());
    Assert.assertNull(classInfo.getTypeName());
    Assert.assertNull(classInfo.getTypeNamespace());
    Assert.assertNull(classInfo.getTypeProperties());
    // XmlTransient annotation
    Assert.assertFalse(classInfo.getXmlTransient());
    // XmlSeeAlso annotation
    Assert.assertNull(classInfo.getSeeAlsoClasses());
    // XmlAccessorOrder annotations
    Assert.assertEquals(XmlAccessOrder.UNDEFINED, classInfo.getXmlAccessOrder());
    // XmlAccessorType annotations
    Assert.assertNull(classInfo.getXmlAccessType());
}