jaxb - Where can @XmlElement be placed? -



jaxb - Where can @XmlElement be placed? -

i have seen jaxb annotation in project used on setter. know own experience @xmlelement can used on attributes , getters. i'm not sure if annotation can , should used on setters, googled , couldn't find clear answer. please advise.

from section "8.9 property & field" of jaxb 2.2 specification (see: https://jcp.org/aboutjava/communityprocess/mrel/jsr222/index2.html)

for property, given annotation can applied either read or write property not both.

in other words annotation can set on either or set method. experience bulk of people set annotation on method.

jaxb annotations setter

Comments

Popular posts from this blog

javascript - THREE.js reposition vertices for RingGeometry -

javascript - I need to update the text of a paragraph by inline edit -

assembly - What is the addressing mode for ld, add, and rjmp instructions? -