public final class YangJavaModelUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
generateCodeAndUpdateInParent(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
YangPluginConfig yangPlugin,
boolean isMultiInstance)
Generates code for the current ata model node and adds itself as an attribute in the parent.
|
static void |
generateCodeOfAugmentableNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
YangPluginConfig yangPlugin)
Generates code for the current data model node and adds support for it to be augmented.
|
static void |
generateCodeOfNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
YangPluginConfig yangPluginConfig)
Generates code for the current data model node.
|
static void |
generateCodeOfRootNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
YangPluginConfig yangPluginConfig,
String rootPkg)
Generates code for the root module/sub-module node.
|
static String |
getCurNodePackage(YangNode curNode)
Returns the node package string.
|
static String |
getNodesPackage(YangNode node,
YangPluginConfig yangPluginConfig)
Returns nodes package.
|
static JavaQualifiedTypeInfoTranslator |
getQualifierInfoForCasesParent(YangNode parent,
YangPluginConfig yangPluginConfig)
Returns cases parent's qualified info.
|
static boolean |
isRootNodesCodeGenRequired(YangNode node)
Returns true if root node contains any data node.
|
static void |
updatePackageInfo(JavaCodeGeneratorInfo javaCodeGeneratorInfo,
YangPluginConfig yangPluginConfig)
Updates YANG java file package information.
|
public static void updatePackageInfo(JavaCodeGeneratorInfo javaCodeGeneratorInfo, YangPluginConfig yangPluginConfig) throws IOException
javaCodeGeneratorInfo - YANG java file info nodeyangPluginConfig - YANG plugin configIOException - IO operations failspublic static void generateCodeAndUpdateInParent(JavaCodeGeneratorInfo javaCodeGeneratorInfo, YangPluginConfig yangPlugin, boolean isMultiInstance) throws IOException
javaCodeGeneratorInfo - YANG java file info nodeyangPlugin - YANG plugin configisMultiInstance - flag to indicate whether it's a listIOException - IO operations failspublic static void generateCodeOfAugmentableNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo, YangPluginConfig yangPlugin) throws IOException
javaCodeGeneratorInfo - YANG java file info nodeyangPlugin - YANG plugin configIOException - IO operations failspublic static JavaQualifiedTypeInfoTranslator getQualifierInfoForCasesParent(YangNode parent, YangPluginConfig yangPluginConfig)
parent - parent nodeyangPluginConfig - plugin configurationpublic static void generateCodeOfNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo, YangPluginConfig yangPluginConfig) throws IOException
javaCodeGeneratorInfo - YANG java file info nodeyangPluginConfig - YANG plugin configIOException - IO operations failspublic static void generateCodeOfRootNode(JavaCodeGeneratorInfo javaCodeGeneratorInfo, YangPluginConfig yangPluginConfig, String rootPkg) throws IOException
javaCodeGeneratorInfo - YANG java file info nodeyangPluginConfig - YANG plugin configrootPkg - package of the root nodeIOException - IO operations failspublic static String getCurNodePackage(YangNode curNode)
curNode - current java node whose package string needs to be setpublic static boolean isRootNodesCodeGenRequired(YangNode node)
node - root YANG nodepublic static String getNodesPackage(YangNode node, YangPluginConfig yangPluginConfig)
node - YANG nodeyangPluginConfig - plugin configCopyright © 2016. All rights reserved.