AnnotatedConstruct
, Element
, QualifiedNameable
public interface ModuleElement extends Element, QualifiedNameable
Elements.getModuleOf(javax.lang.model.element.Element)
Modifier and Type | Interface | Description |
---|---|---|
static interface |
ModuleElement.Directive |
NEW Represents a directive within the declaration of this
module.
|
static class |
ModuleElement.DirectiveKind |
NEW The
kind of a directive. |
static interface |
ModuleElement.DirectiveVisitor<R,P> |
NEW A visitor of module directives, in the style of the visitor design
pattern.
|
static interface |
ModuleElement.ExportsDirective |
NEW An exported package of a module.
|
static interface |
ModuleElement.OpensDirective |
NEW An opened package of a module.
|
static interface |
ModuleElement.ProvidesDirective |
NEW An implementation of a service provided by a module.
|
static interface |
ModuleElement.RequiresDirective |
NEW A dependency of a module.
|
static interface |
ModuleElement.UsesDirective |
NEW A reference to a service used by a module.
|
Modifier and Type | Method | Description |
---|---|---|
List<? extends ModuleElement.Directive> |
getDirectives() |
Returns the directives contained in the declaration of this module.
|
List<? extends Element> |
getEnclosedElements() |
Returns the packages within this module.
|
Element |
getEnclosingElement() |
Returns
null since a module is not enclosed by another
element. |
Name |
getQualifiedName() |
Returns the fully qualified name of this module.
|
Name |
getSimpleName() |
Returns the simple name of this module.
|
boolean |
isOpen() |
Returns
true if this is an open module and
false otherwise. |
boolean |
isUnnamed() |
Returns
true if this is an unnamed module and
false otherwise. |
accept, asType, equals, getAnnotation, getAnnotationMirrors, getKind, getModifiers, hashCode
getAnnotationsByType
Name getQualifiedName()
getQualifiedName
in interface QualifiedNameable
Name getSimpleName()
getSimpleName
in interface Element
PackageElement.getSimpleName()
,
ExecutableElement.getSimpleName()
,
TypeElement.getSimpleName()
,
VariableElement.getSimpleName()
,
getSimpleName()
List<? extends Element> getEnclosedElements()
getEnclosedElements
in interface Element
TypeElement.getEnclosedElements()
,
PackageElement.getEnclosedElements()
,
getEnclosedElements()
,
Elements.getAllMembers(javax.lang.model.element.TypeElement)
boolean isOpen()
true
if this is an open module and
false
otherwise.true
if this is an open module and
false
otherwiseboolean isUnnamed()
true
if this is an unnamed module and
false
otherwise.true
if this is an unnamed module and
false
otherwiseElement getEnclosingElement()
null
since a module is not enclosed by another
element.getEnclosingElement
in interface Element
null
Elements.getPackageOf(javax.lang.model.element.Element)
List<? extends ModuleElement.Directive> getDirectives()
Copyright © 1993, 2017, Oracle and/or its affiliates · All rights reserved · License