What is the difference between the *
, **
and ***
wildcards in Proguard? For example:
-keep class com.mypackage.*
vs
-keep class com.mypackage.**
vs
-keep class com.mypackage.***
* 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).
Note that the *
, and **
wildcards will never match primitive types. Furthermore, only the * wildcards will match array types of any dimension. For example, " get*()" matches "java.lang.Object getObject()"
, but not "float getFloat()"
, nor "java.lang.Object[] getObjects()"
.
* matches any part of a filename not containing the directory separator.
** matches any part of a filename, possibly containing any number of directory separators.
from this the document :
* matches any part of a class name not containing the package separator. For example, "com.example.*Test*" matches "com.example.Test" and "com.example.YourTestApplication", but not "com.example.mysubpackage.MyTest". Or, more generally, "com.example.*" matches all classes in "com.example", but not in its subpackages.
** matches any part of a class name, possibly containing any number of package separators. For example, "**.Test" matches all Test classes in all packages except the root package. Or, "com.example.**" matches all classes in "com.example" and in its subpackages.
*** matches any type (primitive or non-primitive, array or non-array).