aQute.bnd.osgi.Analyzer.removeAttributes()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(2.1k)|赞(0)|评价(0)|浏览(99)

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

Analyzer.removeAttributes介绍

[英]Remove the attributes mentioned in the REMOVE_ATTRIBUTE_DIRECTIVE. You can add a remove-attribute: directive with a regular expression for attributes that need to be removed. We also remove all attributes that have a value of !. This allows you to use macros with ${if} to remove values.
[中]删除Remove_ATTRIBUTE_指令中提到的属性。可以为需要删除的属性添加带有正则表达式的remove attribute:directive。我们还将删除所有值为!的属性!。这允许您使用带有${if}的宏来删除值。

代码示例

代码示例来源:origin: biz.aQute/bndlib

/**
 * Provide any macro substitutions and versions for exported packages.
 */
void augmentExports(Packages exports) {
  for (PackageRef packageRef : exports.keySet()) {
    String packageName = packageRef.getFQN();
    setProperty(CURRENT_PACKAGE, packageName);
    try {
      Attrs attributes = exports.get(packageRef);
      Attrs exporterAttributes = classpathExports.get(packageRef);
      if (exporterAttributes == null)
        continue;
      for (Map.Entry<String,String> entry : exporterAttributes.entrySet()) {
        String key = entry.getKey();
        if (key.equalsIgnoreCase(SPECIFICATION_VERSION))
          key = VERSION_ATTRIBUTE;
        // dont overwrite and no directives
        if (!key.endsWith(":") && !attributes.containsKey(key)) {
          attributes.put(key, entry.getValue());
        }
      }
      fixupAttributes(attributes);
      removeAttributes(attributes);
    }
    finally {
      unsetProperty(CURRENT_PACKAGE);
    }
  }
}

代码示例来源:origin: biz.aQute.bnd/bndlib

removeAttributes(attributes);

代码示例来源:origin: biz.aQute.bnd/bnd

removeAttributes(attributes);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

removeAttributes(attributes);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

removeAttributes(attributes);

代码示例来源:origin: biz.aQute.bnd/bndlib

removeAttributes(importAttributes);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bndlib

removeAttributes(importAttributes);

代码示例来源:origin: biz.aQute.bnd/biz.aQute.bnd

removeAttributes(importAttributes);

代码示例来源:origin: biz.aQute.bnd/bnd

removeAttributes(importAttributes);

代码示例来源:origin: biz.aQute/bndlib

removeAttributes(importAttributes);

相关文章

Analyzer类方法