Package com.yahoo.config.codegen
Class CNode
java.lang.Object
com.yahoo.config.codegen.CNode
- Direct Known Subclasses:
InnerCNode,LeafCNode
Abstract superclass for all nodes representing a config definition.
- Author:
- gjoranv
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcheckMyName(String myName) abstract CNodeabstract CNode[]getCommentBlock(String prefix) getMd5()getName()Returns the simple name of this node.abstract booleanprotected abstract voidtoString()
-
Field Details
-
isArray
public final boolean isArray -
isMap
public final boolean isMap
-
-
Constructor Details
-
CNode
-
-
Method Details
-
getName
Returns the simple name of this node.- Returns:
- the simple name of this node
-
getParent
-
getChildren
-
getChild
-
getMd5
-
getVersion
-
getNamespace
-
getPackage
-
getComment
-
setLeaf
protected abstract void setLeaf(String name, DefLine defLine, String comment) throws IllegalArgumentException - Throws:
IllegalArgumentException
-
needRestart
public abstract boolean needRestart() -
checkMyName
- Throws:
IllegalArgumentException
-
getFullName
- Returns:
- the full name as a config path of this node.
-
getCommentBlock
- 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
-