Class CNode

java.lang.Object
com.yahoo.config.codegen.CNode
Direct Known Subclasses:
InnerCNode, LeafCNode

public abstract class CNode extends Object
Abstract superclass for all nodes representing a config definition.
Author:
gjoranv
  • Field Details

    • isArray

      public final boolean isArray
    • isMap

      public final boolean isMap
  • Constructor Details

  • Method Details

    • getName

      public String getName()
      Returns the simple name of this node.
      Returns:
      the simple name of this node
    • getParent

      public InnerCNode getParent()
    • getChildren

      public abstract CNode[] getChildren()
    • getChild

      public abstract CNode getChild(String name)
    • getMd5

      public String getMd5()
    • getVersion

      public String getVersion()
    • getNamespace

      public String getNamespace()
    • getPackage

      public String getPackage()
    • getComment

      public String getComment()
    • setLeaf

      protected abstract void setLeaf(String name, DefLine defLine, String comment) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • needRestart

      public abstract boolean needRestart()
    • checkMyName

      protected void checkMyName(String myName) throws IllegalArgumentException
      Throws:
      IllegalArgumentException
    • getFullName

      public String getFullName()
      Returns:
      the full name as a config path of this node.
    • getCommentBlock

      public String getCommentBlock(String prefix)
      Parameters:
      prefix - The prefix to use, usually an indent (spaces) followed by either '*' or "//"
      Returns:
      a comment block where each line is prefixed, but the caller must close it if using '*'.
    • toString

      public String toString()
      Overrides:
      toString in class Object