# HG changeset patch # User Jaroslav Tulach # Date 1398842788 -7200 # Node ID 5171ac3b4232fecda835dfcecb8a1420438cab4f # Parent 1200ad163e2ce268cd5696c20e307080fec491bc Compile own fake class signatures. Ensures the class files are complete and can link inside Javac. diff -r 1200ad163e2c -r 5171ac3b4232 pom.xml --- a/pom.xml Wed Apr 30 08:54:28 2014 +0200 +++ b/pom.xml Wed Apr 30 09:26:28 2014 +0200 @@ -85,7 +85,8 @@ * .*/** - rt/emul/*/src/main/** + rt/emul/mini/src/main/** + rt/emul/compact/src/main/** rt/vm/src/main/java/org/apidesign/vm4brwsr/ByteCodeParser.java rt/archetype/src/main/resources/archetype-resources/** rt/emul/compact/src/test/resources/** diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/pom.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/pom.xml Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,28 @@ + + + 4.0.0 + + org.apidesign.bck2brwsr + emul.pom + 0.9-SNAPSHOT + + fake + jar + Fake Stubs of Java APIs + + The minimal emulation classes have certain references + to less essential classes in the JDK. This module provides + their stubs for purpose of compilation. + + + + + maven-deploy-plugin + 2.7 + + true + + + + + diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/io/PrintStream.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/io/PrintStream.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,26 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.io; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public abstract class PrintStream { + public abstract void print(String s); + public abstract void println(String s); +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/io/PrintWriter.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/io/PrintWriter.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,26 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.io; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public abstract class PrintWriter { + public abstract PrintWriter append(String s); + public abstract void println(String s); +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/net/URI.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/net/URI.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,26 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.net; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public class URI { + public URI(String url) { + } +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/net/URISyntaxException.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/net/URISyntaxException.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,25 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.net; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public class URISyntaxException extends Exception { + +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/net/URLConnection.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/net/URLConnection.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,33 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.net; + +import java.io.IOException; +import java.io.InputStream; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public abstract class URLConnection { + protected URL url; + public URLConnection(URL u) { + } + public abstract void connect() throws IOException; + public abstract InputStream getInputStream() throws IOException; + +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/fake/src/main/java/java/util/Locale.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/rt/emul/fake/src/main/java/java/util/Locale.java Wed Apr 30 09:26:28 2014 +0200 @@ -0,0 +1,24 @@ +/** + * Back 2 Browser Bytecode Translator + * Copyright (C) 2012 Jaroslav Tulach + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, version 2 of the License. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. Look for COPYING file in the top folder. + * If not, see http://opensource.org/licenses/GPL-2.0. + */ +package java.util; + +/** Fake signature of an existing Java class. + * @author Jaroslav Tulach + */ +public abstract class Locale { +} diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/mini/pom.xml --- a/rt/emul/mini/pom.xml Wed Apr 30 08:54:28 2014 +0200 +++ b/rt/emul/mini/pom.xml Wed Apr 30 09:26:28 2014 +0200 @@ -22,58 +22,27 @@ jar + org.apidesign.bck2brwsr + fake + 0.9-SNAPSHOT + provided + jar + + org.testng testng - 6.5.2 test - maven-antrun-plugin - 1.7 - - - generate-sources - - - - - - - - - - - - - - - - - - - - - run - - - - - org.apache.maven.plugins maven-compiler-plugin 2.5.1 - - ${project.build.directory}/bootcp/ + netbeans.ignore.jdk.bootsclasspath 1.7 1.7 diff -r 1200ad163e2c -r 5171ac3b4232 rt/emul/pom.xml --- a/rt/emul/pom.xml Wed Apr 30 08:54:28 2014 +0200 +++ b/rt/emul/pom.xml Wed Apr 30 09:26:28 2014 +0200 @@ -15,5 +15,6 @@ mini compact brwsrtest + fake