@Beta public final class YangTextTemplate extends Object
Modifier and Type | Method and Description |
---|---|
static String |
encodeJavadocSymbols(String description) |
static String |
formatSchemaPath(String moduleName,
Iterable<org.opendaylight.yangtools.yang.common.QName> schemaPath) |
static String |
formatToAugmentPath(Iterable<org.opendaylight.yangtools.yang.common.QName> schemaPath)
Used in all yangtemplates for formating augmentation target
|
static String |
formatToParagraph(String text,
int nextLineIndent)
Used in #yangtemplateformodule.scala.txt for formating revision description
|
static String |
getExplicitType(GeneratedType parentGenType,
Type type,
Map<String,String> imports)
Builds the string which contains either the full path to the type (package name with type) or only type name
if the package is among imports.
|
static void |
putTypeIntoImports(GeneratedType parentGenType,
Type type,
Map<String,String> imports)
Evaluates if it is necessary to add the package name for type to the map of imports for parentGenType
If it is so the package name is saved to the map imports.
|
static String |
wrapToDocumentation(String text)
Wraps text as documentation
|
public static String formatSchemaPath(String moduleName, Iterable<org.opendaylight.yangtools.yang.common.QName> schemaPath)
public static String formatToParagraph(String text, int nextLineIndent)
text
- Content of tag descriptionnextLineIndent
- Number of spaces from left side default is 12public static String formatToAugmentPath(Iterable<org.opendaylight.yangtools.yang.common.QName> schemaPath)
schemaPath
- path to augmented nodepublic static void putTypeIntoImports(GeneratedType parentGenType, Type type, Map<String,String> imports)
parentGenType
- generated type for which is the map of necessary imports buildtype
- JAVA type for which is the necessary of the package import evaluatedimports
- map of the imports for parentGenTypepublic static String getExplicitType(GeneratedType parentGenType, Type type, Map<String,String> imports)
parentGenType
- generated type which contains typetype
- JAVA type for which is the string with type info generatedimports
- map of necessary imports for parentGenTypepublic static String wrapToDocumentation(String text)
text
- text for wrappingCopyright © 2018 OpenDaylight. All rights reserved.