langtools/src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java
changeset 43767 9cff98a149cb
parent 43567 d0d89c3da7be
child 44062 9a579f258574
equal deleted inserted replaced
43648:ce7b7f98a236 43767:9cff98a149cb
    31  * Represents a module program element.  Provides access to information
    31  * Represents a module program element.  Provides access to information
    32  * about the module and its members.
    32  * about the module and its members.
    33  *
    33  *
    34  * @see javax.lang.model.util.Elements#getModuleOf
    34  * @see javax.lang.model.util.Elements#getModuleOf
    35  * @since 9
    35  * @since 9
       
    36  * @spec JPMS
    36  */  // TODO: add @jls to module section
    37  */  // TODO: add @jls to module section
    37 public interface ModuleElement extends Element, QualifiedNameable {
    38 public interface ModuleElement extends Element, QualifiedNameable {
    38 
    39 
    39     /**
    40     /**
    40      * Returns the fully qualified name of this module.  For an
    41      * Returns the fully qualified name of this module.  For an
   102      * <p>Note that it is possible additional directive kinds will be added
   103      * <p>Note that it is possible additional directive kinds will be added
   103      * to accommodate new, currently unknown, language structures added to
   104      * to accommodate new, currently unknown, language structures added to
   104      * future versions of the Java&trade; programming language.
   105      * future versions of the Java&trade; programming language.
   105      *
   106      *
   106      * @since 9
   107      * @since 9
       
   108      * @spec JPMS
   107      */
   109      */
   108     enum DirectiveKind {
   110     enum DirectiveKind {
   109         /** A "requires (static|transitive)* module-name" directive. */
   111         /** A "requires (static|transitive)* module-name" directive. */
   110         REQUIRES,
   112         REQUIRES,
   111         /** An "exports package-name [to module-name-list]" directive. */
   113         /** An "exports package-name [to module-name-list]" directive. */
   120 
   122 
   121     /**
   123     /**
   122      * Represents a "module statement" within the declaration of this module.
   124      * Represents a "module statement" within the declaration of this module.
   123      *
   125      *
   124      * @since 9
   126      * @since 9
       
   127      * @spec JPMS
   125      *
   128      *
   126      */ // TODO: add jls to Module Statement
   129      */ // TODO: add jls to Module Statement
   127     interface Directive {
   130     interface Directive {
   128         /**
   131         /**
   129          * Returns the {@code kind} of this directive.
   132          * Returns the {@code kind} of this directive.
   134     }
   137     }
   135 
   138 
   136     /**
   139     /**
   137      * A dependency of a module.
   140      * A dependency of a module.
   138      * @since 9
   141      * @since 9
       
   142      * @spec JPMS
   139      */
   143      */
   140     interface RequiresDirective extends Directive {
   144     interface RequiresDirective extends Directive {
   141         /**
   145         /**
   142          * Returns whether or not this is a static dependency.
   146          * Returns whether or not this is a static dependency.
   143          * @return whether or not this is a static dependency
   147          * @return whether or not this is a static dependency
   158     }
   162     }
   159 
   163 
   160     /**
   164     /**
   161      * An exported package of a module.
   165      * An exported package of a module.
   162      * @since 9
   166      * @since 9
       
   167      * @spec JPMS
   163      */
   168      */
   164     interface ExportsDirective extends Directive {
   169     interface ExportsDirective extends Directive {
   165 
   170 
   166         /**
   171         /**
   167          * Returns the package being exported.
   172          * Returns the package being exported.
   179     }
   184     }
   180 
   185 
   181     /**
   186     /**
   182      * An opened package of a module.
   187      * An opened package of a module.
   183      * @since 9
   188      * @since 9
       
   189      * @spec JPMS
   184      */
   190      */
   185     interface OpensDirective extends Directive {
   191     interface OpensDirective extends Directive {
   186 
   192 
   187         /**
   193         /**
   188          * Returns the package being opened.
   194          * Returns the package being opened.
   200     }
   206     }
   201 
   207 
   202     /**
   208     /**
   203      * An implementation of a service provided by a module.
   209      * An implementation of a service provided by a module.
   204      * @since 9
   210      * @since 9
       
   211      * @spec JPMS
   205      */
   212      */
   206     interface ProvidesDirective extends Directive {
   213     interface ProvidesDirective extends Directive {
   207         /**
   214         /**
   208          * Returns the service being provided.
   215          * Returns the service being provided.
   209          * @return the service being provided
   216          * @return the service being provided
   218     }
   225     }
   219 
   226 
   220     /**
   227     /**
   221      * A reference to a service used by a module.
   228      * A reference to a service used by a module.
   222      * @since 9
   229      * @since 9
       
   230      * @spec JPMS
   223      */
   231      */
   224     interface UsesDirective extends Directive {
   232     interface UsesDirective extends Directive {
   225         /**
   233         /**
   226          * Returns the service that is used.
   234          * Returns the service that is used.
   227          * @return the service that is used
   235          * @return the service that is used