记录类 JsonWriter.MemberPath
java.lang.Object
java.lang.Record
org.springframework.boot.json.JsonWriter.MemberPath
- 记录组件:
parent- the parent of this pathname- the name of the member ornullif the member is indexed. Path names are provided as they were defined when the member was added and do not include anyname processing.index- the index of the member orUNINDEXED
- 封闭接口:
JsonWriter<T>
public static record JsonWriter.MemberPath(JsonWriter.MemberPath parent, String name, int index)
extends Record
A path used to identify a specific JSON member. Paths can be represented as strings
in form
"my.json[1].item" where elements are separated by '.' or
[<index>]. Reserved characters are escaped using '\'.-
字段概要
字段 -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明child(int index) Create a new child from this path with the specified index.Create a new child from this path with the specified name.final boolean指示某个其他对象是否“等于”此对象。final inthashCode()返回此对象的哈希代码值。intindex()返回index记录组件的值。name()返回name记录组件的值。static JsonWriter.MemberPathCreate a newJsonWriter.MemberPathinstance from the given string.parent()返回parent记录组件的值。final StringtoString()返回此记录类的字符串表示形式。final StringReturn a string representation of the path without any escaping.
-
字段详细资料
-
UNINDEXED
public static final int UNINDEXEDIndicates that the member has no index.- 另请参阅:
-
-
构造器详细资料
-
方法详细资料
-
child
Create a new child from this path with the specified index.- 参数:
index- the index of the child- 返回:
- a new
JsonWriter.MemberPathinstance
-
child
Create a new child from this path with the specified name.- 参数:
name- the name of the child- 返回:
- a new
JsonWriter.MemberPathinstance
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
toUnescapedString
Return a string representation of the path without any escaping.- 返回:
- the unescaped string representation
-
of
Create a newJsonWriter.MemberPathinstance from the given string.- 参数:
value- the path value- 返回:
- a new
JsonWriter.MemberPathinstance
-
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)对参考组件进行比较;使用 '==' 对基元组件进行比较 -
parent
返回parent记录组件的值。- 返回:
parent记录组件的值
-
name
返回name记录组件的值。- 返回:
name记录组件的值
-
index
public int index()返回index记录组件的值。- 返回:
index记录组件的值
-