Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeCloneable.java @ 18511:62aac33db669
Truffle: refactor NodeCloneable interface to abstract class
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 26 Nov 2014 01:06:38 +0100 |
parents | cb4d5cc2b52b |
children |
comparison
equal
deleted
inserted
replaced
18510:cb4d5cc2b52b | 18511:62aac33db669 |
---|---|
23 * questions. | 23 * questions. |
24 */ | 24 */ |
25 package com.oracle.truffle.api.nodes; | 25 package com.oracle.truffle.api.nodes; |
26 | 26 |
27 /** | 27 /** |
28 * Declarative interface for node fields that are to be cloned together with the containing node. | 28 * Declarative base class for node fields that are to be cloned together with the containing node. |
29 */ | 29 */ |
30 public interface NodeCloneable extends Cloneable { | 30 public abstract class NodeCloneable implements Cloneable { |
31 public Object clone(); | 31 @Override |
32 protected Object clone() { | |
33 try { | |
34 return super.clone(); | |
35 } catch (CloneNotSupportedException e) { | |
36 throw new AssertionError(); | |
37 } | |
38 } | |
32 } | 39 } |