java - Unmarshalling in jaxb for enum type -
java - Unmarshalling in jaxb for enum type -
i using jaxb marshalling & unmarshalling. xml want info unmarshalled java object having enum attribute 1 shown below constructor, getter & setter enum field.
public enum myenum { p_e("p e") private string type; }
i understand other stackoverflow questions jaxb not require setters setting value. in xml if give value "p_e" works well. there way utilize "p e" , set enum value in object?. without using setter, how jaxb work?
you can utilize @xmlenumvalue
annotation alter xml representation.
java enums jaxb
Comments
Post a Comment