
xmlparser.annotations.XmlEnumValue Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of simplexml Show documentation
Show all versions of simplexml Show documentation
A clean and simple XML parser, serializer, and deserializer.
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