private Class<?> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation = klass.getAnnotation(ExcludeCategory.class); return annotation == null ? null : annotation.value(); }
private static Set<Class<?>> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation= klass.getAnnotation(ExcludeCategory.class); return createSet(annotation == null ? null : annotation.value()); }
private Class<?> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation = klass.getAnnotation(ExcludeCategory.class); return annotation == null ? null : annotation.value(); }
private static Set<Class<?>> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation= klass.getAnnotation(ExcludeCategory.class); return createSet(annotation == null ? null : annotation.value()); }
private Class<?> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation = klass.getAnnotation(ExcludeCategory.class); return annotation == null ? null : annotation.value(); }
private Class<?> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation = klass.getAnnotation(ExcludeCategory.class); return annotation == null ? null : annotation.value(); }
private static Set<Class<?>> getExcludedCategory(Class<?> klass) { ExcludeCategory annotation= klass.getAnnotation(ExcludeCategory.class); return createSet(annotation == null ? null : annotation.value()); }
static CategoriesFilter forTestSuite(Class<?> testSuiteClass) { List<Class<?>> includedCategories = new ArrayList<>(); List<Class<?>> excludedCategories = new ArrayList<>(); IncludeCategory includeCategoryAnnotation= testSuiteClass.getAnnotation(IncludeCategory.class); if (includeCategoryAnnotation != null) { includedCategories.addAll(Arrays.asList(includeCategoryAnnotation.value())); } IncludeCategories includeCategoriesAnnotation= testSuiteClass.getAnnotation(IncludeCategories.class); if (includeCategoriesAnnotation != null) { includedCategories.addAll(Arrays.asList(includeCategoriesAnnotation.value())); } ExcludeCategory excludeCategoryAnnotation= testSuiteClass.getAnnotation(ExcludeCategory.class); if (excludeCategoryAnnotation != null) { excludedCategories.addAll(Arrays.asList(excludeCategoryAnnotation.value())); } ExcludeCategories excludeCategoriesAnnotation= testSuiteClass.getAnnotation(ExcludeCategories.class); if (excludeCategoriesAnnotation != null) { excludedCategories.addAll(Arrays.asList(excludeCategoriesAnnotation.value())); } return (includedCategories.isEmpty() && excludedCategories.isEmpty() ? null : new CategoriesFilter(includedCategories, excludedCategories)); }
private static Set<Class<?>> getClassesInExcludeCategoryAnnotation(final Class<?> suiteClass) { ExcludeCategory excludeCategory = suiteClass.getAnnotation(ExcludeCategory.class); if (excludeCategory == null) { // annotation not present, abort return null; } Class<?>[] excludedClasses = excludeCategory.value(); Set<Class<?>> classes = Sets.newHashSet(excludedClasses); return classes; }
static CategoriesFilter forTestSuite(Class<?> testSuiteClass) { List<Class<?>> includedCategories = new ArrayList<>(); List<Class<?>> excludedCategories = new ArrayList<>(); IncludeCategory includeCategoryAnnotation= testSuiteClass.getAnnotation(IncludeCategory.class); if (includeCategoryAnnotation != null) { includedCategories.addAll(Arrays.asList(includeCategoryAnnotation.value())); } IncludeCategories includeCategoriesAnnotation= testSuiteClass.getAnnotation(IncludeCategories.class); if (includeCategoriesAnnotation != null) { includedCategories.addAll(Arrays.asList(includeCategoriesAnnotation.value())); } ExcludeCategory excludeCategoryAnnotation= testSuiteClass.getAnnotation(ExcludeCategory.class); if (excludeCategoryAnnotation != null) { excludedCategories.addAll(Arrays.asList(excludeCategoryAnnotation.value())); } ExcludeCategories excludeCategoriesAnnotation= testSuiteClass.getAnnotation(ExcludeCategories.class); if (excludeCategoriesAnnotation != null) { excludedCategories.addAll(Arrays.asList(excludeCategoriesAnnotation.value())); } return (includedCategories.isEmpty() && excludedCategories.isEmpty() ? null : new CategoriesFilter(includedCategories, excludedCategories)); }