Renamed generator.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions
|
// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions
|
||||||
|
|
||||||
package jet
|
package jet
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
// Generated by org.jetbrains.jet.generators.runtime.GenerateTuplesAndFunctions
|
// Generated by org.jetbrains.jet.generators.runtime.GenerateFunctions
|
||||||
|
|
||||||
package jet
|
package jet
|
||||||
|
|
||||||
|
|||||||
+7
-7
@@ -20,12 +20,12 @@ import java.io.File;
|
|||||||
import java.io.FileNotFoundException;
|
import java.io.FileNotFoundException;
|
||||||
import java.io.PrintStream;
|
import java.io.PrintStream;
|
||||||
|
|
||||||
public class GenerateTuplesAndFunctions {
|
public class GenerateFunctions {
|
||||||
private static final int TUPLE_COUNT = 23;
|
private static final int MAX_PARAM_COUNT = 22;
|
||||||
|
|
||||||
private static void generateFunctions(PrintStream out, int count, boolean extension) {
|
private static void generateFunctions(PrintStream out, int count, boolean extension) {
|
||||||
generated(out);
|
generated(out);
|
||||||
for (int i = 0; i < count; i++) {
|
for (int i = 0; i <= count; i++) {
|
||||||
out.print("public abstract class " + (extension ? "ExtensionFunction" : "Function") + i);
|
out.print("public abstract class " + (extension ? "ExtensionFunction" : "Function") + i);
|
||||||
out.print("<");
|
out.print("<");
|
||||||
if (extension) {
|
if (extension) {
|
||||||
@@ -53,7 +53,7 @@ public class GenerateTuplesAndFunctions {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void generated(PrintStream out) {
|
private static void generated(PrintStream out) {
|
||||||
out.println("// Generated by " + GenerateTuplesAndFunctions.class.getName());
|
out.println("// Generated by " + GenerateFunctions.class.getName());
|
||||||
out.println();
|
out.println();
|
||||||
out.println("package jet");
|
out.println("package jet");
|
||||||
out.println();
|
out.println();
|
||||||
@@ -64,14 +64,14 @@ public class GenerateTuplesAndFunctions {
|
|||||||
assert baseDir.exists() : "Base dir does not exist: " + baseDir.getAbsolutePath();
|
assert baseDir.exists() : "Base dir does not exist: " + baseDir.getAbsolutePath();
|
||||||
|
|
||||||
PrintStream functions = new PrintStream(new File(baseDir, "Functions.jet"));
|
PrintStream functions = new PrintStream(new File(baseDir, "Functions.jet"));
|
||||||
generateFunctions(functions, TUPLE_COUNT, false);
|
generateFunctions(functions, MAX_PARAM_COUNT, false);
|
||||||
functions.close();
|
functions.close();
|
||||||
|
|
||||||
PrintStream extensionFunctions = new PrintStream(new File(baseDir, "ExtensionFunctions.jet"));
|
PrintStream extensionFunctions = new PrintStream(new File(baseDir, "ExtensionFunctions.jet"));
|
||||||
generateFunctions(extensionFunctions, TUPLE_COUNT, true);
|
generateFunctions(extensionFunctions, MAX_PARAM_COUNT, true);
|
||||||
extensionFunctions.close();
|
extensionFunctions.close();
|
||||||
}
|
}
|
||||||
|
|
||||||
private GenerateTuplesAndFunctions() {
|
private GenerateFunctions() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user