/** * Creates a new instance of the configured error type. * * @return the error type with the provided configuration. */ public ErrorType build() { checkState(identifier != null, "string representation cannot be null"); checkState(namespace != null, "namespace representation cannot be null"); if (!isOrphan()) { checkState(parentErrorType != null, "parent error type cannot be null"); } return new ErrorTypeImplementation(identifier, namespace, parentErrorType); }