2013-11-01 27 views
8

Qual è la differenza tra i caratteri jolly *, ** e *** in Proguard? Per esempio:* vs ** vs *** in Proguard?

-keep class com.mypackage.* 

vs

-keep class com.mypackage.** 

vs

-keep class com.mypackage.*** 

risposta

11
* 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). 

Nota che il , e * jolly non sarà mai soddisfatta tipi primitivi. Inoltre, solo i caratteri jolly * corrispondono ai tipi di array di qualsiasi dimensione. Ad esempio, " get *()" corrisponde a "java.lang.Object getObject()", ma non a "float getFloat()", né a "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. 
Problemi correlati