- All Superinterfaces:
- AnnotatedConstruct,- Element,- QualifiedNameable
Represents a module program element.  Provides access to
 information about the module, its directives, and its members.
- See Java Language Specification:
- 
7.7 Module Declarations
- Since:
- 9
- See Also:
- 
Nested Class SummaryNested ClassesModifier and TypeInterfaceDescriptionstatic interfaceRepresents a directive within the declaration of this module.static enumThekindof a directive.static interfaceA visitor of module directives, in the style of the visitor design pattern.static interfaceAn exported package of a module.static interfaceAn opened package of a module.static interfaceAn implementation of a service provided by a module.static interfaceA dependency of a module.static interfaceA reference to a service used by a module.
- 
Method SummaryModifier and TypeMethodDescriptionasType()Returns a pseudo-type for this module.List<? extends ModuleElement.Directive>Returns the directives contained in the declaration of this module.Returns the packages within this module.Returnsnullsince a module is not enclosed by another element.Returns the fully qualified name of this module.Returns the simple name of this module.booleanisOpen()Returnstrueif this is an open module andfalseotherwise.booleanReturnstrueif this is an unnamed module andfalseotherwise.Methods declared in interface javax.lang.model.element.Elementaccept, equals, getAnnotation, getAnnotationMirrors, getAnnotationsByType, getKind, getModifiers, hashCode
- 
Method Details- 
asTypeTypeMirror asType()Returns a pseudo-type for this module.- Specified by:
- asTypein interface- Element
- Returns:
- a pseudo-type for this module
- See Also:
 
- 
getQualifiedNameName getQualifiedName()Returns the fully qualified name of this module. For an unnamed module, an empty name is returned.- Specified by:
- getQualifiedNamein interface- QualifiedNameable
- API Note:
- If the module name consists of one identifier, then this method returns that identifier, which is deemed to be module's fully qualified name despite not being in qualified form. If the module name consists of more than one identifier, then this method returns the entire name.
- Returns:
- the fully qualified name of this module, or an empty name if this is an unnamed module
- See Java Language Specification:
- 
6.2 Names and Identifiers
 
- 
getSimpleNameName getSimpleName()Returns the simple name of this module. For an unnamed module, an empty name is returned.- Specified by:
- getSimpleNamein interface- Element
- API Note:
- If the module name consists of one identifier, then this method returns that identifier. If the module name consists of more than one identifier, then this method returns the rightmost such identifier, which is deemed to be the module's simple name.
- Returns:
- the simple name of this module or an empty name if this is an unnamed module
- See Java Language Specification:
- 
6.2 Names and Identifiers
- See Also:
 
- 
getEnclosedElementsReturns the packages within this module.- Specified by:
- getEnclosedElementsin interface- Element
- Returns:
- the packages within this module
- See Also:
 
- 
isOpenboolean isOpen()Returnstrueif this is an open module andfalseotherwise.- Returns:
- trueif this is an open module and- falseotherwise
 
- 
isUnnamedboolean isUnnamed()Returnstrueif this is an unnamed module andfalseotherwise.- Returns:
- trueif this is an unnamed module and- falseotherwise
- See Java Language Specification:
- 
7.7.5 Unnamed Modules
 
- 
getEnclosingElementElement getEnclosingElement()Returnsnullsince a module is not enclosed by another element.- Specified by:
- getEnclosingElementin interface- Element
- Returns:
- null
- See Also:
 
- 
getDirectivesList<? extends ModuleElement.Directive> getDirectives()Returns the directives contained in the declaration of this module.- Returns:
- the directives in the declaration of this module
 
 
-