Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8cf2c902 authored by Tor Norbye's avatar Tor Norbye
Browse files

b/22228577: Improve @IntDef annotation to handle special values and ranges

(Will be used to for example solve
181789: Incorrect/inconsistent lint + documentation for Snackbar
)

Change-Id: I843a9286b6af6e14640391e6f0261c398d6963fa
parent 30962d8b
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@ package android.annotation;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.LOCAL_VARIABLE;
import static java.lang.annotation.ElementType.METHOD;
@@ -38,7 +39,7 @@ import static java.lang.annotation.RetentionPolicy.SOURCE;
 * @hide
 */
@Retention(SOURCE)
@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE})
@Target({METHOD,PARAMETER,FIELD,LOCAL_VARIABLE,ANNOTATION_TYPE})
public @interface IntRange {
    /** Smallest value, inclusive */
    long from() default Long.MIN_VALUE;