summaryrefslogtreecommitdiffstats
path: root/config-lib/src/main/java/com/yahoo/config/Node.java
diff options
context:
space:
mode:
Diffstat (limited to 'config-lib/src/main/java/com/yahoo/config/Node.java')
-rw-r--r--config-lib/src/main/java/com/yahoo/config/Node.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/config-lib/src/main/java/com/yahoo/config/Node.java b/config-lib/src/main/java/com/yahoo/config/Node.java
new file mode 100644
index 00000000000..3dba5d083f4
--- /dev/null
+++ b/config-lib/src/main/java/com/yahoo/config/Node.java
@@ -0,0 +1,29 @@
+// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.config;
+
+/**
+ * The Node class is superclass for all nodes in a {@link
+ * ConfigInstance}. Important subclasses of this node are {@link
+ * InnerNode} and {@link LeafNode}.
+ *
+ */
+public abstract class Node {
+
+ /**
+ * Postinitialize this node. Any node needing to process its values depending on the config
+ * id should override this method.
+ *
+ * @param configId the configId of the ConfigInstance that owns (or is) this node
+ */
+ public void postInitialize(String configId) { return; }
+
+ /**
+ * This method is meant for internal use in the configuration system.
+ * Overrides Object.clone(), and is overriden by LeafNode.clone().
+ *
+ * @return a new instance similar to this object.
+ */
+ protected Object clone() throws CloneNotSupportedException {
+ return super.clone();
+ }
+}