static int getTemplateParametersCount(Class<?> typeClass) { Template t = typeClass.getAnnotation(Template.class); // TODO do something with these args ! int templateParametersCount = t == null ? 0 : t.value().length; return templateParametersCount; }