private static void importChildTemplates(
            Configuration freeMarkerConfig,
            List<ChildTemplate> childTemplates) {

        if (childTemplates == null)
            return;

        for (ChildTemplate template : childTemplates) {
            freeMarkerConfig.addAutoImport(template.getImportAsNamespace(),
                    template.getLocation());
        }
    }
Util class that sets up the freemarker configuration and loads the templates.
aws-java-sdk-code-generator/src/main/java/com/amazonaws/codegen/internal/Freemarker.java