code: public static boolean isPrivateInnerType(TypeElement type) {
      switch (type.getNestingKind()) {
        case ANONYMOUS:
        case LOCAL:
          return true;
        case MEMBER:
          return isPrivate(type) || isPrivateInnerType((TypeElement) type.getEnclosingElement());
        case TOP_LEVEL:
          return isPrivate(type);
      }
      throw new AssertionError("Unknown NestingKind");
    }
docs: Tests if this type element is private to it's source file. A public type declared
  within a private type is considered private.