Proguard中的vs vs ** vs ***?

问题描述 投票:13回答:2

Proguard中的******通配符有什么区别?例如:

-keep class com.mypackage.*

VS

-keep class com.mypackage.**

VS

-keep class com.mypackage.***
android proguard
2个回答
16
投票
*   matches any part of a method name. OR matches any part of a class name not containing the package separator.
**  matches any part of a class name, possibly containing any number of package separators.
*** matches any type (primitive or non-primitive, array or non-array).

请注意,***通配符永远不会匹配原始类型。此外,只有*通配符将匹配任何维度的数组类型。例如,“get *()”匹配"java.lang.Object getObject()",但不匹配"float getFloat()",也不匹配"java.lang.Object[] getObjects()"


1
投票
*   matches any part of a filename not containing the directory separator.
**  matches any part of a filename, possibly containing any number of directory separators.
© www.soinside.com 2019 - 2024. All rights reserved.