use of org.sonar.java.model.declaration.OpensDirectiveTreeImpl in project sonar-java by SonarSource.
the class TreeFactory method newOpensModuleDirective.
public ModuleDirectiveTree newOpensModuleDirective(InternalSyntaxToken opensKeyword, ExpressionTree packageName, Optional<Tuple<InternalSyntaxToken, ListTreeImpl<ModuleNameTree>>> moduleNames, InternalSyntaxToken semicolonToken) {
InternalSyntaxToken toKeyword = null;
ListTreeImpl<ModuleNameTree> otherModuleNames = ModuleNameListTreeImpl.emptyList();
if (moduleNames.isPresent()) {
Tuple<InternalSyntaxToken, ListTreeImpl<ModuleNameTree>> toModuleNames = moduleNames.get();
toKeyword = toModuleNames.first();
otherModuleNames = toModuleNames.second();
}
return new OpensDirectiveTreeImpl(opensKeyword, packageName, toKeyword, otherModuleNames, semicolonToken);
}
Aggregations