gpt4 book ai didi

edu.umd.cs.findbugs.ba.XField.isReferenceType()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-19 16:20:40 26 4
gpt4 key购买 nike

本文整理了Java中edu.umd.cs.findbugs.ba.XField.isReferenceType()方法的一些代码示例,展示了XField.isReferenceType()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XField.isReferenceType()方法的具体详情如下:
包路径:edu.umd.cs.findbugs.ba.XField
类名称:XField
方法名:isReferenceType

XField.isReferenceType介绍

[英]Is the type of the field a reference type?
[中]字段的类型是否为引用类型?

代码示例

代码示例来源:origin: spotbugs/spotbugs

@Override
public void visit(Field obj) {
  XField xField = getXField();
  if(!xField.isStatic() && (xField.isPrivate() || xField.isFinal()) && xField.isReferenceType()) {
    allowedFields.add(xField.getFieldDescriptor());
  }
}

代码示例来源:origin: spotbugs/spotbugs

public boolean checkForInitialization(XField f) {
  if (!f.isReferenceType() || f.isFinal()) {
    return false;
  }
  NullnessAnnotation annotation = AnalysisContext.currentAnalysisContext().getNullnessAnnotationDatabase()
      .getResolvedAnnotation(f, false);
  boolean isNonnull = annotation == NullnessAnnotation.NONNULL;
  return isNonnull;
}

代码示例来源:origin: spotbugs/spotbugs

public void killAllLoads(boolean primitiveOnly) {
  if (!REDUNDANT_LOAD_ELIMINATION) {
    return;
  }
  FieldSummary fieldSummary = AnalysisContext.currentAnalysisContext().getFieldSummary();
  HashSet<AvailableLoad> killMe = new HashSet<>();
  for (AvailableLoad availableLoad : getAvailableLoadMap().keySet()) {
    XField field = availableLoad.getField();
    if ((!primitiveOnly || !field.isReferenceType()) && (field.isVolatile() || !field.isFinal()
        && (!USE_WRITTEN_OUTSIDE_OF_CONSTRUCTOR || fieldSummary.isWrittenOutsideOfConstructor(field)))) {
      if (RLE_DEBUG) {
        System.out.println("KILLING load of " + availableLoad + " in " + this);
      }
      killMe.add(availableLoad);
    }
  }
  killAvailableLoads(killMe);
}

代码示例来源:origin: spotbugs/spotbugs

.addField(f).describe("FIELD_ON").addSourceLineRange(this, startPC, endPC));
} else {
  if(declaration.isReferenceType()) {
    currentDoubleCheckField = declaration;
    assignPC = getPC();

代码示例来源:origin: spotbugs/spotbugs

if (f.isReferenceType()) {
  try {
    ValueNumberDataflow vnaDataflow = getClassContext().getValueNumberDataflow(getMethod());
      priority++;
    if (f.isReferenceType()) {
      FieldDescriptor fieldInfo = f.getFieldDescriptor();
      String dottedClass = DeepSubtypeAnalysis.getComponentClass(fieldInfo.getSignature());

代码示例来源:origin: com.google.code.findbugs/findbugs

@Override
public void visit(Field obj) {
  XField xField = getXField();
  if(!xField.isStatic() && (xField.isPrivate() || xField.isFinal()) && xField.isReferenceType()) {
    allowedFields.add(xField.getFieldDescriptor());
  }
}

代码示例来源:origin: com.google.code.findbugs/findbugs

public boolean checkForInitialization(XField f) {
  if (!f.isReferenceType() || f.isFinal()) {
    return false;
  }
  NullnessAnnotation annotation = AnalysisContext.currentAnalysisContext().getNullnessAnnotationDatabase()
      .getResolvedAnnotation(f, false);
  boolean isNonnull = annotation == NullnessAnnotation.NONNULL;
  return isNonnull;
}

代码示例来源:origin: com.google.code.findbugs/findbugs

public void killAllLoads(boolean primitiveOnly) {
  if (!REDUNDANT_LOAD_ELIMINATION) {
    return;
  }
  FieldSummary fieldSummary = AnalysisContext.currentAnalysisContext().getFieldSummary();
  HashSet<AvailableLoad> killMe = new HashSet<AvailableLoad>();
  for (AvailableLoad availableLoad : getAvailableLoadMap().keySet()) {
    XField field = availableLoad.getField();
    if ((!primitiveOnly || !field.isReferenceType()) && (field.isVolatile() || !field.isFinal()
        && (!USE_WRITTEN_OUTSIDE_OF_CONSTRUCTOR || fieldSummary.isWrittenOutsideOfConstructor(field)))) {
      if (RLE_DEBUG) {
        System.out.println("KILLING load of " + availableLoad + " in " + this);
      }
      killMe.add(availableLoad);
    }
  }
  killAvailableLoads(killMe);
}

代码示例来源:origin: com.google.code.findbugs/findbugs

.addField(f).describe("FIELD_ON").addSourceLineRange(this, startPC, endPC));
} else {
  if(declaration.isReferenceType()) {
    currentDoubleCheckField = declaration;
    assignPC = getPC();

代码示例来源:origin: com.google.code.findbugs/findbugs

if (f.isReferenceType()) {
  try {
    ValueNumberDataflow vnaDataflow = getClassContext().getValueNumberDataflow(getMethod());
      priority++;
    if (f.isReferenceType()) {
      FieldDescriptor fieldInfo = f.getFieldDescriptor();
      String dottedClass = DeepSubtypeAnalysis.getComponentClass(fieldInfo.getSignature());

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com