diff 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
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeCloneable.java	Tue Nov 25 13:21:50 2014 +0100
+++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/nodes/NodeCloneable.java	Wed Nov 26 01:06:38 2014 +0100
@@ -25,8 +25,15 @@
 package com.oracle.truffle.api.nodes;
 
 /**
- * Declarative interface for node fields that are to be cloned together with the containing node.
+ * Declarative base class for node fields that are to be cloned together with the containing node.
  */
-public interface NodeCloneable extends Cloneable {
-    public Object clone();
+public abstract class NodeCloneable implements Cloneable {
+    @Override
+    protected Object clone() {
+        try {
+            return super.clone();
+        } catch (CloneNotSupportedException e) {
+            throw new AssertionError();
+        }
+    }
 }