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.TreeTraversalABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, NODE_BY_BEGIN_POSITION, prettyPrinterNoCommentsConfiguration, 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, customInitialization, equals, findAll, findAll, findCompilationUnit, findFirst, findFirst, findFirst, findRootNode, getAllContainedComments, getChildNodes, getChildNodesByType, getComment, getData, getDataKeys, getNodesByType, getOrphanComments, getParentNode, getParentNodeForChildren, getParsed, getRange, getSymbolResolver, getTokenRange, getToStringPrettyPrinterConfiguration, hashCode, isRegistered, notifyPropertyChange, register, register, registerForSubtree, remove, removeComment, removeData, removeForced, removeOrphanComment, replace, setAsParentNodeOf, setAsParentNodeOf, setBlockComment, setComment, setData, setLineComment, setParentNode, setParsed, setRange, setTokenRange, setToStringPrettyPrinterConfiguration, stream, stream, toString, toString, tryAddImportToParentCompilationUnit, unregister, walk, walk, walkfinalize, getClass, notify, notifyAll, wait, wait, waitgetNameAsString, setNameaddAndGetAnnotation, addAndGetAnnotation, addAnnotation, addAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresent, setAnnotation, tryAddImportToParentCompilationUnitfindAncestor, findAncestorcontainsWithin, getBegin, getEndpublic 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)
Visitableaccept in interface VisitableR - 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)
Visitablepublic 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 Nodepublic ModuleDeclaration addDirective(String directive)
public ModuleDeclaration addDirective(ModuleDirective directive)
Copyright © 2007–2019. All rights reserved.