本文整理汇总了Java中org.datacleaner.api.RendererPrecedence.NOT_CAPABLE属性的典型用法代码示例。如果您正苦于以下问题:Java RendererPrecedence.NOT_CAPABLE属性的具体用法?Java RendererPrecedence.NOT_CAPABLE怎么用?Java RendererPrecedence.NOT_CAPABLE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.datacleaner.api.RendererPrecedence
的用法示例。
在下文中一共展示了RendererPrecedence.NOT_CAPABLE属性的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerResult renderable) {
try {
// only apply to classes that has a specialized toString() method.
final Method toStringMethod = renderable.getClass().getDeclaredMethod("toString");
if (toStringMethod != null) {
return RendererPrecedence.LOW;
}
} catch (final Exception e) {
// ignore
}
return RendererPrecedence.NOT_CAPABLE;
}
示例2: isRendererCapable
private RendererSelection isRendererCapable(final RendererBeanDescriptor<?> rendererDescriptor,
final Renderable renderable, final RendererSelection bestMatch) {
final Renderer<Renderable, ?> renderer = instantiate(rendererDescriptor);
if (_rendererInitializer != null) {
_rendererInitializer.initialize(rendererDescriptor, renderer);
}
RendererPrecedence precedence;
try {
precedence = renderer.getPrecedence(renderable);
if (precedence == null) {
logger.debug("Renderer precedence was null for {}, using MEDIUM", renderer);
precedence = RendererPrecedence.MEDIUM;
}
if (precedence == RendererPrecedence.NOT_CAPABLE) {
logger.debug("Renderer is not capable of rendering this renderable!");
return null;
}
if (bestMatch != null) {
final RendererPrecedence bestPrecedence = bestMatch.getPrecedence();
if (precedence.ordinal() < bestPrecedence.ordinal()) {
logger.info("Precedence {} did not match or supersede best matching precedence ({}).", precedence,
bestPrecedence);
return null;
}
}
} catch (final Exception e) {
logger.error("Could not get precedence of renderer, returning null", e);
return null;
}
final Class<? extends Renderable> renderableType = rendererDescriptor.getRenderableType();
final int hierarchyDistance = ReflectionUtils.getHierarchyDistance(renderable.getClass(), renderableType);
return new RendererSelection(renderer, precedence, hierarchyDistance);
}
示例3: getPrecedence
@Override
public RendererPrecedence getPrecedence(final TransformerComponentBuilder<FuseStreamsComponent> tjb) {
if (tjb.getDescriptor().getComponentClass() == FuseStreamsComponent.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例4: getPrecedence
@Override
public RendererPrecedence getPrecedence(final TransformerComponentBuilder<CoalesceMultipleFieldsTransformer> tjb) {
if (tjb.getDescriptor().getComponentClass() == CoalesceMultipleFieldsTransformer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:7,代码来源:CoalesceMultipleFieldsTransformerComponentBuilderPresenterRenderer.java
示例5: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<InsertIntoTableAnalyzer> ajb) {
if (ajb.getDescriptor().getComponentClass() == InsertIntoTableAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例6: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<UpdateTableAnalyzer> ajb) {
if (ajb.getDescriptor().getComponentClass() == UpdateTableAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例7: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<CompletenessAnalyzer> ajb) {
if (ajb.getDescriptor().getComponentClass() == CompletenessAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:7,代码来源:CompletenessAnalyzerComponentBuilderPresenterRenderer.java
示例8: getPrecedence
@Override
public RendererPrecedence getPrecedence(final FilterComponentBuilder<EqualsFilter, EqualsFilter.Category> fjb) {
if (fjb.getDescriptor().getComponentClass() == EqualsFilter.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例9: getPrecedence
@Override
public RendererPrecedence getPrecedence(final TransformerComponentBuilder<TextCaseTransformer> renderable) {
if (renderable.getDescriptor().getComponentClass() == TextCaseTransformer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例10: getPrecedence
@Override
public RendererPrecedence getPrecedence(final TransformerComponentBuilder<TableLookupTransformer> tjb) {
if (tjb.getDescriptor().getComponentClass() == TableLookupTransformer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例11: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<CreateStagingTableAnalyzer> ajb) {
final Class<CreateStagingTableAnalyzer> componentClass = ajb.getDescriptor().getComponentClass();
if (componentClass == CreateStagingTableAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例12: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<CreateExcelSpreadsheetAnalyzer> ajb) {
final Class<CreateExcelSpreadsheetAnalyzer> componentClass = ajb.getDescriptor().getComponentClass();
if (componentClass == CreateExcelSpreadsheetAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例13: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<DeleteFromTableAnalyzer> ajb) {
if (ajb.getDescriptor().getComponentClass() == DeleteFromTableAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例14: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerComponentBuilder<CreateCsvFileAnalyzer> ajb) {
final Class<CreateCsvFileAnalyzer> componentClass = ajb.getDescriptor().getComponentClass();
if (componentClass == CreateCsvFileAnalyzer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}
示例15: getPrecedence
@Override
public RendererPrecedence getPrecedence(final TransformerComponentBuilder<SelectFromMapTransformer> tjb) {
if (tjb.getDescriptor().getComponentClass() == SelectFromMapTransformer.class) {
return RendererPrecedence.HIGH;
}
return RendererPrecedence.NOT_CAPABLE;
}