< prev index next >

src/java.compiler/share/classes/javax/lang/model/element/ModuleElement.java

Print this page




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.lang.model.element;
  27 
  28 import java.util.List;
  29 import javax.lang.model.type.TypeMirror;
  30 
  31 /**
  32  * Represents a module program element.  Provides access to
  33  * information about the module, its directives, and its members.
  34  *
  35  * @see javax.lang.model.util.Elements#getModuleOf
  36  * @since 9
  37  * @jls 7.7 Module Declarations
  38  * @spec JPMS
  39  */
  40 public interface ModuleElement extends Element, QualifiedNameable {
  41     /**
  42      * Returns a {@linkplain javax.lang.model.type.NoType pseudo-type}
  43      * for this module.
  44      * @return a pseudo-type for this module
  45      *
  46      * @see javax.lang.model.type.NoType
  47      * @see javax.lang.model.type.TypeKind#MODULE
  48      */
  49     @Override
  50     TypeMirror asType();
  51 
  52     /**
  53      * Returns the fully qualified name of this module.  For an
  54      * {@linkplain #isUnnamed() unnamed module}, an empty name is returned.
  55      *
  56      * @apiNote If the module name consists of one identifier, then
  57      * this method returns that identifier, which is deemed to be
  58      * module's fully qualified name despite not being in qualified
  59      * form.  If the module name consists of more than one identifier,
  60      * then this method returns the entire name.
  61      *
  62      * @return the fully qualified name of this module, or an
  63      * empty name if this is an unnamed module
  64      *
  65      * @jls 6.2 Names and Identifiers
  66      */
  67     @Override
  68     Name getQualifiedName();
  69 
  70     /**




   9  * by Oracle in the LICENSE file that accompanied this code.
  10  *
  11  * This code is distributed in the hope that it will be useful, but WITHOUT
  12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  13  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  14  * version 2 for more details (a copy is included in the LICENSE file that
  15  * accompanied this code).
  16  *
  17  * You should have received a copy of the GNU General Public License version
  18  * 2 along with this work; if not, write to the Free Software Foundation,
  19  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  20  *
  21  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  22  * or visit www.oracle.com if you need additional information or have any
  23  * questions.
  24  */
  25 
  26 package javax.lang.model.element;
  27 
  28 import java.util.List;

  29 
  30 /**
  31  * Represents a module program element.  Provides access to
  32  * information about the module, its directives, and its members.
  33  *
  34  * @see javax.lang.model.util.Elements#getModuleOf
  35  * @since 9
  36  * @jls 7.7 Module Declarations
  37  * @spec JPMS
  38  */
  39 public interface ModuleElement extends Element, QualifiedNameable {










  40 
  41     /**
  42      * Returns the fully qualified name of this module.  For an
  43      * {@linkplain #isUnnamed() unnamed module}, an empty name is returned.
  44      *
  45      * @apiNote If the module name consists of one identifier, then
  46      * this method returns that identifier, which is deemed to be
  47      * module's fully qualified name despite not being in qualified
  48      * form.  If the module name consists of more than one identifier,
  49      * then this method returns the entire name.
  50      *
  51      * @return the fully qualified name of this module, or an
  52      * empty name if this is an unnamed module
  53      *
  54      * @jls 6.2 Names and Identifiers
  55      */
  56     @Override
  57     Name getQualifiedName();
  58 
  59     /**


< prev index next >