本文整理汇总了Java中org.datacleaner.api.RendererPrecedence.MEDIUM属性的典型用法代码示例。如果您正苦于以下问题:Java RendererPrecedence.MEDIUM属性的具体用法?Java RendererPrecedence.MEDIUM怎么用?Java RendererPrecedence.MEDIUM使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.datacleaner.api.RendererPrecedence
的用法示例。
在下文中一共展示了RendererPrecedence.MEDIUM属性的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: getPrecedence
public RendererPrecedence getPrecedence(final I renderable) {
return RendererPrecedence.MEDIUM;
}
示例3: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerResultFuture<? extends AnalyzerResult> renderable) {
return RendererPrecedence.MEDIUM;
}
示例4: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnalyzerResult renderable) {
return RendererPrecedence.MEDIUM;
}
示例5: getPrecedence
@Override
public RendererPrecedence getPrecedence(final MockAnalyzerFutureResult renderable) {
return RendererPrecedence.MEDIUM;
}
示例6: getPrecedence
@Override
public RendererPrecedence getPrecedence(final WriteDataResult renderable) {
return RendererPrecedence.MEDIUM;
}
示例7: getPrecedence
@Override
public RendererPrecedence getPrecedence(final AnnotatedRowsResult renderable) {
return RendererPrecedence.MEDIUM;
}
示例8: getPrecedence
@Override
public RendererPrecedence getPrecedence(R renderable) {
return RendererPrecedence.MEDIUM;
}