code: static void checkDesc(final String desc, final boolean canBeVoid) {
          int end = checkDesc(desc, 0, canBeVoid);
          if (end != desc.length()) {
              throw new IllegalArgumentException("Invalid descriptor: " + desc);
          }
      }
docs: Checks that the given string is a valid type descriptor.
  
  @param desc
  the string to be checked.
  @param canBeVoid
  <tt>true</tt> if <tt>V</tt> can be considered valid.