Class BindingGeneratorUtil

java.lang.Object
org.opendaylight.yangtools.binding.generator.BindingGeneratorUtil

@Beta public final class BindingGeneratorUtil extends Object
Contains the methods for converting strings to valid JAVA language strings (package names, class names, attribute names) and to valid javadoc comments.
  • Method Details

    • getRestrictions

      public static Restrictions getRestrictions(TypeDefinition<?> type)
    • encodeAngleBrackets

      public static String encodeAngleBrackets(String description)
      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

      public static String replaceAllIllegalChars(String str)
      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