io7m
io7m-jpra 0.3.2
2.1
jpra
2.1.1
Overview
2.1.1.1. Options

    usage: jpra <command> [<args>]

    The most commonly used jpra commands are:
        check           Check a list of packages
        generate-java   Generate Java code
        help            Display help information

    See 'jpra help <command>' for more information on a specific command.

1
The jpra command checks source code for errors and exports class definitions in the Java language.
2.1.2
Checking
1
To check source code for errors, without generating Java sources, use the check subcommand:
2.1.2.1. Checking sources

    $ java -jar jpra.jar check --source-directory p com.io7m.example

2
The above command will check package com.io7m.example in the directory p. The package is assumed to be in the file p/com/io7m/example.jpr.
3
If checking succeeds, the command says nothing. Otherwise, errors are printed to standard error and the program exits with a non-zero exit code.
2.1.3
Code Generation
1
To generate Java sources, use the generate-java subcommand:
2.1.3.1. Checking sources

    $ java -jar jpra.jar generate-java --source-directory p --target-directory t com.io7m.example

2
The above command will check package com.io7m.example in the directory p. The package is assumed to be in the file p/com/io7m/example.jpr. If no errors were detected, it will then generate Java source code in the directory t, generating one Java class per type definition, and placing each class in t/com/io7m/example/.
3
If checking succeeds, the command says nothing. Otherwise, errors are printed to standard error and the program exits with a non-zero exit code.