public static ModuleNameListTreeImpl emptyList() { return new ModuleNameListTreeImpl(Collections.emptyList(), Collections.emptyList()); }
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); }
public ModuleDirectiveTree newExportsModuleDirective(InternalSyntaxToken exportsKeyword, 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 ExportsDirectiveTreeImpl(exportsKeyword, packageName, toKeyword, otherModuleNames, semicolonToken); }
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); }
public static ModuleNameListTreeImpl emptyList() { return new ModuleNameListTreeImpl(Collections.emptyList(), Collections.emptyList()); }
public ModuleDirectiveTree newExportsModuleDirective(InternalSyntaxToken exportsKeyword, 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 ExportsDirectiveTreeImpl(exportsKeyword, packageName, toKeyword, otherModuleNames, semicolonToken); }
public ModuleNameListTreeImpl newModuleNameListTreeImpl(ModuleNameTree firstModuleName, Optional<List<Tuple<InternalSyntaxToken, ModuleNameTree>>> rest) { List<ModuleNameTree> moduleNames = new ArrayList<>(); List<SyntaxToken> separators = new ArrayList<>(); moduleNames.add(firstModuleName); if (rest.isPresent()) { for(Tuple<InternalSyntaxToken, ModuleNameTree> tuple : rest.get()) { separators.add(tuple.first()); moduleNames.add(tuple.second()); } } return new ModuleNameListTreeImpl(Collections.unmodifiableList(moduleNames), Collections.unmodifiableList(separators)); }
public ModuleNameListTreeImpl newModuleNameListTreeImpl(ModuleNameTree firstModuleName, Optional<List<Tuple<InternalSyntaxToken, ModuleNameTree>>> rest) { List<ModuleNameTree> moduleNames = new ArrayList<>(); List<SyntaxToken> separators = new ArrayList<>(); moduleNames.add(firstModuleName); if (rest.isPresent()) { for(Tuple<InternalSyntaxToken, ModuleNameTree> tuple : rest.get()) { separators.add(tuple.first()); moduleNames.add(tuple.second()); } } return new ModuleNameListTreeImpl(Collections.unmodifiableList(moduleNames), Collections.unmodifiableList(separators)); }