Class BindingGeneratorUtil
java.lang.Object
org.opendaylight.yangtools.binding.generator.BindingGeneratorUtil
Contains the methods for converting strings to valid JAVA language strings
(package names, class names, attribute names) and to valid javadoc comments.
-
Method Summary
Modifier and TypeMethodDescriptionstatic String
encodeAngleBrackets
(String description) Encodes angle brackets in yang statement description.static Restrictions
getRestrictions
(TypeDefinition<?> type) static String
Escape potential unicode references so that the resulting string is safe to put into a.java
file.
-
Method Details
-
getRestrictions
-
encodeAngleBrackets
Encodes angle brackets in yang statement description.- Parameters:
description
- description of a yang statement which is used to generate javadoc comments- Returns:
- string with encoded angle brackets
-
replaceAllIllegalChars
Escape potential unicode references so that the resulting string is safe to put into a.java
file. This processing is required to ensure this text we want to append does not end up with eligible backslashes. See Java Language Specification for more information.- Parameters:
str
- Input string- Returns:
- A string with all backslashes made ineligible
-