[JAXB] JAXB Annotation 설명~ Part. 1 

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

@XmlAccessorType
property의 serializability를 결정합니다.
@XmlAccessorType values
 
NONE @XmlElement로 annotate된 fileds와 properties 만 serialized.
FIELD 모든 fileds을 serialized.
PROPERTY 모든 properties을 serialized.
PUBLIC_MEMBER public fields와 properties를 serialized.
@XmlAccessorType 예제
1 @XmlAccessorType(XmlAccessType.FIELD)
2 class Bean {
3   private String data;
4 }

XML Document
1 <Bean>
2   <data>Sample Data</data>
3 </Bean>



@XmlAttribute
field나 property가 attribute로 serialize 될 것인지를 mark.
@XmlAttribute 예제
1 @XmlRootElement
2 class Bean {
3   @XmlAttribute("sample-field")
4   private String _myField;
5 }

XML Document
1 <Bean sample-field="A sample value">
2 </Bean>



@XmlElement
field나 property가 element로 serialize 될 것인지를 mark.
@XmlAttribute 예제
1 @XmlRootElement
2 class Bean {
3   @XmlElement("sample-field")
4   private String _myField;
5 }

XML Document
1 <Bean>
2   <sample-field>A sample value</sample-field>
3 </Bean>



출처: https://vicki.tistory.com/20 [불친절한자수씨]

 

경축! 아무것도 안하여 에스천사게임즈가 새로운 모습으로 재오픈 하였습니다.
어린이용이며, 설치가 필요없는 브라우저 게임입니다.
https://s1004games.com

 

 

본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
310 GEF Programmer Guide 번역 졸리운_곰 2019.11.25 227
309 Learn Eclipse GMF in 15 minutes file 졸리운_곰 2019.11.20 224
308 RCP 에디터 정리 졸리운_곰 2019.11.20 333
307 다른 그림과 관련하여 GEF 편집기 레이아웃에서 그림의 위치 제한 조건을 동적으로 계산 Dynamically calculating the position constraints for a figure in a GEF editor layout in relation to another figure file 졸리운_곰 2019.11.20 277
306 추상(abstract) 클래스가 필요한 기본적인 이유 졸리운_곰 2019.10.30 247
305 Java Byte Array to InputStream 졸리운_곰 2019.10.24 176
304 [JAXB] JAXB Annotation 설명~ Part. 2 졸리운_곰 2019.10.24 305
» [JAXB] JAXB Annotation 설명~ Part. 1 졸리운_곰 2019.10.24 136
302 JAXB (3) - marshal, unmarshal에 대해 알아보자. file 졸리운_곰 2019.10.24 142
301 JAXB (2) - XML Schema를 Java Interfaces & Classes로 Binding Compile 하기 file 졸리운_곰 2019.10.24 144
300 JAXB (1) - JAXB 란? file 졸리운_곰 2019.10.24 188
299 XStream으로 자바 객체를 XML로 직렬화하기 file 졸리운_곰 2019.10.15 248
298 [번역] XStream 배우기 : 2분만에 배우는 XStream 졸리운_곰 2019.10.15 232
297 RCP 등에서 .mf 파일로 다른 프로젝트 익스포트 포함시 라이브러리(메소드)를 찾지 못할 때, Eclipse RCP - cant resolve importing libraries in final build file 졸리운_곰 2019.10.15 410
296 java XML Parser 정리 졸리운_곰 2019.10.05 175
295 ESE2006-EclipseModelingSymposium15_GMF.pdf file 졸리운_곰 2019.09.21 302
294 GMF_Creation_Review.pdf file 졸리운_곰 2019.09.21 366
293 Eclipse EMF and GMF Tutorial file 졸리운_곰 2019.09.21 222
292 GMF Tutorial/ko file 졸리운_곰 2019.09.20 347
291 Model Driven Architecture approach to domain of graphical editors file 졸리운_곰 2019.09.20 268
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준 sjkim70@stechstar.com
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) stechstar.com ALL RIGHTS RESERVED