Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
M
Mirai
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
Mirai
Commits
7d5543eb
Commit
7d5543eb
authored
Feb 10, 2020
by
Him188
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Suppress false positive warnings
parent
7a47f584
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
.../commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
+3
-2
No files found.
mirai-core/src/commonMain/kotlin/net.mamoe.mirai/utils/cryptor/Proto.kt
View file @
7d5543eb
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE
* https://github.com/mamoe/mirai/blob/master/LICENSE
*/
*/
@
file
:
Suppress
(
"EXPERIMENTAL_API_USAGE"
,
"unused"
)
@
file
:
Suppress
(
"EXPERIMENTAL_API_USAGE"
,
"unused"
,
"NO_REFLECTION_IN_CLASS_PATH"
)
package
net.mamoe.mirai.utils.cryptor
package
net.mamoe.mirai.utils.cryptor
...
@@ -145,7 +145,7 @@ fun <T> Sequence<T>.joinToStringPrefixed(prefix: String, transform: (T) -> CharS
...
@@ -145,7 +145,7 @@ fun <T> Sequence<T>.joinToStringPrefixed(prefix: String, transform: (T) -> CharS
/**
/**
* 将内容格式化为较可读的字符串输出.
* 将内容格式化为较可读的字符串输出.
*
*
* 各数字类型
极
其无符号类型: 十六进制表示 + 十进制表示. e.g. `0x1000(4096)`
* 各数字类型
及
其无符号类型: 十六进制表示 + 十进制表示. e.g. `0x1000(4096)`
* [ByteArray] 和 [UByteaArray]: 十六进制表示, 通过 [ByteArray.toUHexString]
* [ByteArray] 和 [UByteaArray]: 十六进制表示, 通过 [ByteArray.toUHexString]
* [ProtoMap]: 调用 [ProtoMap.toStringPrefixed]
* [ProtoMap]: 调用 [ProtoMap.toStringPrefixed]
* [Iterable], [Iterator], [Sequence]: 调用各自的 joinToString.
* [Iterable], [Iterator], [Sequence]: 调用各自的 joinToString.
...
@@ -154,6 +154,7 @@ fun <T> Sequence<T>.joinToStringPrefixed(prefix: String, transform: (T) -> CharS
...
@@ -154,6 +154,7 @@ fun <T> Sequence<T>.joinToStringPrefixed(prefix: String, transform: (T) -> CharS
* 其他类型: 反射获取它和它的所有来自 Mirai 的 super 类型的所有自有属性并递归调用 [contentToString]. 嵌套结构将会以缩进表示
* 其他类型: 反射获取它和它的所有来自 Mirai 的 super 类型的所有自有属性并递归调用 [contentToString]. 嵌套结构将会以缩进表示
*/
*/
@MiraiDebugAPI
(
"Extremely slow"
)
@MiraiDebugAPI
(
"Extremely slow"
)
//@Suppress("Unsupported") // false positive
fun
Any
?.
contentToString
(
prefix
:
String
=
""
):
String
=
when
(
this
)
{
fun
Any
?.
contentToString
(
prefix
:
String
=
""
):
String
=
when
(
this
)
{
is
Unit
->
"Unit"
is
Unit
->
"Unit"
is
UInt
->
"0x"
+
this
.
toUHexString
(
""
)
+
"($this)"
is
UInt
->
"0x"
+
this
.
toUHexString
(
""
)
+
"($this)"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment