protected abstract <T> Template<T> buildTemplate(Class<T> targetClass, FieldEntry[] entries);
protected void checkClassValidation(final Class<?> targetClass) {
if (targetClass.isInterface()) {
throw new TemplateBuildException("Cannot build template for interface: " + targetClass.getName());
}
if (targetClass.isArray()) {
throw new TemplateBuildException("Cannot build template for array class: " + targetClass.getName());
}
if (targetClass.isPrimitive()) {
throw new TemplateBuildException("Cannot build template of primitive type: " + targetClass.getName());
}
}