[JAXB] JAXB Annotation 설명~ Part. 2


출처:

http://www.caucho.com/resin-3.1/doc/jaxb-annotations.xtp





@XmlElements




다중 @XmlElement를 정의할 때 사용

super class의 sub class 들을 따로 관리할 때 사용하면 용의할 것 같음



XML Document







@XmlElementWrapper




list 형식의 Element를 serialized 하기 위한 annotate



XML Document







@XmlJavaTypeAdapter




-_-;;;;; 설명하기에는 영어실력이 딸려서.. ㅠ_ㅠ

XmlAdapter를 이용해서 Java Type에 맞게 convert해주는 것을 정의하는 것 같음....



XML Document








@XmlRootElement




xml에서 최상위 노드를 annotate.

하지만 하위노드에서도 사용을 한다.. 이유는???



XML Document








@XmlTransient




unserialrizable을 mark.....

이걸 찾으려고 이 고생을... ㅠ_ㅠ XmlAccessorType.FIELD 로 해도 되는 거 였구나...


예제는 없습니다. ㅋㅋㅋ





@XmlValue




하나의 property나 field만 있을 경우 해당 property나 field에 serialized.



XML Document






댓글

가장 많이 본 글