abstract_compiler: generalize `native_array_instance`

offers the service `native_array_instance` in all compilation engines

Signed-off-by: Jean Privat <jean@pryen.org>
erasure_compiler: remove redefinition of `array_instance`

the inherited implementation from the separate compiler is
enough now that `native_array_instance` is correctly implemented.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: accept intern methods at top-level

This modification does not need a special handling in the model or engines.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: introduce intern `new` constructors (factories)

They are correctly modeled and typed but engines does not how to deal with them.

Signed-off-by: Jean Privat <jean@pryen.org>
parser: regenerate file for improved intern methods

Signed-off-by: Jean Privat <jean@pryen.org>
compiler: special handling of `new NativeArray`

Signed-off-by: Jean Privat <jean@pryen.org>
compiler: accept intern `new` constructors (factories)

Signed-off-by: Jean Privat <jean@pryen.org>
java FFI: display a clean error when java module is not imported

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
compiler: Accepts `new` constructor on non pointer-based class (eg. NativeString)

Just use with a placebo receiver like in other cases.

Signed-off-by: Jean Privat <jean@pryen.org>
compiler: implement intern `init` on NativeString

Signed-off-by: Jean Privat <jean@pryen.org>
niti: implements intern `init` for NativeString and NativeArray

Signed-off-by: Jean Privat <jean@pryen.org>
tests: add test_new_native.nit

Signed-off-by: Jean Privat <jean@pryen.org>
lib/android: Intro API wrapping android SharedPreferences

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
lib/android: Added tests to mnit_simple

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
java-ffi: Ignore '\n' in extern types

Signed-off-by: Frédéric Vachon <fredvac@gmail.com>
Java FFI: enable inserting additionnal Java files to a project

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Java FFI: javac is always called on local files

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
tests: add a test for the extra_java_files phase

Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
Merge: Include extra Java files in a project

Will be used to declare implement new Activities and sub classes like Listeners.

Pull-Request: #496
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Frédéric Vachon <fredvac@gmail.com>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Merge: SharedPreferences: Nit API wrapping android SharedPreferences class

A module wrapping 'android.content.SharedPreferences' allowing to load/save data to internal storage for the android platform. Some tests have been added to the mnit_simple example.

The compiler has been slightly modified to ignore '
' in java extern types.

As asked by @privat and @xymus to store persistant game data.
Signed-off-by: Frédéric Vachon <fredvac@gmail.com>

Pull-Request: #495
Reviewed-by: Jean Privat <jean@pryen.org>
Reviewed-by: Alexis Laferrière <alexis.laf@xymus.net>
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Romain Chanoir <chanoir.romain@courrier.uqam.ca>