001package org.unix4j.codegen.loader; 002 003import freemarker.template.TemplateModel; 004 005/** 006 * Loads and returns a {@link TemplateModel} based on a Java {@link Class}, for 007 * instance by analysing the class through reflection and/or reading annotations 008 * present with the class or its elements. 009 */ 010public interface ClassBasedDataLoader { 011 /** 012 * Loads and returns a {@link TemplateModel} based on the specified 013 * {@code clazz}. Most implementations analyze the class through reflection 014 * which is possibly enriched with annotations supporting the code 015 * generation. 016 * 017 * @param clazz 018 * the class to analyze 019 * @return the template model constructed on the basis of the specified 020 * {@code clazz} 021 */ 022 TemplateModel load(Class<?> clazz); 023 024}