org.jetbrains.kotlin.js.backend.ast.JsProgramFragment Maven / Gradle / Ivy
// Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
package org.jetbrains.kotlin.js.backend.ast;
import org.jetbrains.annotations.NotNull;
import java.util.*;
public class JsProgramFragment {
private final JsScope scope;
private final List importedModules = new ArrayList<>();
private final Map imports = new LinkedHashMap<>();
private final JsGlobalBlock declarationBlock = new JsGlobalBlock();
private final JsGlobalBlock exportBlock = new JsGlobalBlock();
private final JsGlobalBlock initializerBlock = new JsGlobalBlock();
private final List nameBindings = new ArrayList<>();
private final Map classes = new LinkedHashMap<>();
private final Map inlineModuleMap = new LinkedHashMap<>();
public JsProgramFragment(@NotNull JsScope scope) {
this.scope = scope;
}
@NotNull
public JsScope getScope() {
return scope;
}
@NotNull
public List getImportedModules() {
return importedModules;
}
@NotNull
public Map getImports() {
return imports;
}
@NotNull
public JsGlobalBlock getDeclarationBlock() {
return declarationBlock;
}
@NotNull
public JsGlobalBlock getExportBlock() {
return exportBlock;
}
@NotNull
public JsGlobalBlock getInitializerBlock() {
return initializerBlock;
}
@NotNull
public List getNameBindings() {
return nameBindings;
}
@NotNull
public Map getClasses() {
return classes;
}
@NotNull
public Map getInlineModuleMap() {
return inlineModuleMap;
}
}