langtools/src/jdk.compiler/share/classes/com/sun/source/tree/ModuleTree.java
changeset 42407 f3702cff2933
parent 36526 3b41f1c69604
equal deleted inserted replaced
42257:43104fb390fd 42407:f3702cff2933
    31 /**
    31 /**
    32  * A tree node for a module declaration.
    32  * A tree node for a module declaration.
    33  *
    33  *
    34  * For example:
    34  * For example:
    35  * <pre>
    35  * <pre>
    36  *    module <em>module-name</em> {
    36  *    <em>annotations</em>
       
    37  *    [open] module <em>module-name</em> {
    37  *        <em>directives</em>
    38  *        <em>directives</em>
    38  *    }
    39  *    }
    39  * </pre>
    40  * </pre>
    40  *
    41  *
    41  * @since 9
    42  * @since 9
    42  */
    43  */
    43 public interface ModuleTree extends Tree {
    44 public interface ModuleTree extends Tree {
       
    45     /**
       
    46      * Returns the annotations associated with this module declaration.
       
    47      * @return the annotations
       
    48      */
       
    49     List<? extends AnnotationTree> getAnnotations();
       
    50 
       
    51     /**
       
    52      * Returns the type of this module.
       
    53      * @return the type of this module
       
    54      */
       
    55     ModuleKind getModuleType();
       
    56 
    44     /**
    57     /**
    45      * Returns the name of the module.
    58      * Returns the name of the module.
    46      * @return the name of the module
    59      * @return the name of the module
    47      */
    60      */
    48     ExpressionTree getName();
    61     ExpressionTree getName();
    50     /**
    63     /**
    51      * Returns the directives in the module declaration.
    64      * Returns the directives in the module declaration.
    52      * @return the directives in the module declaration
    65      * @return the directives in the module declaration
    53      */
    66      */
    54     List<? extends DirectiveTree> getDirectives();
    67     List<? extends DirectiveTree> getDirectives();
       
    68 
       
    69     /**
       
    70      * The kind of the module.
       
    71      */
       
    72     enum ModuleKind {
       
    73         /**
       
    74          * Open module.
       
    75          */
       
    76         OPEN,
       
    77         /**
       
    78          * Strong module.
       
    79          */
       
    80         STRONG;
       
    81     }
       
    82 
    55 }
    83 }