map data structure cloning : deep clone (java)


The cloning library is a small, open source (Apache licensed) Java library which deep-clones objects. The objects don't have to implement the Cloneable interface. Effectively, this library can clone ANY Java object. It can be used i.e. in cache implementations if you don't want the cached object to be modified or whenever you want to create a deep copy of objects.

Here is an example of its usage:

Cloner cloner=new Cloner();

MyClass clone=cloner.deepClone(o);
// clone is a deep-clone of o

IMPORTANT : deep cloning of Java classes might mean thousands of objects are cloned! Also cloning of files and streams might make the JVM crash. Enable dumping of cloned classes to stdout during development is highly recommended in order to view what is cloned.

Useful links



본 웹사이트는 광고를 포함하고 있습니다.
광고 클릭에서 발생하는 수익금은 모두 웹사이트 서버의 유지 및 관리, 그리고 기술 콘텐츠 향상을 위해 쓰여집니다.
번호 제목 글쓴이 날짜 조회 수
153 SWT and multithreading 졸리운_곰 2015.11.07 56
152 Eclipse RCP multithreading 졸리운_곰 2015.11.07 122
151 Eclipse RCP - Prevent UI freezing while running long operation 졸리운_곰 2015.11.07 87
150 Eclipse RCP Tutorial: How to Add a Progress Bar file 졸리운_곰 2015.11.07 97
149 Eclipse RCP 에서 configuration 설정 파일 사용하지 않기 secret 졸리운_곰 2015.11.07 0
148 Gson User Guide 졸리운_곰 2015.10.26 302
147 Java Google Json (Gson) Type Adapter 졸리운_곰 2015.10.26 125
146 TypeAdapter (Gson 2.3.1 API) - Google Gson 졸리운_곰 2015.10.26 108
145 Gson TypeAdapter Example file 졸리운_곰 2015.10.26 81
144 Deserializing a Map<String, Object> field with Gson 졸리운_곰 2015.10.23 46
143 How to de-serialize a Map<String, Object> with GSON 졸리운_곰 2015.10.23 566
142 Gson 이란? 졸리운_곰 2015.10.21 1712
141 GSON - Java 객체(object)를 JSON 표현식으로 변환하는 API 졸리운_곰 2015.10.21 295
140 GSON Serialiser Example [Java class의 JSON 변환] file 졸리운_곰 2015.10.21 193
139 Add a Custom Menu Action to an Eclipse RCP Application file 졸리운_곰 2015.10.16 1096
138 Java - Serialization file 졸리운_곰 2015.10.14 107
137 Save and restore view state via reflection file 졸리운_곰 2015.10.14 61
136 Serializable 객체직렬화 file 졸리운_곰 2015.10.14 256
135 Java Serialization 알자 졸리운_곰 2015.10.14 464
134 Eclipse RCP Tutorial: Eclipse Rich Client Application with a View file 졸리운_곰 2015.10.05 383
대표 김성준 주소 : 경기 용인 분당수지 U타워 등록번호 : 142-07-27414
통신판매업 신고 : 제2012-용인수지-0185호 출판업 신고 : 수지구청 제 123호 개인정보보호최고책임자 : 김성준
대표전화 : 010-4589-2193 [fax] 02-6280-1294 COPYRIGHT(C) ALL RIGHTS RESERVED