Class ModuleRequiresDirective
java.lang.Object
com.github.javaparser.ast.Node
com.github.javaparser.ast.modules.ModuleDirective
com.github.javaparser.ast.modules.ModuleRequiresDirective
- All Implemented Interfaces:
NodeWithStaticModifier<ModuleRequiresDirective>
,NodeWithModifiers<ModuleRequiresDirective>
,NodeWithName<ModuleRequiresDirective>
,NodeWithRange<Node>
,NodeWithTokenRange<Node>
,Observable
,Visitable
,HasParentNode<Node>
,Cloneable
public class ModuleRequiresDirective
extends ModuleDirective
implements NodeWithStaticModifier<ModuleRequiresDirective>, NodeWithName<ModuleRequiresDirective>
A require directive in module-info.java.
require a.b.C;
-
Nested Class Summary
Nested classes/interfaces inherited from class com.github.javaparser.ast.Node
Node.BreadthFirstIterator, Node.DirectChildrenIterator, Node.ObserverRegistrationMode, Node.ParentsVisitor, Node.Parsedness, Node.PostOrderIterator, Node.PreOrderIterator, Node.TreeTraversal
-
Field Summary
Fields inherited from class com.github.javaparser.ast.Node
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE, LINE_SEPARATOR_KEY, NODE_BY_BEGIN_POSITION, PHANTOM_KEY, prettyPrinterNoCommentsConfiguration, PRINTER_KEY, SYMBOL_RESOLVER_KEY
-
Constructor Summary
ConstructorsConstructorDescriptionModuleRequiresDirective(NodeList<Modifier> modifiers, Name name)
ModuleRequiresDirective(TokenRange tokenRange, NodeList<Modifier> modifiers, Name name)
This constructor is used by the parser and is considered private. -
Method Summary
Modifier and TypeMethodDescription<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.clone()
Return the modifiers of this variable declaration.getName()
void
void
boolean
boolean
boolean
boolean
boolean
setModifiers(NodeList<Modifier> modifiers)
setTransitive(boolean set)
Methods inherited from class com.github.javaparser.ast.modules.ModuleDirective
asModuleExportsDirective, asModuleExportsStmt, asModuleOpensDirective, asModuleOpensStmt, asModuleProvidesDirective, asModuleProvidesStmt, asModuleUsesDirective, asModuleUsesStmt, ifModuleExportsDirective, ifModuleExportsStmt, ifModuleOpensDirective, ifModuleOpensStmt, ifModuleProvidesDirective, ifModuleProvidesStmt, ifModuleUsesDirective, ifModuleUsesStmt, isModuleExportsDirective, isModuleExportsStmt, isModuleOpensDirective, isModuleOpensStmt, isModuleProvidesDirective, isModuleProvidesStmt, isModuleUsesDirective, isModuleUsesStmt, toModuleExportsDirective, toModuleExportsStmt, toModuleOpensDirective, toModuleOpensStmt, toModuleProvidesDirective, toModuleProvidesStmt, toModuleUsesDirective, toModuleUsesStmt
Methods inherited from class com.github.javaparser.ast.Node
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
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.github.javaparser.HasParentNode
findAncestor, findAncestor, hasParentNode, isDescendantOf
Methods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithModifiers
addModifier, getAccessSpecifier, hasModifier, removeModifier, setModifier, setModifiers
Methods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithName
getNameAsString, setName
Methods inherited from interface com.github.javaparser.ast.nodeTypes.NodeWithRange
containsWithin, containsWithinRange, getBegin, getEnd, hasRange
Methods inherited from interface com.github.javaparser.ast.nodeTypes.modifiers.NodeWithStaticModifier
isStatic, setStatic
-
Constructor Details
-
ModuleRequiresDirective
public ModuleRequiresDirective() -
ModuleRequiresDirective
-
ModuleRequiresDirective
This constructor is used by the parser and is considered private.
-
-
Method Details
-
accept
Description copied from interface:Visitable
Accept method for visitor support.- Specified by:
accept
in interfaceVisitable
- Type Parameters:
R
- the type of the return value of the visitorA
- the type the user argument passed to the visitor- Parameters:
v
- the visitor implementationarg
- the argument passed to the visitor (of type A)- Returns:
- the result of the visit (of type R)
-
accept
Description copied from interface:Visitable
Accept method for visitor support. -
getModifiers
Description copied from interface:NodeWithModifiers
Return the modifiers of this variable declaration. Warning: modifying the returned set will not trigger observers, you have to use setModifiers for that.- Specified by:
getModifiers
in interfaceNodeWithModifiers<ModuleRequiresDirective>
- Returns:
- modifiers
- See Also:
Modifier
-
setModifiers
- Specified by:
setModifiers
in interfaceNodeWithModifiers<ModuleRequiresDirective>
-
getName
- Specified by:
getName
in interfaceNodeWithName<ModuleRequiresDirective>
-
setName
- Specified by:
setName
in interfaceNodeWithName<ModuleRequiresDirective>
-
isTransitive
public boolean isTransitive() -
setTransitive
-
remove
- Overrides:
remove
in classModuleDirective
-
clone
- Overrides:
clone
in classModuleDirective
-
replace
- Overrides:
replace
in classModuleDirective
-
isModuleRequiresStmt
public boolean isModuleRequiresStmt()- Overrides:
isModuleRequiresStmt
in classModuleDirective
-
asModuleRequiresStmt
- Overrides:
asModuleRequiresStmt
in classModuleDirective
-
ifModuleRequiresStmt
- Overrides:
ifModuleRequiresStmt
in classModuleDirective
-
toModuleRequiresStmt
- Overrides:
toModuleRequiresStmt
in classModuleDirective
-
isModuleRequiresDirective
public boolean isModuleRequiresDirective()- Overrides:
isModuleRequiresDirective
in classModuleDirective
-
asModuleRequiresDirective
- Overrides:
asModuleRequiresDirective
in classModuleDirective
-
toModuleRequiresDirective
- Overrides:
toModuleRequiresDirective
in classModuleDirective
-
ifModuleRequiresDirective
- Overrides:
ifModuleRequiresDirective
in classModuleDirective
-
getMetaModel
- Overrides:
getMetaModel
in classModuleDirective
- Returns:
- get JavaParser specific node introspection information.
-