OpensTree.java revision 3792:d516975e8110
1185695Sganbold/*
2185695Sganbold * Copyright (c) 2009, 2016, Oracle and/or its affiliates. All rights reserved.
3185695Sganbold * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4185695Sganbold *
5185695Sganbold * This code is free software; you can redistribute it and/or modify it
6185695Sganbold * under the terms of the GNU General Public License version 2 only, as
7185695Sganbold * published by the Free Software Foundation.  Oracle designates this
8185695Sganbold * particular file as subject to the "Classpath" exception as provided
9185695Sganbold * by Oracle in the LICENSE file that accompanied this code.
10185695Sganbold *
11185695Sganbold * This code is distributed in the hope that it will be useful, but WITHOUT
12185695Sganbold * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13185695Sganbold * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
14185695Sganbold * version 2 for more details (a copy is included in the LICENSE file that
15185695Sganbold * accompanied this code).
16185695Sganbold *
17185695Sganbold * You should have received a copy of the GNU General Public License version
18185695Sganbold * 2 along with this work; if not, write to the Free Software Foundation,
19185695Sganbold * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20185695Sganbold *
21185695Sganbold * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22185695Sganbold * or visit www.oracle.com if you need additional information or have any
23185695Sganbold * questions.
24185695Sganbold */
25185695Sganbold
26185695Sganboldpackage com.sun.source.tree;
27185695Sganbold
28185695Sganboldimport java.util.List;
29185695Sganbold
30185695Sganbold/**
31185695Sganbold * A tree node for an 'opens' directive in a module declaration.
32246119Skib *
33246119Skib * For example:
34185695Sganbold * <pre>
35185695Sganbold *    opens   <em>package-name</em>;
36185695Sganbold *    opens   <em>package-name</em> to <em>module-name</em>;
37185695Sganbold * </pre>
38185695Sganbold *
39185695Sganbold * @since 9
40185695Sganbold */
41185695Sganboldpublic interface OpensTree extends DirectiveTree {
42185695Sganbold
43185695Sganbold    /**
44246119Skib     * Returns the name of the package to be opened.
45246119Skib     * @return  the name of the package to be opened
46185695Sganbold     */
47246119Skib    ExpressionTree getPackageName();
48246119Skib
49185695Sganbold    /**
50185695Sganbold     * Returns the names of the modules to which the package is opened,
51185695Sganbold     * or null, if the package is opened to all modules.
52185695Sganbold     *
53185695Sganbold     * @return the names of the modules to which the package is opened, or null
54185695Sganbold     */
55185695Sganbold    List<? extends ExpressionTree> getModuleNames();
56246119Skib}
57246119Skib