本文整理汇总了Java中org.datacleaner.api.Categorized类的典型用法代码示例。如果您正苦于以下问题:Java Categorized类的具体用法?Java Categorized怎么用?Java Categorized使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Categorized类属于org.datacleaner.api包,在下文中一共展示了Categorized类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getComponentCategories
import org.datacleaner.api.Categorized; //导入依赖的package包/类
@Override
public Set<ComponentCategory> getComponentCategories() {
final Categorized categorized = getAnnotation(Categorized.class);
if (categorized == null) {
return Collections.emptySet();
}
final Class<? extends ComponentCategory>[] value = categorized.value();
if (value == null || value.length == 0) {
return Collections.emptySet();
}
final Set<ComponentCategory> result = new HashSet<>();
for (final Class<? extends ComponentCategory> categoryClass : value) {
if (categoryClass != ComponentCategory.class) {
final ComponentCategory category = ReflectionUtils.newInstance(categoryClass);
result.add(category);
}
}
return result;
}
示例2: getComponentSuperCategory
import org.datacleaner.api.Categorized; //导入依赖的package包/类
@Override
public ComponentSuperCategory getComponentSuperCategory() {
final Categorized categorized = getAnnotation(Categorized.class);
Class<? extends ComponentSuperCategory> superCategoryClass;
if (categorized == null) {
superCategoryClass = getDefaultComponentSuperCategoryClass();
} else {
superCategoryClass = categorized.superCategory();
if (superCategoryClass == ComponentSuperCategory.class) {
superCategoryClass = getDefaultComponentSuperCategoryClass();
}
}
return ReflectionUtils.newInstance(superCategoryClass);
}