toString() for FunctionN classes
It's implemented as if the types were reified: getting the real type parameters of the corresponding FunctionN class
This commit is contained in:
@@ -123,10 +123,17 @@ public class GenerateFunctions {
|
||||
out.print(" implements " + kind.getClassName(i));
|
||||
generateTypeParameters(out, i, kind);
|
||||
out.println(" {");
|
||||
// TODO: toString()
|
||||
generateToStringForFunctionImpl(out);
|
||||
out.println("}");
|
||||
}
|
||||
|
||||
private static void generateToStringForFunctionImpl(PrintStream out) {
|
||||
out.println(" @Override");
|
||||
out.println(" public String toString() {");
|
||||
out.println(" return getClass().getGenericSuperclass().toString();");
|
||||
out.println(" }");
|
||||
}
|
||||
|
||||
private static void generateRuntimeClassHeader(PrintStream out) {
|
||||
try {
|
||||
out.println(FileUtil.loadFile(new File("injector-generator/copyright.txt")));
|
||||
|
||||
Reference in New Issue
Block a user