Source exportedSource = exportDirective.getSource();
if (exportedSource != null && analysisContext.exists(exportedSource)) {
// The exported source will be null if the URI in the export directive was invalid.
ResolvableLibrary exportedLibrary = libraryMap.get(exportedSource);
if (exportedLibrary != null) {
ExportElementImpl exportElement = new ExportElementImpl();
StringLiteral uriLiteral = exportDirective.getUri();
if (uriLiteral != null) {
exportElement.setUriOffset(uriLiteral.getOffset());
exportElement.setUriEnd(uriLiteral.getEnd());
}
exportElement.setUri(exportDirective.getUriContent());
exportElement.setCombinators(buildCombinators(exportDirective));
LibraryElement exportedLibraryElement = exportedLibrary.getLibraryElement();
if (exportedLibraryElement != null) {
exportElement.setExportedLibrary(exportedLibraryElement);
}
directive.setElement(exportElement);
exports.add(exportElement);
if (analysisContext.computeKindOf(exportedSource) != SourceKind.LIBRARY) {