code: public EndpointInfo build() {
          checkState(availableMimeTypes != null && !availableMimeTypes.isEmpty(),
                     "Should at least have an available media type.");
          return new EndpointInfo(hostnamePattern, pathMapping, regexPathPrefix,
                                  fragment, defaultMimeType, availableMimeTypes);
      }
docs: Returns a newly-created {@link EndpointInfo} based on the properties of this builder.