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

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

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

Analyzer.calcManifest介绍

[英]One of the main workhorses of this class. This will analyze the current setp and calculate a new manifest according to this setup. This method will also set the manifest on the main jar dot
[中]这一类的主要工作马之一。这将分析当前setp并根据此设置计算新清单。此方法还将在主jar点上设置清单

代码示例

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

/**
 * Specifically for Maven
 * 
 * @param properties
 *            the properties
 */
public static Properties getManifest(File dirOrJar) throws Exception {
  Analyzer analyzer = new Analyzer();
  try {
    analyzer.setJar(dirOrJar);
    Properties properties = new Properties();
    properties.put(IMPORT_PACKAGE, "*");
    properties.put(EXPORT_PACKAGE, "*");
    analyzer.setProperties(properties);
    Manifest m = analyzer.calcManifest();
    Properties result = new Properties();
    for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) {
      Attributes.Name name = (Attributes.Name) i.next();
      result.put(name.toString(), m.getMainAttributes().getValue(name));
    }
    return result;
  }
  finally {
    analyzer.close();
  }
}

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

/**
 * Specifically for Maven
 */
public static Properties getManifest(File dirOrJar) throws Exception {
  try (Analyzer analyzer = new Analyzer()) {
    analyzer.setJar(dirOrJar);
    Properties properties = new UTF8Properties();
    properties.put(IMPORT_PACKAGE, "*");
    properties.put(EXPORT_PACKAGE, "*");
    analyzer.setProperties(properties);
    Manifest m = analyzer.calcManifest();
    Properties result = new UTF8Properties();
    for (Iterator<Object> i = m.getMainAttributes()
      .keySet()
      .iterator(); i.hasNext();) {
      Attributes.Name name = (Attributes.Name) i.next();
      result.put(name.toString(), m.getMainAttributes()
        .getValue(name));
    }
    return result;
  }
}

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

/**
 * Specifically for Maven
 */
public static Properties getManifest(File dirOrJar) throws Exception {
  try (Analyzer analyzer = new Analyzer()) {
    analyzer.setJar(dirOrJar);
    Properties properties = new UTF8Properties();
    properties.put(IMPORT_PACKAGE, "*");
    properties.put(EXPORT_PACKAGE, "*");
    analyzer.setProperties(properties);
    Manifest m = analyzer.calcManifest();
    Properties result = new UTF8Properties();
    for (Iterator<Object> i = m.getMainAttributes()
      .keySet()
      .iterator(); i.hasNext();) {
      Attributes.Name name = (Attributes.Name) i.next();
      result.put(name.toString(), m.getMainAttributes()
        .getValue(name));
    }
    return result;
  }
}

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

/**
 * Specifically for Maven
 *
 * @param properties
 *            the properties
 */
public static Properties getManifest(File dirOrJar) throws Exception {
  Analyzer analyzer = new Analyzer();
  try {
    analyzer.setJar(dirOrJar);
    Properties properties = new UTF8Properties();
    properties.put(IMPORT_PACKAGE, "*");
    properties.put(EXPORT_PACKAGE, "*");
    analyzer.setProperties(properties);
    Manifest m = analyzer.calcManifest();
    Properties result = new UTF8Properties();
    for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) {
      Attributes.Name name = (Attributes.Name) i.next();
      result.put(name.toString(), m.getMainAttributes().getValue(name));
    }
    return result;
  }
  finally {
    analyzer.close();
  }
}

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

/**
 * Specifically for Maven
 *
 * @param properties
 *            the properties
 */
public static Properties getManifest(File dirOrJar) throws Exception {
  Analyzer analyzer = new Analyzer();
  try {
    analyzer.setJar(dirOrJar);
    Properties properties = new UTF8Properties();
    properties.put(IMPORT_PACKAGE, "*");
    properties.put(EXPORT_PACKAGE, "*");
    analyzer.setProperties(properties);
    Manifest m = analyzer.calcManifest();
    Properties result = new UTF8Properties();
    for (Iterator<Object> i = m.getMainAttributes().keySet().iterator(); i.hasNext();) {
      Attributes.Name name = (Attributes.Name) i.next();
      result.put(name.toString(), m.getMainAttributes().getValue(name));
    }
    return result;
  }
  finally {
    analyzer.close();
  }
}

代码示例来源:origin: reficio/p2-maven-plugin

private void populateJar(Analyzer analyzer, File outputFile) throws Exception {
  Jar jar = analyzer.getJar();
  jar.setManifest(analyzer.calcManifest());
  try {
    jar.write(outputFile);
  } finally {
    jar.close();
  }
}

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

public Verifier(Jar jar) throws Exception {
  this.analyzer = new Analyzer(this);
  this.analyzer.use(this);
  addClose(analyzer);
  this.analyzer.setJar(jar);
  this.manifest = this.analyzer.calcManifest();
  this.main = Domain.domain(manifest);
  this.dot = jar;
  getInfo(analyzer);
}

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

public Verifier(Jar jar) throws Exception {
  this.analyzer = new Analyzer(this);
  this.analyzer.use(this);
  addClose(analyzer);
  this.analyzer.setJar(jar);
  this.manifest = this.analyzer.calcManifest();
  this.main = Domain.domain(manifest);
  this.dot = jar;
  getInfo(analyzer);
}

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

public Verifier(Jar jar) throws Exception {
  this.analyzer = new Analyzer(this);
  this.analyzer.use(this);
  addClose(analyzer);
  this.analyzer.setJar(jar);
  this.manifest = this.analyzer.calcManifest();
  this.main = Domain.domain(manifest);
  this.dot = jar;
  getInfo(analyzer);
}

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

public Verifier(Jar jar) throws Exception {
  this.analyzer = new Analyzer(this);
  this.analyzer.use(this);
  addClose(analyzer);
  this.analyzer.setJar(jar);
  this.manifest = this.analyzer.calcManifest();
  this.main = Domain.domain(manifest);
  this.dot = jar;
  getInfo(analyzer);
}

代码示例来源:origin: com.athaydes.osgiaas/osgiaas-jar-wrap

destination;
Manifest manifest = analyzer.calcManifest();

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

public Verifier(Jar jar) throws Exception {
  this.analyzer = new Analyzer(this);
  this.analyzer.use(this);
  addClose(analyzer);
  this.analyzer.setJar(jar);
  this.manifest = this.analyzer.calcManifest();
  this.main = Domain.domain(manifest);
  this.dot = jar;
  getInfo(analyzer);
}

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

a.removeClose(bin_test);
a.calcManifest();
StringBuilder extra = new StringBuilder();
String del = "";

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

a.removeClose(bin_test);
a.calcManifest();
StringBuilder extra = new StringBuilder();
String del = "";

代码示例来源:origin: org.ops4j.pax.swissbox/pax-swissbox-bnd

try
  Manifest newManifest = analyzer.calcManifest();
  jar.setManifest( newManifest );

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

Manifest manifest = wrapper.calcManifest();
if (wrapper.isOk()) {
  wrapper.getJar().setManifest(manifest);

代码示例来源:origin: org.arquillian.liferay/arquillian-deployment-generator-bnd

Manifest manifest = analyzer.calcManifest();

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

wrapper.setBundleVersion(options.version());
Manifest m = wrapper.calcManifest();

代码示例来源:origin: com.adaptavist.shrinkwrap/shrinkwrap-atlassian-plugin-impl

final Manifest manifest = osgiAnalyzer.calcManifest();

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

w.use(this);
w.setDefaults(options.bsn(), options.version());
w.calcManifest();
getInfo(w);
w.setJar((Jar) null);

相关文章

Analyzer类方法