code: public static boolean isPackageOrClassName(String s) {
          if (S.blank(s)) {
              return false;
          }
          S.List parts = S.fastSplit(s, ".");
          if (parts.size() < 2) {
              return false;
          }
          for (String part: parts) {
              if (!Character.isJavaIdentifierStart(part.charAt(0))) {
                  return false;
              }
              for (int i = 1, len = part.length(); i < len; ++i) {
                  if (!Character.isJavaIdentifierPart(part.charAt(i))) {
                      return false;
                  }
              }
          }
          return true;
      }
docs: Check if a given string is a valid java package or class name.
  
  This method use the technique documented in
  [this SO question](https://stackoverflow.com/questions/13557195/how-to-check-if-string-is-a-valid-class-identifier)
  with the following extensions:
  
  * if the string does not contain `.` then assume it is not a valid package or class name
  
  @param s
  the string to be checked
  @return
  `true` if `s` is a valid java package or class name