i need to keep all class that extend com.opensymphony.xwork2.ActionSupport and implements a custom interface .
when i try this
-keepnames public class * extends com.opensymphony.xwork2.ActionSupport implements com.company.project.utils.Constantes {
*;
}
i get the following error :
error expecting openning ‘{‘ at ‘implements’
If memory serves, you can specify classes that extend another class OR classes that implement an interface, but not both. The documentation doesn’t make this particularly clear but it is implied there.
There are a couple ways around this, assuming that it isn’t sufficient for you to just specify one or the other:
private static finalif you like) marker field to each of the classes you want to keep, and specify that in the -keep options.EDIT
Another option would be to create a class like this:
Then, have all the classes you want to keep extend that class. Then you just need to specify
* extends Fooin the -keep options.