public class ModuleDeclaration extends Node implements NodeWithName<ModuleDeclaration>, NodeWithAnnotations<ModuleDeclaration>
@Foo module com.github.abc { requires a.B; }
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY
Constructor and Description |
---|
ModuleDeclaration() |
ModuleDeclaration(Name name,
boolean isOpen) |
ModuleDeclaration(NodeList<AnnotationExpr> annotations,
Name name,
boolean isOpen,
NodeList<ModuleDirective> directives) |
ModuleDeclaration(TokenRange tokenRange,
NodeList<AnnotationExpr> annotations,
Name name,
boolean isOpen,
NodeList<ModuleDirective> directives)
This constructor is used by the parser and is considered private.
|
Modifier and Type | Method and Description |
---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
ModuleDeclaration |
addDirective(ModuleDirective directive) |
ModuleDeclaration |
addDirective(String directive)
Add a directive to the module, like "exports R.S to T1.U1, T2.U2;"
|
ModuleDeclaration |
clone() |
NodeList<AnnotationExpr> |
getAnnotations() |
NodeList<ModuleDirective> |
getDirectives() |
ModuleDeclarationMetaModel |
getMetaModel() |
Name |
getName() |
boolean |
isOpen() |
boolean |
remove(Node node) |
boolean |
replace(Node node,
Node replacementNode) |
ModuleDeclaration |
setAnnotations(NodeList<AnnotationExpr> annotations) |
ModuleDeclaration |
setDirectives(NodeList<ModuleDirective> directives) |
ModuleDeclaration |
setName(Name name) |
ModuleDeclaration |
setOpen(boolean isOpen) |
addOrphanComment, containsData, createDefaultPrinter, createDefaultPrinter, customInitialization, equals, findAll, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getDefaultPrinterConfiguration, getLineEndingStyle, getLineEndingStyleOrDefault, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getPrinter, getPrinter, getRange, getSymbolResolver, getTokenRange, hashCode, hasScope, isAncestorOf, isPhantom, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walk
finalize, getClass, notify, notifyAll, wait, wait, wait
getNameAsString, setName
addAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnit
findAncestor, findAncestor, findAncestor, hasParentNode, isDescendantOf
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
public ModuleDeclaration()
public ModuleDeclaration(Name name, boolean isOpen)
public ModuleDeclaration(NodeList<AnnotationExpr> annotations, Name name, boolean isOpen, NodeList<ModuleDirective> directives)
public ModuleDeclaration(TokenRange tokenRange, NodeList<AnnotationExpr> annotations, Name name, boolean isOpen, NodeList<ModuleDirective> directives)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Visitable
accept
in interface Visitable
R
- the type of the return value of the visitorA
- the type the user argument passed to the visitorv
- the visitor implementationarg
- the argument passed to the visitor (of type A)public <A> void accept(VoidVisitor<A> v, A arg)
Visitable
public Name getName()
getName
in interface NodeWithName<ModuleDeclaration>
public ModuleDeclaration setName(Name name)
setName
in interface NodeWithName<ModuleDeclaration>
public NodeList<AnnotationExpr> getAnnotations()
getAnnotations
in interface NodeWithAnnotations<ModuleDeclaration>
public ModuleDeclaration setAnnotations(NodeList<AnnotationExpr> annotations)
setAnnotations
in interface NodeWithAnnotations<ModuleDeclaration>
public boolean isOpen()
public ModuleDeclaration setOpen(boolean isOpen)
public NodeList<ModuleDirective> getDirectives()
public ModuleDeclaration setDirectives(NodeList<ModuleDirective> directives)
public ModuleDeclaration clone()
public ModuleDeclarationMetaModel getMetaModel()
getMetaModel
in class Node
public ModuleDeclaration addDirective(String directive)
public ModuleDeclaration addDirective(ModuleDirective directive)
Copyright © 2007–2022. All rights reserved.