Generated File Examples

A file is generated for each entry in the Generated File category under a metaclass, stereotype or criterion when the File name field is not empty. If no file name or only an extension is specified, the content of the generated file can still be viewed in the object's Preview tab.

The mechanism of file generation is the following for each object having a Generated Files entry that is not empty:



In the following example, the Generated Files category for file objects in Java contains the EmbeddedArtifact entry that applies to all embedded files of type Artifact to be generated, and whose File name field contains the template for the name of the file to be generated. The text field at the bottom displays the code of the template of the file to generate:



In this example, a file called ejb-jar.xml located in the META-INF folder is generated:



In this example, there is no file generated since the File name field contains only an extension beginning with a . (dot) character. The contents of the file is only available on the Preview tab of the component (EJB - Entity Bean) property sheet: