public final class BindingGeneratorUtil extends Object
Modifier and Type | Method and Description |
---|---|
static long |
computeDefaultSUID(GeneratedTypeBuilderBase<?> to) |
static String |
encodeAngleBrackets(String description)
Encodes angle brackets in yang statement description.
|
static Restrictions |
getRestrictions(org.opendaylight.yangtools.yang.model.api.TypeDefinition<?> type) |
static String |
packageNameForAugmentedGeneratedType(String basePackageName,
org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
Creates package name from specified
basePackageName (package name for module)
and schemaPath which crosses an augmentation. |
static String |
packageNameForGeneratedType(String basePackageName,
org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
Creates package name from specified
basePackageName (package name for module)
and schemaPath . |
static String |
replaceAllIllegalChars(CharSequence stringBuilder) |
static String |
resolveJavaReservedWordEquivalency(String parameterName)
Converts
parameterName to valid JAVA parameter name. |
public static String resolveJavaReservedWordEquivalency(String parameterName)
parameterName
to valid JAVA parameter name. If the parameterName
is one
of the JAVA reserved words then it is prefixed with underscore character.parameterName
- string with the parameter namepublic static String packageNameForGeneratedType(String basePackageName, org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
basePackageName
(package name for module)
and schemaPath
. Resulting package name is concatenation of basePackageName
and all local names of YANG nodes which are parents of some node for which schemaPath
is specified.basePackageName
- string with package name of the module, MUST be normalized, otherwise this method may
return an invalid string.schemaPath
- list of names of YANG nodes which are parents of some node + name of this nodeNullPointerException
- if any of the arguments are nullpublic static String packageNameForAugmentedGeneratedType(String basePackageName, org.opendaylight.yangtools.yang.model.api.SchemaPath schemaPath)
basePackageName
(package name for module)
and schemaPath
which crosses an augmentation. Resulting package name is concatenation
of basePackageName
and all local names of YANG nodes which are parents of some node for which
schemaPath
is specified.basePackageName
- string with package name of the module, MUST be normalized, otherwise this method may
return an invalid string.schemaPath
- list of names of YANG nodes which are parents of some node + name of this nodeNullPointerException
- if any of the arguments are nullpublic static long computeDefaultSUID(GeneratedTypeBuilderBase<?> to)
public static Restrictions getRestrictions(org.opendaylight.yangtools.yang.model.api.TypeDefinition<?> type)
public static String encodeAngleBrackets(String description)
description
- description of a yang statement which is used to generate javadoc commentspublic static String replaceAllIllegalChars(CharSequence stringBuilder)
Copyright © 2019 OpenDaylight. All rights reserved.