18c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam/* 28c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Copyright (C) 2015 The Android Open Source Project 38c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * 48c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Licensed under the Apache License, Version 2.0 (the "License"); 58c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * you may not use this file except in compliance with the License. 68c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * You may obtain a copy of the License at 78c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * 88c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * http://www.apache.org/licenses/LICENSE-2.0 98c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * 108c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Unless required by applicable law or agreed to in writing, software 118c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * distributed under the License is distributed on an "AS IS" BASIS, 128c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 138c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * See the License for the specific language governing permissions and 148c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * limitations under the License. 158c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam */ 168c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lampackage com.android.setupwizardlib.annotations; 178c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam 188c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport java.lang.annotation.Retention; 198c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport java.lang.annotation.Target; 208c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam 218c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.ANNOTATION_TYPE; 228c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.CONSTRUCTOR; 238c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.FIELD; 248c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.METHOD; 258c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.PACKAGE; 268c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.ElementType.TYPE; 278c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lamimport static java.lang.annotation.RetentionPolicy.CLASS; 288c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam 298c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam/** 308c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Denotes that the annotated element should not be removed when 318c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * the code is minified at build time. This is typically used 328c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * on methods and classes that are accessed only via reflection 338c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * so a compiler may think that the code is unused. 348c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * <p> 358c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Example: 368c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * <pre>{@code 378c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * @Keep 388c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * public void foo() { 398c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * ... 408c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * } 418c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * }</pre> 428c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * 438c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * Copied from android.support.annotation.Keep 448c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam * TODO: Add support annotation library as a dependency and use that. 458c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam */ 468c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam@Retention(CLASS) 478c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam@Target({PACKAGE,TYPE,ANNOTATION_TYPE,CONSTRUCTOR,METHOD,FIELD}) 488c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lampublic @interface Keep { 498c10c403c063aff3f17c4949b0fe9a88536ae580Maurice Lam} 50