jtulach@1379: /* jtulach@1379: * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved. jtulach@1379: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jtulach@1379: * jtulach@1379: * This code is free software; you can redistribute it and/or modify it jtulach@1379: * under the terms of the GNU General Public License version 2 only, as jtulach@1379: * published by the Free Software Foundation. Oracle designates this jtulach@1379: * particular file as subject to the "Classpath" exception as provided jtulach@1379: * by Oracle in the LICENSE file that accompanied this code. jtulach@1379: * jtulach@1379: * This code is distributed in the hope that it will be useful, but WITHOUT jtulach@1379: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jtulach@1379: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jtulach@1379: * version 2 for more details (a copy is included in the LICENSE file that jtulach@1379: * accompanied this code). jtulach@1379: * jtulach@1379: * You should have received a copy of the GNU General Public License version jtulach@1379: * 2 along with this work; if not, write to the Free Software Foundation, jtulach@1379: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jtulach@1379: * jtulach@1379: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jtulach@1379: * or visit www.oracle.com if you need additional information or have any jtulach@1379: * questions. jtulach@1379: */ jtulach@1379: jtulach@1379: package java.lang.annotation; jtulach@1379: jtulach@1379: /** jtulach@1379: * Annotation retention policy. The constants of this enumerated type jtulach@1379: * describe the various policies for retaining annotations. They are used jtulach@1379: * in conjunction with the {@link Retention} meta-annotation type to specify jtulach@1379: * how long annotations are to be retained. jtulach@1379: * jtulach@1379: * @author Joshua Bloch jtulach@1379: * @since 1.5 jtulach@1379: */ jtulach@1379: public enum RetentionPolicy { jtulach@1379: /** jtulach@1379: * Annotations are to be discarded by the compiler. jtulach@1379: */ jtulach@1379: SOURCE, jtulach@1379: jtulach@1379: /** jtulach@1379: * Annotations are to be recorded in the class file by the compiler jtulach@1379: * but need not be retained by the VM at run time. This is the default jtulach@1379: * behavior. jtulach@1379: */ jtulach@1379: CLASS, jtulach@1379: jtulach@1379: /** jtulach@1379: * Annotations are to be recorded in the class file by the compiler and jtulach@1379: * retained by the VM at run time, so they may be read reflectively. jtulach@1379: * jtulach@1379: * @see java.lang.reflect.AnnotatedElement jtulach@1379: */ jtulach@1379: RUNTIME jtulach@1379: }