From 2234d928d47d2b23ee4664271a516676cc1e6ff6 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Alexis=20Laferri=C3=A8re?= Date: Sun, 19 Jul 2015 13:25:22 -0400 Subject: [PATCH] contrib/jwrapper: revamp `gen_licence` to be more customizable MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Alexis Laferrière --- contrib/jwrapper/src/code_generator.nit | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/contrib/jwrapper/src/code_generator.nit b/contrib/jwrapper/src/code_generator.nit index 7a4e419..8141ee0 100644 --- a/contrib/jwrapper/src/code_generator.nit +++ b/contrib/jwrapper/src/code_generator.nit @@ -77,7 +77,7 @@ class CodeGenerator imports.add("import android::{import_}\n") end - file_out.write(gen_licence) + file_out.write license var module_name = module_name if module_name != null then file_out.write "module {module_name}\n" @@ -89,9 +89,8 @@ class CodeGenerator file_out.write(wrappers.join) end - fun gen_licence: String - do - return """ + # License for the header of the generated Nit module + var license = """ # This file is part of NIT (http://www.nitlanguage.org). # # Licensed under the Apache License, Version 2.0 (the "License"); @@ -107,8 +106,7 @@ class CodeGenerator # limitations under the License. # This code has been generated using `jwrapper` -""" - end +""" is writable fun gen_class_header(jtype: JavaType): String do -- 1.7.9.5