gpt4 book ai didi

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

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

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

XField.getFieldDescriptor介绍

暂无

代码示例

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

private void check(XField xfield, ClassDescriptor annotation, boolean expectWarnings, int priority) {
  AnnotationValue expect = xfield.getAnnotation(annotation);
  if (expect == null) {
    return;
  }
  if (DEBUG) {
    System.out.println("*** Found " + annotation + " annotation on " + xfield);
  }
  FieldOrMethodDescriptor descriptor = xfield.getFieldDescriptor();
  Collection<BugInstance> warnings = warningsByField.get(descriptor);
  check(expect, descriptor, warnings, expectWarnings, priority, descriptor.getClassDescriptor());
}

代码示例来源: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

boolean samePackage = packageName.equals(extractPackage(xField.getFieldDescriptor().getSlashedClassName()));
boolean initOnly = seen == Const.GETSTATIC || getClassName().equals(getClassConstantOperand()) && inStaticInitializer;
boolean safeValue = seen == Const.GETSTATIC || emptyArrayOnTOS

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

private MethodCall getMethodCall(MethodDescriptor methodDescriptorOperand) {
  Item objItem = getStack().getStackItem(getNumberArguments(methodDescriptorOperand.getSignature()));
  if (isNew(objItem)) {
    return new MethodCall(methodDescriptorOperand, TARGET_NEW);
  }
  if (objItem.getRegisterNumber() == 0 && !getMethod().isStatic()) {
    return new MethodCall(methodDescriptorOperand, constructor ? TARGET_NEW : TARGET_THIS);
  }
  XField xField = objItem.getXField();
  if (xField != null) {
    if (classInit && xField.isStatic() && xField.getClassDescriptor().getClassName().equals(getClassName())) {
      return new MethodCall(methodDescriptorOperand, TARGET_NEW);
    }
    if (!getMethodDescriptor().isStatic() && objItem.getFieldLoadedFromRegister() == 0
        && allowedFields.contains(xField.getFieldDescriptor())) {
      fieldsModifyingMethods.add(getMethodDescriptor());
      return new MethodCall(methodDescriptorOperand, xField.getFieldDescriptor());
    }
  }
  return new MethodCall(methodDescriptorOperand, TARGET_OTHER);
}

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

FieldAnnotation maskedFieldAnnotation = FieldAnnotation.fromFieldDescriptor(fld.getFieldDescriptor());
BugInstance bug = new BugInstance(this, "MF_CLASS_MASKS_FIELD", priority).addClass(this).addField(fa)
    .describe("FIELD_MASKING").addField(maskedFieldAnnotation).describe("FIELD_MASKED");

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

FieldStoreType property = database.getProperty(xfield.getFieldDescriptor());
if (property == null) {
  property = new FieldStoreType();
  database.setProperty(xfield.getFieldDescriptor(), property);

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

FieldDescriptor fieldInfo = f.getFieldDescriptor();
String dottedClass = DeepSubtypeAnalysis.getComponentClass(fieldInfo.getSignature());
JavaClass fieldClass = Repository.lookupClass(dottedClass);

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

if (database != null) {
  FieldStoreType property = database.getProperty(xfield
      .getFieldDescriptor());
  if (property != null) {
    loadType = property.getLoadType(loadType);

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

if (f != null && (SYSTEM_ERR.equals(f.getFieldDescriptor()) || SYSTEM_OUT.equals(f.getFieldDescriptor()))) {
  debuggingContext = true;

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

private void check(XField xfield, ClassDescriptor annotation, boolean expectWarnings, int priority) {
  AnnotationValue expect = xfield.getAnnotation(annotation);
  if (expect == null) {
    return;
  }
  if (DEBUG) {
    System.out.println("*** Found " + annotation + " annotation on " + xfield);
  }
  FieldOrMethodDescriptor descriptor = xfield.getFieldDescriptor();
  Collection<BugInstance> warnings = warningsByField.get(descriptor);
  check(expect, descriptor, warnings, expectWarnings, priority, descriptor.getClassDescriptor());
}

代码示例来源: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

boolean samePackage = packageName.equals(extractPackage(xField.getFieldDescriptor().getSlashedClassName()));
boolean initOnly = seen == GETSTATIC || getClassName().equals(getClassConstantOperand()) && inStaticInitializer;
boolean safeValue = seen == GETSTATIC || emptyArrayOnTOS

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

private MethodCall getMethodCall(MethodDescriptor methodDescriptorOperand) {
  Item objItem = getStack().getStackItem(getNumberArguments(methodDescriptorOperand.getSignature()));
  if (isNew(objItem)) {
    return new MethodCall(methodDescriptorOperand, TARGET_NEW);
  }
  if (objItem.getRegisterNumber() == 0 && !getMethod().isStatic()) {
    return new MethodCall(methodDescriptorOperand, constructor ? TARGET_NEW : TARGET_THIS);
  }
  XField xField = objItem.getXField();
  if (xField != null) {
    if (classInit && xField.isStatic() && xField.getClassDescriptor().getClassName().equals(getClassName())) {
      return new MethodCall(methodDescriptorOperand, TARGET_NEW);
    }
    if (!getMethodDescriptor().isStatic() && objItem.getFieldLoadedFromRegister() == 0
        && allowedFields.contains(xField.getFieldDescriptor())) {
      fieldsModifyingMethods.add(getMethodDescriptor());
      return new MethodCall(methodDescriptorOperand, xField.getFieldDescriptor());
    }
  }
  return new MethodCall(methodDescriptorOperand, TARGET_OTHER);
}

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

FieldAnnotation maskedFieldAnnotation = FieldAnnotation.fromFieldDescriptor(fld.getFieldDescriptor());
BugInstance bug = new BugInstance(this, "MF_CLASS_MASKS_FIELD", priority).addClass(this).addField(fa)
    .describe("FIELD_MASKING").addField(maskedFieldAnnotation).describe("FIELD_MASKED");

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

FieldStoreType property = database.getProperty(xfield.getFieldDescriptor());
if (property == null) {
  property = new FieldStoreType();
  database.setProperty(xfield.getFieldDescriptor(), property);

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

FieldDescriptor fieldInfo = f.getFieldDescriptor();
String dottedClass = DeepSubtypeAnalysis.getComponentClass(fieldInfo.getSignature());
JavaClass fieldClass = Repository.lookupClass(dottedClass);

代码示例来源:origin: mebigfatguy/fb-contrib

if (((fld == null) || !fieldsWithAnnotations.contains(fld.getFieldDescriptor())) && (expectedItem.isNull())) {
  bugReporter.reportBug(new BugInstance(this, BugType.UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL.name(), NORMAL_PRIORITY)
      .addClass(this).addMethod(this).addSourceLine(this));

代码示例来源:origin: com.mebigfatguy.fb-contrib/fb-contrib

if (((fld == null) || !fieldsWithAnnotations.contains(fld.getFieldDescriptor())) && (expectedItem.isNull())) {
  bugReporter.reportBug(new BugInstance(this, BugType.UTAO_TESTNG_ASSERTION_ODDITIES_USE_ASSERT_NOT_NULL.name(), NORMAL_PRIORITY)
      .addClass(this).addMethod(this).addSourceLine(this));

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

if (database != null) {
  FieldStoreType property = database.getProperty(xfield
      .getFieldDescriptor());
  if (property != null) {
    loadType = property.getLoadType(loadType);

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

if (f != null && (SYSTEM_ERR.equals(f.getFieldDescriptor()) || SYSTEM_OUT.equals(f.getFieldDescriptor()))) {
  debuggingContext = true;

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