@@ -0,0 +1,1410 @@
+package io.jasonsparc.chemistry.util;%0A%0Aimport android.support.annotation.AnyRes;%0Aimport android.support.annotation.IntRange;%0A%0Aimport java.lang.annotation.Documented;%0Aimport java.lang.annotation.Retention;%0Aimport java.lang.annotation.Target;%0A%0Aimport static io.jasonsparc.chemistry.util.ValidRes.MIN_RES_ID;%0Aimport static java.lang.annotation.ElementType.ANNOTATION_TYPE;%0Aimport static java.lang.annotation.ElementType.FIELD;%0Aimport static java.lang.annotation.ElementType.LOCAL_VARIABLE;%0Aimport static java.lang.annotation.ElementType.METHOD;%0Aimport static java.lang.annotation.ElementType.PARAMETER;%0Aimport static java.lang.annotation.RetentionPolicy.CLASS;%0A%0A/**%0A * Denotes that the annotated element of integer type, represents a valid resource identifier (e.g.%0A * %7B@code android.R.string.ok%7D, %7B@code android.R.id.hint%7D, %7B@code android.R.layout.simple_list_item_1%7D)%0A * and must not be of an arbitrary int value.%0A * %3Cp%3E%0A * This annotation is meant to be used along with %7B@link AnyRes%7D to further enforce that an element%0A * should be a valid resource.%0A * %3Cp%3E%0A * Created by jason on 08/07/2016.%0A *%0A * @see AnyRes%0A */%0A@Documented%0A@Retention(CLASS)%0A@Target(%7BMETHOD, PARAMETER, FIELD, LOCAL_VARIABLE, ANNOTATION_TYPE%7D)%0A@IntRange(from = MIN_RES_ID, to = Integer.MAX_VALUE)%0Apublic @interface ValidRes %7B%0A%0A%09/**%0A%09 * The minimum int value that represents a valid resource identifier.%0A%09 */%0A%09int MIN_RES_ID = 0x01000000;%0A%7D%0A

Add a constraint for valid resids