Files
mingli-utils/src/main/kotlin/com/mingliqiye/utils/json/judgment/JackSon3ReaderJudgment.kt
T
minglipro 51eb838a36
Gitea Actions Build / Build (push) Canceled after 0s
docs: 补全 src 全部 Kotlin KDoc 与 Java Javadoc,版本升级至 5.5.1
为所有缺失文档的公开声明补充中文 KDoc/Javadoc(含 exception、json、
springboot、tuple 生成类、MediaType 枚举项及测试),仅插入注释不改代码;
gradle.properties VERSIONS 5.4.4 -> 5.5.1。
2026-11-17 21:07:58 +08:00

50 lines
1.5 KiB
Kotlin

/*
* Copyright 2026 mingliqiye
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile JackSon3ReaderJudgment.kt
* LastUpdate 2026-11-17 20:29:39
* UpdateUser MingLiPro
*/
package com.mingliqiye.utils.json.judgment
import com.mingliqiye.utils.json.judgment.base.BaseJsonJudgment
import tools.jackson.databind.JsonNode
/**
* 基于 Jackson3 JsonNode 的类型判断实现,各判定属性直接委托给节点自身
*
* @param treeNode 待判断的 Jackson3 JsonNode 节点
*/
open class JackSon3ReaderJudgment(
private val treeNode: JsonNode,
) : BaseJsonJudgment {
override val isObject: Boolean
get() = treeNode.isObject
override val isArray: Boolean
get() = treeNode.isArray
override val isString: Boolean
get() = treeNode.isString
override val isNumber: Boolean
get() = treeNode.isNumber
override val isBoolean: Boolean
get() = treeNode.isBoolean
override val isNull: Boolean
get() = treeNode.isNull
}