Class ProblemDetail.Builder
java.lang.Object
cloud.opencode.base.web.problem.ProblemDetail.Builder
- Enclosing class:
ProblemDetail
Builder for ProblemDetail
ProblemDetail 构建器
- Since:
- JDK 25, opencode-base-web V1.0.3
- Author:
- Leon Soo www.LeonSoo.com
-
Method Details
-
type
Set the problem type URI. 设置问题类型 URI。- Parameters:
type- the type URI | 类型 URI- Returns:
- this builder | 此构建器
-
title
Set the title. 设置标题。- Parameters:
title- the title | 标题- Returns:
- this builder | 此构建器
-
status
Set the HTTP status code. 设置 HTTP 状态码。- Parameters:
status- the status code | 状态码- Returns:
- this builder | 此构建器
-
detail
Set the detail message. 设置详细说明。- Parameters:
detail- the detail | 详细说明- Returns:
- this builder | 此构建器
-
instance
Set the instance URI. 设置实例 URI。- Parameters:
instance- the instance URI | 实例 URI- Returns:
- this builder | 此构建器
-
extension
Add an extension property. 添加扩展属性。- Parameters:
key- the extension key | 扩展键value- the extension value | 扩展值- Returns:
- this builder | 此构建器
- Throws:
NullPointerException- if key is null | 如果键为 null
-
build
Build the ProblemDetail. 构建 ProblemDetail。- Returns:
- the problem detail | 问题详情
-