All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jetbrains.kotlin.js.backend.ast.JsProgramFragment Maven / Gradle / Ivy

There is a newer version: 2.0.0
Show newest version
// 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;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy