Generated file

A generated file is the result of processing a template with the current project configuration. Generated files can be customised if the default generated file does not meet your requirements.

Embedded checksum

So that RapidJ can determine when a generated file has been customised, a checksum is embedded into generated files when they are created. It is important that this checksum is not removed from generated files, otherwise RapidJ will be unable to process them correctly.

Here is an example of an embedded checksum: {{$RapidJ1473153268$}}.

Customised generated file

A customised generated file is simply a generated file that has been modified after it was produced by a template. Generated files can be customised through RapidJ or using any external file editor.

Regenerating

If the configuration for a project changes, existing generated files may be need to be regenerated to reflect the latest changes.

For generated files that have not been customised, this can be achieved by generating again for the entire project. The new changes will be written directly to the existing generated files.

For customised generated files, the new changes are not written directly to the files. Instead they are written to a so called shadow file and it becomes your responsibility to merge the new changes into the customised generated file as required.

Shadow file

Shadow files are created by RapidJ during the generation process to store what a generated file would look like, were it not customised. Shadow files are named after their associated customised generated file and end with the extension .shd.

Following is an example of a shadow file for the customised generated file application.properties:

Related concepts

Template

Related tasks

Customising a generated file

Related reference

Generate Code tab
Generated Files tree