AnnotationTree.java revision 2571:10fc81ac75b4
1184610Salfred/*
2184610Salfred * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
3184610Salfred * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4184610Salfred *
5184610Salfred * This code is free software; you can redistribute it and/or modify it
6184610Salfred * under the terms of the GNU General Public License version 2 only, as
7184610Salfred * published by the Free Software Foundation.  Oracle designates this
8184610Salfred * particular file as subject to the "Classpath" exception as provided
9184610Salfred * by Oracle in the LICENSE file that accompanied this code.
10184610Salfred *
11184610Salfred * This code is distributed in the hope that it will be useful, but WITHOUT
12184610Salfred * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13184610Salfred * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14184610Salfred * version 2 for more details (a copy is included in the LICENSE file that
15184610Salfred * accompanied this code).
16184610Salfred *
17184610Salfred * You should have received a copy of the GNU General Public License version
18184610Salfred * 2 along with this work; if not, write to the Free Software Foundation,
19184610Salfred * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20184610Salfred *
21184610Salfred * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22184610Salfred * or visit www.oracle.com if you need additional information or have any
23184610Salfred * questions.
24184610Salfred */
25184610Salfred
26184610Salfredpackage com.sun.source.tree;
27184610Salfred
28184610Salfredimport java.util.List;
29184610Salfred
30193640Sariff/**
31193640Sariff * A tree node for an annotation.
32193640Sariff *
33193640Sariff * For example:
34184610Salfred * <pre>
35184610Salfred *    {@code @}<em>annotationType</em>
36188957Sthompsa *    {@code @}<em>annotationType</em> ( <em>arguments</em> )
37184610Salfred * </pre>
38184610Salfred *
39184610Salfred * @jls section 9.7
40184610Salfred *
41184610Salfred * @author Peter von der Ah&eacute;
42184610Salfred * @author Jonathan Gibbons
43184610Salfred * @since 1.6
44184610Salfred */
45184610Salfred@jdk.Exported
46184610Salfredpublic interface AnnotationTree extends ExpressionTree {
47184610Salfred    /**
48184610Salfred     * Returns the annotation type.
49184610Salfred     * @return the annotation type
50184610Salfred     */
51184610Salfred    Tree getAnnotationType();
52184610Salfred
53184610Salfred    /**
54184610Salfred     * Returns the arguments, if any, for the annotation.
55184610Salfred     * @return the arguments for the annotation type
56184610Salfred     */
57184610Salfred    List<? extends ExpressionTree> getArguments();
58184610Salfred}
59184610Salfred