robolectric/robolectric — pull request #1361 by kriegfrj (2014-11-03 16:05:16+00:00)
Title: Deprecate the `Robolectric.Anything` interface

Always thought that the "Robolectric.Anything" interface was a little bit ugly, but understood its usefulness as a placeholder for the "required" constraint for the "value" attribute on the `@Implements` annotation. However, the constraint that we really want to have is that you must specify *either'* the `value` attribute or the `className` attribute, but not both. This would make the `Anything` interface redundant. With basic annotations such a constraint cannot be specified, but the advent of the Robolectric annotation processor now gives us a way to do that.

This PR updates the RAP to enforce constraint that either `value` or `className` (but not both) must be specified. The one exception to the constraint that both can't be specified is if `value` is set to `Robolectric.Anything` (though this usage is now deprecated and is retained only for backward compatibility with 3rd party shadows). All of the built-in shadows have been updated to take advantage of this new flexibility by removing the references to `Robolectric.Anything`. Finally, the `@Deprecated` annotation was added to the now-redundant interface.