feat: V1.1 - lombok集成

This commit is contained in:
2026-08-03 14:30:55 +08:00
parent 99aae6dc77
commit 20b86592cb
11 changed files with 82 additions and 772 deletions

View File

@@ -1,53 +1,17 @@
package com.codechecker.cache.schema;
import java.util.Objects;
import lombok.Value;
/**
* 扁平化后的单个字段节点。path 使用点号分隔,数组元素以 {@code []} 标记。
* 例如:{@code vo.linkList[].id}。
*/
@Value
public class FieldSchema {
private final String path;
private final JsonType jsonType;
private final String javaType;
public FieldSchema(String path, JsonType jsonType, String javaType) {
this.path = path;
this.jsonType = jsonType;
this.javaType = javaType;
}
public String getPath() {
return path;
}
public JsonType getJsonType() {
return jsonType;
}
public String getJavaType() {
return javaType;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof FieldSchema)) {
return false;
}
FieldSchema that = (FieldSchema) o;
return Objects.equals(path, that.path)
&& jsonType == that.jsonType
&& Objects.equals(javaType, that.javaType);
}
@Override
public int hashCode() {
return Objects.hash(path, jsonType, javaType);
}
String path;
JsonType jsonType;
String javaType;
@Override
public String toString() {