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

x33g5p2x  于2022-01-22 转载在 其他  
字(4.9k)|赞(0)|评价(0)|浏览(246)

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

Jar.getManifest介绍

暂无

代码示例

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

  1. /**
  2. * Make sure we have a manifest
  3. *
  4. * @throws Exception
  5. */
  6. public void ensureManifest() throws Exception {
  7. if (getManifest() != null)
  8. return;
  9. manifest = new Manifest();
  10. }

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

  1. /**
  2. * Make sure we have a manifest
  3. *
  4. * @throws Exception
  5. */
  6. public void ensureManifest() throws Exception {
  7. if (getManifest() != null)
  8. return;
  9. manifest = new Manifest();
  10. }

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

  1. /**
  2. * Make sure we have a manifest
  3. *
  4. * @throws Exception
  5. */
  6. public void ensureManifest() throws Exception {
  7. if (getManifest() != null)
  8. return;
  9. manifest = new Manifest();
  10. }

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

  1. /**
  2. * Make sure we have a manifest
  3. *
  4. * @throws Exception
  5. */
  6. public void ensureManifest() throws Exception {
  7. if (getManifest() != null)
  8. return;
  9. manifest = new Manifest();
  10. }

代码示例来源:origin: org.apache.felix/maven-bundle-plugin

  1. private boolean isOsgi( Jar jar ) throws Exception
  2. {
  3. if ( jar.getManifest() != null )
  4. {
  5. return jar.getManifest().getMainAttributes().getValue( Analyzer.BUNDLE_NAME ) != null;
  6. }
  7. return false;
  8. }

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

  1. /**
  2. * Make sure we have a manifest
  3. *
  4. * @throws Exception
  5. */
  6. public void ensureManifest() throws Exception {
  7. if (getManifest() != null)
  8. return;
  9. manifest = new Manifest();
  10. }

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

  1. public String getVersion() throws Exception {
  2. check();
  3. Manifest m = getManifest();
  4. if (m == null)
  5. return null;
  6. String s = m.getMainAttributes().getValue(Constants.BUNDLE_VERSION);
  7. if (s == null)
  8. return null;
  9. return s.trim();
  10. }

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

  1. private Parameters getExports(Jar jar) throws Exception {
  2. Manifest m = jar.getManifest();
  3. if (m == null)
  4. return new Parameters();
  5. return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE));
  6. }

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

  1. private Parameters getExports(Jar jar) throws Exception {
  2. Manifest m = jar.getManifest();
  3. if (m == null)
  4. return new Parameters();
  5. return OSGiHeader.parseHeader(m.getMainAttributes()
  6. .getValue(Constants.EXPORT_PACKAGE));
  7. }

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

  1. private Parameters getExports(Jar jar) throws Exception {
  2. Manifest m = jar.getManifest();
  3. if (m == null)
  4. return new Parameters();
  5. return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE));
  6. }

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

  1. private Parameters getExports(Jar jar) throws Exception {
  2. Manifest m = jar.getManifest();
  3. if (m == null)
  4. return new Parameters();
  5. return OSGiHeader.parseHeader(m.getMainAttributes().getValue(Constants.EXPORT_PACKAGE));
  6. }

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

  1. public Analyzer(Jar jar) throws Exception {
  2. super();
  3. this.dot = Objects.requireNonNull(jar);
  4. Manifest manifest = dot.getManifest();
  5. if (manifest != null)
  6. copyFrom(Domain.domain(manifest));
  7. }

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

  1. public Verifier(Analyzer analyzer) throws Exception {
  2. super(analyzer);
  3. this.analyzer = analyzer;
  4. this.dot = analyzer.getJar();
  5. this.manifest = dot.getManifest();
  6. this.main = Domain.domain(manifest);
  7. }

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

  1. /**
  2. * Cleanup the manifest for writing. Cleaning up consists of adding a space
  3. * after any \n to prevent the manifest to see this newline as a delimiter.
  4. *
  5. * @param out
  6. * Output
  7. * @throws IOException
  8. */
  9. public void writeManifest(OutputStream out) throws Exception {
  10. check();
  11. writeManifest(getManifest(), out);
  12. }

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

  1. public Verifier(Analyzer analyzer) throws Exception {
  2. this.analyzer = analyzer;
  3. this.dot = analyzer.getJar();
  4. this.manifest = dot.getManifest();
  5. this.main = Domain.domain(manifest);
  6. }

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

  1. public Verifier(Analyzer analyzer) throws Exception {
  2. super(analyzer);
  3. this.analyzer = analyzer;
  4. this.dot = analyzer.getJar();
  5. this.manifest = dot.getManifest();
  6. this.main = Domain.domain(manifest);
  7. }

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

  1. /**
  2. * Cleanup the manifest for writing. Cleaning up consists of adding a space
  3. * after any \n to prevent the manifest to see this newline as a delimiter.
  4. *
  5. * @param out
  6. * Output
  7. * @throws IOException
  8. */
  9. public void writeManifest(OutputStream out) throws Exception {
  10. check();
  11. writeManifest(getManifest(), out);
  12. }

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

  1. /**
  2. * Cleanup the manifest for writing. Cleaning up consists of adding a space
  3. * after any \n to prevent the manifest to see this newline as a delimiter.
  4. *
  5. * @param out
  6. * Output
  7. * @throws IOException
  8. */
  9. public void writeManifest(OutputStream out) throws Exception {
  10. check();
  11. writeManifest(getManifest(), out);
  12. }

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

  1. /**
  2. * Cleanup the manifest for writing. Cleaning up consists of adding a space
  3. * after any \n to prevent the manifest to see this newline as a delimiter.
  4. *
  5. * @param out Output
  6. * @throws IOException
  7. */
  8. public void writeManifest(OutputStream out) throws Exception {
  9. check();
  10. stripSignatures();
  11. writeManifest(getManifest(), out);
  12. }

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

  1. @Test
  2. public void isBundle_emptyManifest() throws Exception {
  3. // given
  4. Jar jar = mock(Jar.class, Mockito.RETURNS_DEEP_STUBS);
  5. when(jar.getManifest().getMainAttributes()).thenReturn(null);
  6. // when
  7. boolean isBundle = utils.isBundle(jar);
  8. // then
  9. assertFalse(isBundle);
  10. }

相关文章