NRL
Java Generator
This generator
is a key component in the framework: it translates NRL rule files to
plain Java code. The generated Java code has no runtime engine
dependency - it implements simple interfaces that are imported into
user projects and can be called directly.
Features
provided by the generator include:
- Supports
both the NRL constraint and action language - suitable for validation,
enrichment or mapping
- Generates clean code without
strange variable names or spurious constructs
- Reconciles
the way classes / XML Schema types are named/represented in the model
with runtime class representations (e.g. JAXB)
- API conventions (get/set methods,
class names, collection types) are not hard-coded, but dynamically
configurable using a Groovy
script
- Automatically inserts type
conversions so the rule writer does not have to:
- Date
syntax transformations are delegated to user-supplied classes - the
rule writer can compare or assign dates in completely different
representations
- Type casts and number parsing code
automatically generated
- A simple runtime
framework that executes rules and collects result is copied in source code form to user
projects - user projects remain independent of NRL
- Optional tracing code is inserted
to relate crashes to line/column of the last executed NRL statement
- Optimises
checks against static lists using hash maps
Requirements
and deployment:
- Java 1.5+
is required for the user interface
- Generated Java
code is Java 1.4 compliant; Java 1.5 features can be generated on
request
©2006-2009 Model Two Zero Ltd.
Eclipse
and the eclipse logo are trademarks of the eclipse foundation.
RSM,
RSA and IBM Rational are trademarks of IBM.