当前位置: 首页>>代码示例>>Java>>正文


Java RendererPrecedence.MEDIUM属性代码示例

本文整理汇总了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);
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:40,代码来源:RendererFactory.java

示例2: getPrecedence

public RendererPrecedence getPrecedence(final I renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:3,代码来源:AbstractRenderer.java

示例3: getPrecedence

@Override
public RendererPrecedence getPrecedence(final AnalyzerResultFuture<? extends AnalyzerResult> renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:ToStringFutureTextRenderer.java

示例4: getPrecedence

@Override
public RendererPrecedence getPrecedence(final AnalyzerResult renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:MockRenderers.java

示例5: getPrecedence

@Override
public RendererPrecedence getPrecedence(final MockAnalyzerFutureResult renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:MockAnalyzerResultSwingRenderer.java

示例6: getPrecedence

@Override
public RendererPrecedence getPrecedence(final WriteDataResult renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:WriteDataResultHtmlRenderer.java

示例7: getPrecedence

@Override
public RendererPrecedence getPrecedence(final AnnotatedRowsResult renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:AnnotatedRowsHtmlRenderer.java

示例8: getPrecedence

@Override
public RendererPrecedence getPrecedence(R renderable) {
    return RendererPrecedence.MEDIUM;
}
 
开发者ID:datacleaner,项目名称:DataCleaner,代码行数:4,代码来源:HtmlRenderer.java


注:本文中的org.datacleaner.api.RendererPrecedence.MEDIUM属性示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。