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

J2K*_*J2K 13 android proguard

是什么之间的区别*,*****通配符Proguard的?例如:

-keep class com.mypackage.*
Run Code Online (Sandbox Code Playgroud)

VS

-keep class com.mypackage.**
Run Code Online (Sandbox Code Playgroud)

VS

-keep class com.mypackage.***
Run Code Online (Sandbox Code Playgroud)

GrI*_*sHu 17

*   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).
Run Code Online (Sandbox Code Playgroud)

需要注意的是*,和**通配符永远不会匹配原始类型.此外,只有*通配符将匹配任何维度的数组类型.例如,"让*()"的比赛"java.lang.Object getObject()",但没有"float getFloat()",也没有"java.lang.Object[] getObjects()".

  • 与此答案对应的文档位于 https://www.guardsquare.com/en/products/proguard/manual/usage#classspecification (4认同)