1 /* 2 * @(#)ElementType.java 1.6 04/03/16 3 * 4 * Copyright 2004 Sun Microsystems, Inc. All rights reserved. 5 * SUN PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. 6 */ 7 8 package java.lang.annotation; 9 10 /** 11 * A program element type. The constants of this enumerated type 12 * provide a simple classification of the declared elements in a 13 * Java program. 14 * 15 * <p>These constants are used with the {@link Target} meta-annotation type 16 * to specify where it is legal to use an annotation type. 17 * 18 * @author Joshua Bloch 19 * @since 1.5 20 */ 21 public enum ElementType { 22 /** Class, interface (including annotation type), or enum declaration */ 23 TYPE, 24 25 /** Field declaration (inlcudes enum constants) */ 26 FIELD, 27 28 /** Method declaration */ 29 METHOD, 30 31 /** Parameter declaration */ 32 PARAMETER, 33 34 /** Constructor declaration */ 35 CONSTRUCTOR, 36 37 /** Local variable declaration */ 38 LOCAL_VARIABLE, 39 40 /** Annotation type declaration */ 41 ANNOTATION_TYPE, 42 43 /** Package declaration */ 44 PACKAGE 45 } 46