MCPcopy Index your code
hub / github.com/BruceEckel/OnJava8-Examples / clone

Method clone

references/Compete.java:25–35  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

23class Thing4 implements Cloneable {
24 private Thing3 t3 = new Thing3();
25 @Override public Thing4 clone() {
26 Thing4 t4 = null;
27 try {
28 t4 = (Thing4)super.clone();
29 } catch(CloneNotSupportedException e) {
30 throw new RuntimeException(e);
31 }
32 // Clone the field, too:
33 t4.t3 = t3.clone();
34 return t4;
35 }
36}
37
38public class Compete {

Callers

nothing calls this directly

Calls 1

cloneMethod · 0.45

Tested by

no test coverage detected