1 # JWRAPPER : Extern classes generator from java .class
3 jwrapper is a code generator that creates Nit extern classes `in "Java"` from .class files.
6 jwrapper is designed to be installed from the `contrib` directory of Nit repository. (http://www.nitlanguage.org)
8 To initiate installation process, use `make` in the `contrib/jwrapper` directory.
10 jwrapper relies on `nitcc` that will be automatically compiled from `contrib/nitcc`.
13 The jwrapper binary can be found under `jwrapper/bin` directory.
15 Since jwrapper uses `grep` to find existing libraries, make sure that the environment variable `NIT_DIR` is properly set to your Nit root directory.
17 Since jwrapper uses `javap` to extract data from .class files, the JDK7 or higher has to be installed and must be in your `$PATH`. (Older versions of `javap` do not show generic signatures)
21 jwrapper [OPTIONS] JAVA_CLASS_FILE NIT_OUTPUT_FILE
25 `-a, --with-attributes`
27 * It enables extern class attributes generation. For each public attribute, there'll be a Nit attribute of the corresponding type.
31 * When a method contains at least one unknown type, the code generator will comment the whole method and let the client manage it.
35 * A minimalistic extern class will be created for each unknown type (this is the default behaviour)
39 * Print the help message
41 Unknown types are types that doesn't have an equivalent in Nit as of yet.
43 Jwrapper won't wrap a class that already is in the `lib/android` directory.
45 Can't use both -c and -w together, either you comment unknown types or you wrap them.