docs: private static String convertToValidJavaClassname(String inName) {
          if (inName == null) return "_";
          if (inName.startsWith("scriptdef_")) inName = inName.substring(10);
          if (inName.equals("")) return "_";
  
          StringBuilder output = new StringBuilder(inName.length());
          boolean firstChar = true;
          for (int i = 0; i < inName.length(); ++i) {
              char ch = inName.charAt(i);
              if (firstChar && !Character.isJavaIdentifierStart(ch)) {
                  ch = '_';
              } else if (!firstChar
                      && !(Character.isJavaIdentifierPart(ch) || ch == '.')) {
                  ch = '_';
              }
              firstChar = (ch == '.');
              output.append(ch);
          }
          return output.toString();
      }