public static boolean matchAtClassTemplateBuilder(Class<?> targetClass, boolean hasAnnotation) {
        if (hasAnnotation) {
            return AbstractTemplateBuilder.isAnnotated(targetClass, Message.class)
                    || AbstractTemplateBuilder.isAnnotated(targetClass, MessagePackMessage.class);
        } else {
            return !targetClass.isEnum() && !targetClass.isInterface();
        }
    }