Include other templates
Template $for tables$$write table.java$public class $table$ {…$include table.extras$}$end$$write$
Notes:
The include directive can be thought of as the converse of the write directive. Rather than redirecting the output, it tells Intercalate to pause in the processing of the current template to work with the template named by the specified key. A file name is constructed from the key just as it is with the write directive. When the included template has been completely processed, Intercalate resumes processing of the current template.
The include directive is a very powerful mechanism for customizing output. In this example, although the basic template produces instance variable declarations and accessor methods in a uniform manner, any complex functionality which distinguishes one Java class from another can be provided in its own template.
If the included file doesn’t exist or for some other reason cannot be opened, Intercalate ignores the directive and continues processing the current template without interruption.