记录类 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 ornull
if 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 int
hashCode()
返回此对象的哈希代码值。int
index()
返回index
记录组件的值。name()
返回name
记录组件的值。static JsonWriter.MemberPath
Create a newJsonWriter.MemberPath
instance from the given string.parent()
返回parent
记录组件的值。final String
toString()
返回此记录类的字符串表示形式。final String
Return 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.MemberPath
instance
-
child
Create a new child from this path with the specified name.- 参数:
name
- the name of the child- 返回:
- a new
JsonWriter.MemberPath
instance
-
toString
返回此记录类的字符串表示形式。此表示形式包含类的名称,后跟每个记录组件的名称和值。 -
toUnescapedString
Return a string representation of the path without any escaping.- 返回:
- the unescaped string representation
-
of
Create a newJsonWriter.MemberPath
instance from the given string.- 参数:
value
- the path value- 返回:
- a new
JsonWriter.MemberPath
instance
-
hashCode
public final int hashCode()返回此对象的哈希代码值。此值派生自每个记录组件的哈希代码。 -
equals
指示某个其他对象是否“等于”此对象。如果两个对象属于同一个类,而且所有记录组件都相等,则这两个对象相等。 使用Objects::equals(Object,Object)
对参考组件进行比较;使用 '==' 对基元组件进行比较 -
parent
返回parent
记录组件的值。- 返回:
parent
记录组件的值
-
name
返回name
记录组件的值。- 返回:
name
记录组件的值
-
index
public int index()返回index
记录组件的值。- 返回:
index
记录组件的值
-