All Downloads are FREE. Search and download functionalities are using the official Maven repository.

xmlparser.annotations.XmlEnumValue Maven / Gradle / Ivy

The newest version!
package xmlparser.annotations;

import java.lang.annotation.Retention;

import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * Changes an enum value to some other value. Example:
 * 
 * {@code
 *     class Pojo {
 *         MyEnum value;
 *     }
 *
 *     enum MyEnum {
 *         one,
 *         \@XmlEnumValue("123")
 *         two
 *     }
 * }
 * 
* The above POJO with 'value' set to 'one' will serialize into *
 * {@code
 *     one
 * }
 * 
* The same POJO with 'value' set to 'two' will serialize into *
 * {@code
 *     123
 * }
 * 
* This annotation is also respected during deserialization. */ @Retention(RUNTIME) public @interface XmlEnumValue { String value(); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy