Fixed
Status Update
Comments
tr...@google.com <tr...@google.com>
tr...@google.com <tr...@google.com> #3
Whatever works to allow for multiple experimental classes.
Is it considered a breaking change to add a default value to markerClass? Could you do something like this:
public @interface UseExperimental {
Class<?> markerClass() default void.class;
Class<?>[] value() default {};
}
Then @UseExperimental could be used like:
@UseExperimental(markerClass = MyExperimental.class)
or
@UseExperimental(MyExperimental.class)
or
@UseExperimental({MyExperimental.class, MyOtherExperimental.class})
It would also be ok (but a little weird) to use it like:
@UseExperimental(markerClass = MyExperimental.class, value = {MyOtherExperimental.class})
Is it considered a breaking change to add a default value to markerClass? Could you do something like this:
public @interface UseExperimental {
Class<?> markerClass() default void.class;
Class<?>[] value() default {};
}
Then @UseExperimental could be used like:
@UseExperimental(markerClass = MyExperimental.class)
or
@UseExperimental(MyExperimental.class)
or
@UseExperimental({MyExperimental.class, MyOtherExperimental.class})
It would also be ok (but a little weird) to use it like:
@UseExperimental(markerClass = MyExperimental.class, value = {MyOtherExperimental.class})
al...@google.com <al...@google.com> #4
Thanks, we could reproduce the bug after some time.
A pending fix is athttps://review.source.android.com/24433
A pending fix is at
Description
By comparison, the kotlin UseExperimental annotation takes a vararg markerClass argument which allows for multiple experimental APIs in the same scope.