public final class JavaCodeSnippetGen extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
addListenersImport(YangNode curNode,
List<String> imports,
boolean operation,
String classInfo)
Adds listener's imports.
|
static String |
generateEnumAttributeString(String name,
int value,
YangPluginConfig pluginConfig)
Returns string for enum's attribute.
|
static String |
getFileHeaderComment()
Returns the java file header comment.
|
static String |
getJavaAttributeDefinition(String javaAttributeTypePkg,
String javaAttributeType,
String javaAttributeName,
boolean isList,
String attributeAccessType,
YangCompilerAnnotation compilerAnnotation)
Returns the textual java code for attribute definition in class.
|
static String |
getJavaClassDefClose()
Returns based on the file type and the YANG name of the file, generate the class / interface definition close.
|
static List<String> |
sortImports(List<String> imports)
Returns sorted import list.
|
public static String getFileHeaderComment()
public static String getJavaAttributeDefinition(String javaAttributeTypePkg, String javaAttributeType, String javaAttributeName, boolean isList, String attributeAccessType, YangCompilerAnnotation compilerAnnotation)
javaAttributeTypePkg - Package of the attribute typejavaAttributeType - java attribute typejavaAttributeName - name of the attributeisList - is list attributeattributeAccessType - attribute access typecompilerAnnotation - compiler annotationpublic static String getJavaClassDefClose()
public static String generateEnumAttributeString(String name, int value, YangPluginConfig pluginConfig)
name - name of attributevalue - value of the enumpluginConfig - plugin configurationspublic static List<String> sortImports(List<String> imports)
imports - import listCopyright © 2016. All rights reserved.