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


Java When.NEVER属性代码示例

本文整理汇总了Java中javax.annotation.meta.When.NEVER属性的典型用法代码示例。如果您正苦于以下问题:Java When.NEVER属性的具体用法?Java When.NEVER怎么用?Java When.NEVER使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在javax.annotation.meta.When的用法示例。


在下文中一共展示了When.NEVER属性的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: backwardsValueConflictsWithSource

/**
 * Determine whether given backwards FlowValue conflicts with given source.
 * 
 * @param backwardsFlowValue
 *            a backwards FlowValue
 * @param source
 *            SourceSinkInfo object representing a source reached by the
 *            backwards flow value
 * @param typeQualifierValue
 *            TypeQualifierValue being checked
 * @param isIdentity TODO
 * @return true if backwards value conflicts with source, false if not
 */
public static boolean backwardsValueConflictsWithSource(FlowValue backwardsFlowValue, SourceSinkInfo source,
        TypeQualifierValue typeQualifierValue, boolean isIdentity) {

    When sourceWhen = source.getWhen();


    if (typeQualifierValue.isStrictQualifier() && !isIdentity) {
        // strict checking
        return (backwardsFlowValue == ALWAYS && sourceWhen != When.ALWAYS)
                || (backwardsFlowValue == NEVER && sourceWhen != When.NEVER);
    } else {
        // NOT strict checking
        return (backwardsFlowValue == ALWAYS && (sourceWhen == When.NEVER || sourceWhen == When.MAYBE))
                || (backwardsFlowValue == NEVER && (sourceWhen == When.ALWAYS || sourceWhen == When.MAYBE));
    }
}
 
开发者ID:ytus,项目名称:findbugs-all-the-bugs,代码行数:29,代码来源:FlowValue.java

示例2: checkLimit

@CheckReturnValue(when = When.NEVER)
public int checkLimit(final int limit) {
  if (limit > capacity) {
    throw new IndexOutOfBoundsException(String.format("limit is beyond capacity (l=%d; c=%d)"
        , limit, capacity));
  }
  return limit;
}
 
开发者ID:nightcode,项目名称:bertool,代码行数:8,代码来源:BerBuffer.java

示例3: checkIndex

@CheckReturnValue(when = When.NEVER)
int checkIndex(final int index) {
  if (index >= capacity) {
    throw new IndexOutOfBoundsException(String.format("index is beyond bound (i=%d; b=%d)"
        , index, capacity - 1));
  }
  return index;
}
 
开发者ID:nightcode,项目名称:bertool,代码行数:8,代码来源:BerBuffer.java

示例4: paramNonnullNever

public void paramNonnullNever (@Nonnull (when = When.NEVER) final String s)
{}
 
开发者ID:phax,项目名称:ph-commons,代码行数:2,代码来源:MockNullableTestCorrect.java

示例5: OperandFromEndSubstitutionSource

private OperandFromEndSubstitutionSource(@Nonnegative(when = When.NEVER) int operandIndex) {
    this.operandIndex = operandIndex;
}
 
开发者ID:reasm,项目名称:reasm-m68k,代码行数:3,代码来源:Macro.java

示例6: paramNonnullNever

void paramNonnullNever (@Nonnull (when = When.NEVER) String s); 
开发者ID:phax,项目名称:ph-commons,代码行数:1,代码来源:IMockNullableTest.java


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