public final class AugmentListenerUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clearOccurrenceCount()
Resets occurrence count to one.
|
static String |
createValidNameForAugment(YangNodeIdentifier nodeId,
boolean isPrefix)
Creates a name identifier for augment.
|
static String |
generateNameForAugmentNode(Parsable curData,
List<YangNodeIdentifier> targetNodes,
TreeWalkListener listener)
Generates name for augment node also detects collision for java file generation of augment node when
augment is updating the same target node in same parent multiple times.
|
static List<String> |
getAugmentJavaFileNameList()
Returns augment java file name list.
|
static String |
getParentsPrefix(YangNode curNode)
Returns parent nodes prefix.
|
static ParserException |
parserException(GeneratedYangParser.AugmentStatementContext ctx)
Builds parser exception.
|
static String |
updateNameWhenHasMultipleOuccrrence(YangNodeIdentifier nodeId,
boolean isPrefix)
Updates the list of name when augment has occurred multiple times to update the same target node
and returns a valid name for augment node's generated java file.
|
static void |
validateNodeInTargetPath(YangNode curNode,
List<YangNodeIdentifier> targetNodes,
GeneratedYangParser.AugmentStatementContext ctx)
Validates whether current node in target path is valid or not.
|
public static List<String> getAugmentJavaFileNameList()
public static String generateNameForAugmentNode(Parsable curData, List<YangNodeIdentifier> targetNodes, TreeWalkListener listener)
curData - parsable datatargetNodes - list of target nodeslistener - tree walk listenerpublic static String createValidNameForAugment(YangNodeIdentifier nodeId, boolean isPrefix)
nodeId - node identifierisPrefix - if prefix is present or it is not equals to parent's prefixpublic static String updateNameWhenHasMultipleOuccrrence(YangNodeIdentifier nodeId, boolean isPrefix)
nodeId - YANG node identifierisPrefix - true if a prefix is present and it is not equals to parents prefixpublic static void clearOccurrenceCount()
public static void validateNodeInTargetPath(YangNode curNode, List<YangNodeIdentifier> targetNodes, GeneratedYangParser.AugmentStatementContext ctx)
curNode - current YANG nodetargetNodes - list of target nodesctx - augment statement contextpublic static ParserException parserException(GeneratedYangParser.AugmentStatementContext ctx)
ctx - augment statement contextCopyright © 2016. All rights reserved.