protected void checkClassValidation(final Class<?> targetClass) {
        if (Modifier.isAbstract(targetClass.getModifiers())) {
            throw new TemplateBuildException(
                    "Cannot build template for abstract class: " + targetClass.getName());
        }
        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());
        }
    }