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

Popular posts from this blog

xslt - DocBook 5 to PDF transform failing with error: "fo:flow" is missing child elements. Required content model: marker* -

mediawiki - How do I insert tables inside infoboxes on Wikia pages? -

Local Service User Logged into Windows -