--- a/langtools/src/jdk.compiler/share/classes/com/sun/source/tree/ModuleTree.java Wed Nov 23 16:16:36 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/source/tree/ModuleTree.java Thu Dec 01 09:02:42 2016 +0000
@@ -33,7 +33,8 @@
*
* For example:
* <pre>
- * module <em>module-name</em> {
+ * <em>annotations</em>
+ * [open] module <em>module-name</em> {
* <em>directives</em>
* }
* </pre>
@@ -42,6 +43,18 @@
*/
public interface ModuleTree extends Tree {
/**
+ * Returns the annotations associated with this module declaration.
+ * @return the annotations
+ */
+ List<? extends AnnotationTree> getAnnotations();
+
+ /**
+ * Returns the type of this module.
+ * @return the type of this module
+ */
+ ModuleKind getModuleType();
+
+ /**
* Returns the name of the module.
* @return the name of the module
*/
@@ -52,4 +65,19 @@
* @return the directives in the module declaration
*/
List<? extends DirectiveTree> getDirectives();
+
+ /**
+ * The kind of the module.
+ */
+ enum ModuleKind {
+ /**
+ * Open module.
+ */
+ OPEN,
+ /**
+ * Strong module.
+ */
+ STRONG;
+ }
+
}