Removed @author javadocs from code.
This commit is contained in:
@@ -38,9 +38,6 @@ import java.util.Map;
|
||||
import static org.jetbrains.k2js.test.rhino.RhinoUtils.runRhinoTest;
|
||||
import static org.jetbrains.k2js.test.utils.JsTestUtils.convertFileNameToDotJsFile;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class BasicTest extends KotlinTestWithEnvironment {
|
||||
// predictable order of ecma version in tests
|
||||
protected static final Iterable<EcmaVersion> DEFAULT_ECMA_VERSIONS = Lists.newArrayList(EcmaVersion.v5, EcmaVersion.v3);
|
||||
|
||||
@@ -25,9 +25,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.k2js.test.utils.JsTestUtils.getAllFilesInDir;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class MultipleFilesTranslationTest extends BasicTest {
|
||||
|
||||
public MultipleFilesTranslationTest(@NotNull String main) {
|
||||
|
||||
@@ -25,9 +25,6 @@ import org.jetbrains.k2js.test.rhino.RhinoSystemOutputChecker;
|
||||
|
||||
import static org.jetbrains.k2js.test.utils.JsTestUtils.readFile;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
@SuppressWarnings("JUnitTestCaseWithNonTrivialConstructors")
|
||||
public abstract class SingleFileTranslationTest extends BasicTest {
|
||||
public SingleFileTranslationTest(@NotNull String main) {
|
||||
|
||||
@@ -29,9 +29,6 @@ import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class JsUnitTestReporter {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -25,9 +25,6 @@ import org.jetbrains.k2js.config.EcmaVersion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class TestConfig extends Config {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -24,9 +24,6 @@ import org.jetbrains.k2js.config.EcmaVersion;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public interface TestConfigFactory {
|
||||
TestConfig create(@NotNull Project project, @NotNull EcmaVersion version,
|
||||
@NotNull List<JetFile> files, @NotNull BindingContext context);
|
||||
|
||||
@@ -26,9 +26,6 @@ import org.jetbrains.k2js.translate.test.JSTester;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class TestConfigWithUnitTests extends TestConfig {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -25,9 +25,6 @@ import org.mozilla.javascript.Scriptable;
|
||||
import static org.jetbrains.k2js.test.rhino.RhinoUtils.flushSystemOut;
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class RhinoFunctionResultChecker implements RhinoResultChecker {
|
||||
|
||||
private final String moduleId;
|
||||
|
||||
@@ -19,9 +19,6 @@ package org.jetbrains.k2js.test.rhino;
|
||||
import org.mozilla.javascript.Context;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public interface RhinoResultChecker {
|
||||
void runChecks(Context context, Scriptable scope) throws Exception;
|
||||
}
|
||||
|
||||
@@ -23,9 +23,6 @@ import org.mozilla.javascript.Scriptable;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class RhinoSystemOutputChecker implements RhinoResultChecker {
|
||||
|
||||
private final String expectedResult;
|
||||
|
||||
@@ -35,9 +35,6 @@ import java.util.Set;
|
||||
import static org.jetbrains.jet.utils.ExceptionUtils.rethrow;
|
||||
import static org.jetbrains.k2js.test.BasicTest.pathToTestFilesRoot;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class RhinoUtils {
|
||||
private static final String KOTLIN_JS_LIB_ECMA_3 = pathToTestFilesRoot() + "kotlin_lib_ecma3.js";
|
||||
private static final String KOTLIN_JS_LIB_ECMA_5 = pathToTestFilesRoot() + "kotlin_lib_ecma5.js";
|
||||
|
||||
@@ -19,9 +19,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class AbstractExpressionTest extends SingleFileTranslationTest {
|
||||
|
||||
public AbstractExpressionTest(@NotNull String main) {
|
||||
|
||||
@@ -22,9 +22,6 @@ import org.jetbrains.k2js.test.BasicTest;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
import org.jetbrains.k2js.translate.context.Namer;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class AdditionalTest extends SingleFileTranslationTest {
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.mozilla.javascript.JavaScriptException;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ArrayListTest extends JavaClassesTest {
|
||||
|
||||
public ArrayListTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ClassInheritanceTest extends SingleFileTranslationTest {
|
||||
|
||||
public ClassInheritanceTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ClosureTest extends SingleFileTranslationTest {
|
||||
|
||||
public ClosureTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class DangerousTest extends SingleFileTranslationTest {
|
||||
|
||||
public DangerousTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ExtensionFunctionTest extends SingleFileTranslationTest {
|
||||
|
||||
public ExtensionFunctionTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ExtensionPropertyTest extends SingleFileTranslationTest {
|
||||
|
||||
public ExtensionPropertyTest() {
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ForeachTest extends AbstractExpressionTest {
|
||||
|
||||
public ForeachTest() {
|
||||
|
||||
@@ -16,9 +16,6 @@
|
||||
|
||||
package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class FunctionTest extends AbstractExpressionTest {
|
||||
|
||||
public FunctionTest() {
|
||||
|
||||
@@ -23,9 +23,6 @@ import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
|
||||
//TODO:
|
||||
//Inlining turned off
|
||||
|
||||
@@ -19,9 +19,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class JavaClassesTest extends SingleFileTranslationTest {
|
||||
|
||||
public JavaClassesTest(@NotNull String main) {
|
||||
|
||||
@@ -34,9 +34,6 @@ import java.util.Map;
|
||||
|
||||
import static org.jetbrains.k2js.test.utils.LibraryFilePathsUtil.getAdditionalLibraryFiles;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class JsUnitTestBase extends MultipleFilesTranslationTest {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -23,9 +23,6 @@ import org.jetbrains.k2js.test.rhino.RhinoFunctionResultChecker;
|
||||
|
||||
import static org.jetbrains.k2js.test.rhino.RhinoUtils.runRhinoTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class KotlinLibTest extends SingleFileTranslationTest {
|
||||
|
||||
public KotlinLibTest() {
|
||||
|
||||
@@ -20,9 +20,7 @@ import org.jetbrains.k2js.translate.context.Namer;
|
||||
import org.mozilla.javascript.JavaScriptException;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* A messy class where all new tests go before they are sorted which never happens.
|
||||
* A messy class where all new tests go before they are sorted which never happens.
|
||||
*/
|
||||
public final class MiscTest extends AbstractExpressionTest {
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.MultipleFilesTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class MultiFileTest extends MultipleFilesTranslationTest {
|
||||
|
||||
public MultiFileTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.MultipleFilesTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class MultiNamespaceTest extends MultipleFilesTranslationTest {
|
||||
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class NameClashesTest extends SingleFileTranslationTest {
|
||||
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class NamespaceTest extends SingleFileTranslationTest {
|
||||
public NamespaceTest() {
|
||||
super("namespace/");
|
||||
|
||||
@@ -23,9 +23,6 @@ import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class NativeInteropTest extends SingleFileTranslationTest {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -20,9 +20,6 @@ import junit.framework.Assert;
|
||||
import org.jetbrains.k2js.facade.exceptions.TranslationInternalException;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class NumberTest extends SingleFileTranslationTest {
|
||||
public NumberTest() {
|
||||
super("number/");
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ObjectTest extends SingleFileTranslationTest {
|
||||
|
||||
public ObjectTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class OperatorOverloadingTest extends SingleFileTranslationTest {
|
||||
|
||||
public OperatorOverloadingTest() {
|
||||
|
||||
@@ -19,9 +19,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
import org.mozilla.javascript.JavaScriptException;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class PatternMatchingTest extends SingleFileTranslationTest {
|
||||
|
||||
public PatternMatchingTest() {
|
||||
|
||||
@@ -24,9 +24,6 @@ import org.jetbrains.k2js.test.utils.JsTestUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class PropertyAccessTest extends SingleFileTranslationTest {
|
||||
|
||||
public PropertyAccessTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class RTTITest extends SingleFileTranslationTest {
|
||||
|
||||
public RTTITest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class RangeTest extends SingleFileTranslationTest {
|
||||
|
||||
public RangeTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class SafeCallTest extends SingleFileTranslationTest {
|
||||
|
||||
public SafeCallTest() {
|
||||
|
||||
@@ -21,9 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.k2js.test.BasicTest;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class SimpleTest extends SingleFileTranslationTest {
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class StandardClassesTest extends SingleFileTranslationTest {
|
||||
|
||||
public StandardClassesTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//NOTE: well, it has tests
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibGetOtElseTest extends JsUnitTestBase {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//NOTE: well, it has tests
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibIteratorsTest extends JsUnitTestBase {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//NOTE: well, it has tests
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibListTest extends JsUnitTestBase {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//NOTE: well, it has tests
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibMapTest extends JsUnitTestBase {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import junit.framework.Test;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
@SuppressWarnings("JUnitTestCaseWithNoTests")
|
||||
public final class StdLibSetTest extends JsUnitTestBase {
|
||||
public static Test suite() throws Exception {
|
||||
|
||||
@@ -31,9 +31,6 @@ import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class StdLibTest extends SingleFileTranslationTest {
|
||||
|
||||
public StdLibTest() {
|
||||
|
||||
@@ -23,9 +23,6 @@ import java.io.IOException;
|
||||
|
||||
import static com.intellij.openapi.util.io.FileUtil.loadTextAndClose;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class StringTest extends AbstractExpressionTest {
|
||||
|
||||
public StringTest() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class TraitTest extends SingleFileTranslationTest {
|
||||
|
||||
public TraitTest() {
|
||||
|
||||
@@ -27,9 +27,6 @@ import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class TranslatorTestCaseBuilder {
|
||||
public static FilenameFilter emptyFilter = new FilenameFilter() {
|
||||
@Override
|
||||
|
||||
@@ -21,9 +21,6 @@ import org.jetbrains.k2js.config.EcmaVersion;
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
import org.mozilla.javascript.EcmaError;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
/*
|
||||
* We can't really check that this examples work in non-browser environment, so we just check that examples compile and
|
||||
* running them produce expected error.
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class WebDemoExamples1Test extends SingleFileTranslationTest {
|
||||
|
||||
public WebDemoExamples1Test() {
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.test.semantics;
|
||||
|
||||
import org.jetbrains.k2js.test.SingleFileTranslationTest;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class WebDemoExamples2Test extends SingleFileTranslationTest {
|
||||
|
||||
public WebDemoExamples2Test() {
|
||||
|
||||
@@ -27,9 +27,6 @@ import java.util.ArrayList;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class JsTestUtils {
|
||||
|
||||
private JsTestUtils() {
|
||||
|
||||
@@ -24,9 +24,6 @@ import org.jetbrains.k2js.config.Config;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class LibraryFilePathsUtil {
|
||||
private LibraryFilePathsUtil() {
|
||||
}
|
||||
|
||||
@@ -42,9 +42,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.k2js.utils.JetFileUtils.createPsiFileList;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//TODO: use method object
|
||||
public final class TranslationUtils {
|
||||
|
||||
|
||||
@@ -39,9 +39,6 @@ import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class AnalyzerFacadeForJS {
|
||||
|
||||
private AnalyzerFacadeForJS() {
|
||||
|
||||
@@ -40,9 +40,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.isRootNamespace;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class JsConfiguration implements ModuleConfiguration {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -31,9 +31,7 @@ import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Base class representing a configuration of translator.
|
||||
* Base class representing a configuration of translator.
|
||||
*/
|
||||
public abstract class Config {
|
||||
//NOTE: a hacky solution to be able to rerun code samples with lib loaded only once: used by tests and web demo
|
||||
|
||||
@@ -20,9 +20,6 @@ import com.intellij.openapi.util.text.StringUtil;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public enum EcmaVersion {
|
||||
v3, v5;
|
||||
|
||||
|
||||
@@ -35,9 +35,6 @@ import java.util.List;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipFile;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class LibrarySourcesConfig extends Config {
|
||||
@NotNull
|
||||
public static final Key<String> EXTERNAL_MODULE_NAME = new Key<String>("externalModule");
|
||||
|
||||
@@ -22,9 +22,6 @@ import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.StringTokenizer;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class FacadeUtils {
|
||||
private FacadeUtils() {
|
||||
}
|
||||
|
||||
@@ -38,9 +38,7 @@ import static org.jetbrains.k2js.facade.FacadeUtils.parseString;
|
||||
import static org.jetbrains.k2js.generate.CodeGenerator.generateProgramToString;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* An entry point of translator.
|
||||
* An entry point of translator.
|
||||
*/
|
||||
public final class K2JSTranslator {
|
||||
|
||||
|
||||
@@ -21,9 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class MainCallParameters {
|
||||
@NotNull
|
||||
public static MainCallParameters noCall() {
|
||||
|
||||
-3
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.facade.exceptions;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class MainFunctionNotFoundException extends TranslationException {
|
||||
public MainFunctionNotFoundException(@NotNull String message) {
|
||||
super(message);
|
||||
|
||||
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.facade.exceptions;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class TranslationException extends Exception {
|
||||
|
||||
public TranslationException(@NotNull String message) {
|
||||
|
||||
-3
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.facade.exceptions;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class TranslationInternalException extends TranslationException {
|
||||
|
||||
public TranslationInternalException(@NotNull Throwable cause) {
|
||||
|
||||
-3
@@ -18,9 +18,6 @@ package org.jetbrains.k2js.facade.exceptions;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class UnsupportedFeatureException extends TranslationException {
|
||||
|
||||
public UnsupportedFeatureException(@NotNull String message, @NotNull Exception cause) {
|
||||
|
||||
@@ -21,9 +21,6 @@ import com.google.dart.compiler.backend.js.ast.JsProgram;
|
||||
import com.google.dart.compiler.util.TextOutputImpl;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* @author Pavel.Talanov
|
||||
*/
|
||||
public final class CodeGenerator {
|
||||
private CodeGenerator() {
|
||||
}
|
||||
|
||||
@@ -37,9 +37,6 @@ import java.util.Map;
|
||||
import static org.jetbrains.k2js.translate.utils.JsDescriptorUtils.getDeclarationDescriptorForReceiver;
|
||||
import static org.jetbrains.k2js.translate.utils.JsDescriptorUtils.getExpectedReceiverDescriptor;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class AliasingContext {
|
||||
private static final ThisAliasProvider EMPTY_THIS_ALIAS_PROVIDER = new ThisAliasProvider() {
|
||||
@Nullable
|
||||
|
||||
@@ -24,9 +24,7 @@ import org.jetbrains.jet.lang.descriptors.NamespaceDescriptor;
|
||||
import org.jetbrains.jet.lang.resolve.DescriptorUtils;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Encapuslates different types of constants and naming conventions.
|
||||
* Encapuslates different types of constants and naming conventions.
|
||||
*/
|
||||
public final class Namer {
|
||||
public static final String CALLEE_NAME = "$fun";
|
||||
|
||||
@@ -30,10 +30,8 @@ import java.util.Map;
|
||||
import static org.jetbrains.jet.lang.resolve.DescriptorUtils.getFQName;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Provides a mechanism to bind some of the kotlin/java declations with library implementations.
|
||||
* Makes sense only for those declaration that cannot be annotated. (Use library annotation in this case)
|
||||
* Provides a mechanism to bind some of the kotlin/java declations with library implementations.
|
||||
* Makes sense only for those declaration that cannot be annotated. (Use library annotation in this case)
|
||||
*/
|
||||
public final class StandardClasses {
|
||||
|
||||
|
||||
@@ -44,9 +44,7 @@ import static org.jetbrains.k2js.translate.utils.BindingUtils.isObjectDeclaratio
|
||||
import static org.jetbrains.k2js.translate.utils.JsDescriptorUtils.*;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Aggregates all the static parts of the context.
|
||||
* Aggregates all the static parts of the context.
|
||||
*/
|
||||
public final class StaticContext {
|
||||
|
||||
|
||||
@@ -23,9 +23,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.k2js.translate.utils.JsAstUtils;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class TemporaryVariable {
|
||||
@Nullable
|
||||
private final JsExpression assignmentExpression;
|
||||
|
||||
@@ -33,9 +33,7 @@ import java.util.Map;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getDescriptorForElement;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* All the info about the state of the translation process.
|
||||
* All the info about the state of the translation process.
|
||||
*/
|
||||
public class TranslationContext {
|
||||
@NotNull
|
||||
|
||||
@@ -25,9 +25,6 @@ import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class Generator<V> {
|
||||
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
import org.jetbrains.jet.lang.descriptors.DeclarationDescriptor;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public interface Rule<V> {
|
||||
|
||||
@Nullable
|
||||
|
||||
+1
-3
@@ -44,9 +44,7 @@ import static org.jetbrains.k2js.translate.utils.BindingUtils.getClassDescriptor
|
||||
import static org.jetbrains.k2js.translate.utils.ErrorReportingUtils.message;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Generates a big block where are all the classes(objects representing them) are created.
|
||||
* Generates a big block where are all the classes(objects representing them) are created.
|
||||
*/
|
||||
public final class ClassDeclarationTranslator extends AbstractTranslator {
|
||||
private final LabelGenerator localLabelGenerator = new LabelGenerator('c');
|
||||
|
||||
@@ -47,9 +47,7 @@ import static org.jetbrains.k2js.translate.utils.PsiUtils.getPrimaryConstructorP
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.getQualifiedReference;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Generates a definition of a single class.
|
||||
* Generates a definition of a single class.
|
||||
*/
|
||||
public final class ClassTranslator extends AbstractTranslator {
|
||||
@NotNull
|
||||
|
||||
-3
@@ -35,9 +35,6 @@ import java.util.List;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getFunctionDescriptor;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getPropertyDescriptorForObjectDeclaration;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public class DeclarationBodyVisitor extends TranslatorVisitor<Void> {
|
||||
protected final List<JsPropertyInitializer> result = new SmartList<JsPropertyInitializer>();
|
||||
|
||||
|
||||
-3
@@ -31,9 +31,6 @@ import java.util.*;
|
||||
|
||||
import static com.google.dart.compiler.backend.js.ast.JsVars.JsVar;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class NamespaceDeclarationTranslator extends AbstractTranslator {
|
||||
private final Iterable<JetFile> files;
|
||||
private final Map<NamespaceDescriptor,NamespaceTranslator> descriptorToTranslator =
|
||||
|
||||
@@ -41,9 +41,6 @@ import static org.jetbrains.k2js.translate.utils.AnnotationsUtils.isPredefinedOb
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getDescriptorForElement;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getPropertyDescriptor;
|
||||
|
||||
/**
|
||||
* @author Pavel.Talanov
|
||||
*/
|
||||
final class NamespaceTranslator extends AbstractTranslator {
|
||||
@NotNull
|
||||
private final NamespaceDescriptor descriptor;
|
||||
|
||||
+1
-3
@@ -39,9 +39,7 @@ import static org.jetbrains.k2js.translate.utils.TranslationUtils.assignmentToBa
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.backingFieldReference;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* Translates single property /w accessors.
|
||||
* Translates single property /w accessors.
|
||||
*/
|
||||
public final class PropertyTranslator extends AbstractTranslator {
|
||||
@NotNull
|
||||
|
||||
@@ -46,9 +46,6 @@ import static org.jetbrains.k2js.translate.utils.PsiUtils.getObjectDeclarationNa
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.translateInitializerForProperty;
|
||||
import static org.jetbrains.k2js.translate.utils.mutator.LastExpressionMutator.mutateLastExpression;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ExpressionVisitor extends TranslatorVisitor<JsNode> {
|
||||
@Override
|
||||
@NotNull
|
||||
|
||||
@@ -45,9 +45,6 @@ import static org.jetbrains.k2js.translate.utils.FunctionBodyTranslator.translat
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.setParameters;
|
||||
import static org.jetbrains.k2js.translate.utils.JsDescriptorUtils.getExpectedReceiverDescriptor;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class FunctionTranslator extends AbstractTranslator {
|
||||
@NotNull
|
||||
public static FunctionTranslator newInstance(@NotNull JetDeclarationWithBody function,
|
||||
|
||||
@@ -32,9 +32,6 @@ import org.jetbrains.k2js.translate.utils.TranslationUtils;
|
||||
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.*;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class PatternTranslator extends AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
-3
@@ -32,9 +32,6 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.sum;
|
||||
import static org.jetbrains.k2js.translate.utils.JsDescriptorUtils.getNameIfStandardType;
|
||||
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class StringTemplateTranslator extends AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -32,9 +32,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.convertToBlock;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
//TODO: not tested at all
|
||||
//TODO: not implemented catch logic
|
||||
public final class TryTranslator extends AbstractTranslator {
|
||||
|
||||
@@ -33,9 +33,6 @@ import java.util.List;
|
||||
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.*;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class WhenTranslator extends AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
-3
@@ -36,9 +36,6 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.*;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getLoopRange;
|
||||
import static org.jetbrains.k2js.translate.utils.TemporariesUtils.temporariesInitialization;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ArrayForTranslator extends ForTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
-3
@@ -30,9 +30,6 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.newVar;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getLoopBody;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getLoopParameter;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class ForTranslator extends AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
-3
@@ -31,9 +31,6 @@ import org.jetbrains.k2js.translate.reference.CallBuilder;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.*;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getLoopRange;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class IteratorForTranslator extends ForTranslator {
|
||||
@NotNull
|
||||
private final Pair<JsVars.JsVar, JsNameRef> iterator;
|
||||
|
||||
-3
@@ -34,9 +34,6 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.*;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getLoopRange;
|
||||
import static org.jetbrains.k2js.translate.utils.TemporariesUtils.temporariesInitialization;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class RangeForTranslator extends ForTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
-3
@@ -34,9 +34,6 @@ import static org.jetbrains.k2js.translate.utils.TemporariesUtils.temporariesIni
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.translateLeftExpression;
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.translateRightExpression;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
|
||||
// TODO: implement reverse semantics
|
||||
public final class RangeLiteralForTranslator extends ForTranslator {
|
||||
|
||||
@@ -21,9 +21,6 @@ import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.jet.lang.resolve.BindingContext;
|
||||
import org.jetbrains.k2js.translate.context.TranslationContext;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public abstract class AbstractTranslator {
|
||||
|
||||
@NotNull
|
||||
|
||||
@@ -56,10 +56,8 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.*;
|
||||
import static org.jetbrains.k2js.translate.utils.dangerous.DangerousData.collect;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* This class provides a interface which all translators use to interact with each other.
|
||||
* Goal is to simplify interaction between translators.
|
||||
* This class provides a interface which all translators use to interact with each other.
|
||||
* Goal is to simplify interaction between translators.
|
||||
*/
|
||||
public final class Translation {
|
||||
|
||||
|
||||
@@ -22,9 +22,7 @@ import org.jetbrains.jet.lang.psi.JetVisitor;
|
||||
import org.jetbrains.k2js.translate.context.TranslationContext;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
* <p/>
|
||||
* This class is a base class for all visitors.
|
||||
* This class is a base class for all visitors.
|
||||
*/
|
||||
public class TranslatorVisitor<T> extends JetVisitor<T, TranslationContext> {
|
||||
|
||||
|
||||
-3
@@ -39,9 +39,6 @@ import static org.jetbrains.k2js.translate.utils.JsAstUtils.setParameters;
|
||||
import static org.jetbrains.k2js.translate.utils.PsiUtils.getPrimaryConstructorParameters;
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.translateArgumentList;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class ClassInitializerTranslator extends AbstractTranslator {
|
||||
@NotNull
|
||||
private final JetClassOrObject classDeclaration;
|
||||
|
||||
@@ -33,9 +33,6 @@ import static org.jetbrains.k2js.translate.utils.BindingUtils.getClassDescriptor
|
||||
import static org.jetbrains.k2js.translate.utils.JsAstUtils.assignment;
|
||||
import static org.jetbrains.k2js.translate.utils.TranslationUtils.assignmentToBackingField;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class InitializerUtils {
|
||||
private InitializerUtils() {
|
||||
}
|
||||
|
||||
@@ -29,9 +29,6 @@ import static org.jetbrains.k2js.translate.general.Translation.translateAsStatem
|
||||
import static org.jetbrains.k2js.translate.initializer.InitializerUtils.generateInitializerForProperty;
|
||||
import static org.jetbrains.k2js.translate.utils.BindingUtils.getPropertyDescriptor;
|
||||
|
||||
/**
|
||||
* @author Pavel Talanov
|
||||
*/
|
||||
public final class InitializerVisitor extends TranslatorVisitor<Void> {
|
||||
private final List<JsStatement> result;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user