/** * Called by the generated IOC bootstrapper if a provider is specified on a * templated composite (see {@link Templated#provider()}). This method will * make sure that templates will be provided and rendered in invocation order * even if a given provider is asynchronous. * * @param templateProvider * the template provider to use for supplying the template, must not * be null. * @param location * the location of the template, must not be null. * @param renderingCallback * the callback to invoke when the template is available, must not be * null. */ public static void provideTemplate(final Class<?> templateProvider, final String location, final TemplateRenderingCallback renderingCallback) { final TemplateRequest request = new TemplateRequest(templateProvider, location, renderingCallback); requests.add(request); if (requests.size() == 1) { provideNextTemplate(); } }
/** * Called by the generated IOC bootstrapper if a provider is specified on a * templated composite (see {@link Templated#provider()}). This method will * make sure that templates will be provided and rendered in invocation order * even if a given provider is asynchronous. * * @param templateProvider * the template provider to use for supplying the template, must not * be null. * @param location * the location of the template, must not be null. * @param renderingCallback * the callback to invoke when the template is available, must not be * null. */ public static void provideTemplate(final Class<?> templateProvider, final String location, final TemplateRenderingCallback renderingCallback) { final TemplateRequest request = new TemplateRequest(templateProvider, location, renderingCallback); requests.add(request); if (requests.size() == 1) { provideNextTemplate(); } }