code: private void verifyType(TypeElement type, PackageElement pkg) throws CannotGenerateCodeException {
      if (pkg.isUnnamed()) {
        messager.printMessage(ERROR, "FreeBuilder does not support types in unnamed packages", type);
        throw new CannotGenerateCodeException();
      }
      switch (type.getNestingKind()) {
        case TOP_LEVEL:
          break;
  
        case MEMBER:
          if (!type.getModifiers().contains(Modifier.STATIC)) {
            messager.printMessage(
                ERROR,
                "Inner classes cannot be FreeBuilder types (did you forget the static keyword?)",
                type);
            throw new CannotGenerateCodeException();
          }
  
          if (type.getModifiers().contains(Modifier.PRIVATE)) {
            messager.printMessage(ERROR, "FreeBuilder types cannot be private", type);
            throw new CannotGenerateCodeException();
          }
  
          for (Element e = type.getEnclosingElement(); e != null; e = e.getEnclosingElement()) {
            if (e.getModifiers().contains(Modifier.PRIVATE)) {
              messager.printMessage(
                  ERROR,
                  "FreeBuilder types cannot be private, but enclosing type "
                      + e.getSimpleName() + " is inaccessible",
                  type);
              throw new CannotGenerateCodeException();
            }
          }
          break;
  
        default:
          messager.printMessage(
              ERROR, "Only top-level or static nested types can be FreeBuilder types", type);
          throw new CannotGenerateCodeException();
      }
      switch (type.getKind()) {
        case ANNOTATION_TYPE:
          messager.printMessage(ERROR, "FreeBuilder does not support annotation types", type);
          throw new CannotGenerateCodeException();
  
        case CLASS:
          verifyTypeIsConstructible(type);
          break;
  
        case ENUM:
          messager.printMessage(ERROR, "FreeBuilder does not support enum types", type);
          throw new CannotGenerateCodeException();
  
        case INTERFACE:
          // Nothing extra needs to be checked on an interface
          break;
  
        default:
          throw new AssertionError("Unexpected element kind " + type.getKind());
      }
    }
docs: Basic sanity-checking to ensure we can fulfil the &#64;FreeBuilder contract for this type.