io7m
io7m-jpra 0.3.2
io7m-jpra 0.3.2 Documentation

- 1. Package Information
  - 1.1. Orientation
  - 1.2. Installation
  - 1.3. Platform Specific Issues
  - 1.4. License
- 2. Tools Reference
  - 2.1. jpra
- 3. API Reference
  - 3.1. Javadoc

1
Package Information

- 1.1. Orientation
  - 1.1.1. Overview
- 1.2. Installation
  - 1.2.1. Source compilation
  - 1.2.2. Maven
- 1.3. Platform Specific Issues
- 1.4. License

1.1
Orientation
1.1.1
Overview
1
The io7m-jpra provides a simple language and set of tools for producing and accessing packed records.
1.2
Installation
1.2.1
Source compilation
1
The project can be compiled and installed with Maven:
2

    $ mvn -C clean install

1.2.2
Maven
1
Regular releases are made to the Central Repository, so it's possible to use the io7m-jpra package in your projects with the following Maven dependency:
2

    <dependency>
      <groupId>com.io7m.jpra</groupId>
      <artifactId>io7m-jpra-core</artifactId>
      <version>0.3.2</version>
    </dependency>

3
All io7m.com packages use Semantic Versioning [0], which implies that it is always safe to use version ranges with an exclusive upper bound equal to the next major version - the API of the package will not change in a backwards-incompatible manner before the next major version.
1.3
Platform Specific Issues
1
There are currently no known platform-specific issues.
1.4
License
1
All files distributed with the io7m-jpra package are placed under the following license:

    Copyright © 2015 <code@io7m.com> http://io7m.com

    Permission to use, copy, modify, and/or distribute this software for any
    purpose with or without fee is hereby granted, provided that the above
    copyright notice and this permission notice appear in all copies.

    THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

2
Tools Reference

- 2.1. jpra
  - 2.1.1. Overview
  - 2.1.2. Checking
  - 2.1.3. Code Generation

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.
3
API Reference

- 3.1. Javadoc

3.1
Javadoc
1
API documentation for the package is provided via the included Javadoc.

[0]
http://semver.org