code: public QualifiedName enclosingType() {
      checkState(!isTopLevel(), "Cannot return enclosing type of top-level type");
      return new QualifiedName(packageName, simpleNames.subList(0, simpleNames.size() - 1));
    }
docs: Returns the {@link QualifiedName} of the type enclosing this one.
  
  @throws IllegalStateException if {@link #isTopLevel()} returns true