code: public static String renderPackage(final Class<?> type) {
          return PACKAGE_FORMATTER.abbreviate(type.isMemberClass() && !type.isAnonymousClass()
                  ? type.getDeclaringClass().getName() : type.getPackage().getName());
      }
docs: If provided type is inner class then declaring class will be rendered instead of package.
  
  @param type class to render package
  @return class package rendered in abbreviated manner (to fit nto 20 chars)
  @see TargetLengthBasedClassNameAbbreviator