code: private void validateTypeNotIn(TypeMirror t, Set<TypeKind> invalidKinds) {
          if (invalidKinds.contains(t.getKind()))
              throw new IllegalArgumentException(t.toString());
      }
docs: Throws an IllegalArgumentException if a type's kind is one of a set.