Reputation: 7735
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'
Upvotes: 2
Views: 6067
Reputation: 4374
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 final
if 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:
public abstract class Foo extends com.opensymphony.xwork2.ActionSupport implements com.company.project.utils.Constantes {
// ...
}
Then, have all the classes you want to keep extend that class. Then you just need to specify * extends Foo
in the -keep options.
Upvotes: 4