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

x33g5p2x  于2022-01-17 转载在 其他  
字(7.5k)|赞(0)|评价(0)|浏览(182)

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

Builder.getProperty介绍

暂无

代码示例

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

/**
 * Allow any local initialization by subclasses before we build.
 */
public void init() throws Exception {
  begin();
  doRequireBnd();
  // Check if we have sensible setup
  if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null
    || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null))
    warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE
      + " can only expand from the classpath when there is one");
}

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

/**
 * Allow any local initialization by subclasses before we build.
 */
public void init() throws Exception {
  begin();
  doRequireBnd();
  // Check if we have sensible setup
  if (getClasspath().size() == 0
      && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null))
    warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one");
}

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

/**
 * Allow any local initialization by subclasses before we build.
 */
public void init() throws Exception {
  begin();
  doRequireBnd();
  // Check if we have sensible setup
  if (getClasspath().size() == 0 && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null
    || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null))
    warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE
      + " can only expand from the classpath when there is one");
}

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

/**
 * Allow any local initialization by subclasses before we build.
 */
public void init() throws Exception {
  begin();
  doRequireBnd();
  // Check if we have sensible setup
  if (getClasspath().size() == 0
      && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null || getProperty(PRIVATEPACKAGE) != null))
    warning("Classpath is empty. " + Constants.PRIVATE_PACKAGE + " (-privatepackage) and " + EXPORT_PACKAGE + " can only expand from the classpath when there is one");
}

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

public boolean hasSources() {
  return isTrue(getProperty(SOURCES));
}

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

public boolean hasSources() {
  return isTrue(getProperty(SOURCES));
}

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

public boolean hasSources() {
  return isTrue(getProperty(SOURCES));
}

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

public Pattern getDoNotCopy() {
  if (xdoNotCopy == null) {
    String string = null;
    try {
      string = getProperty(DONOTCOPY, DEFAULT_DO_NOT_COPY);
      xdoNotCopy = Pattern.compile(string);
    }
    catch (Exception e) {
      error("Invalid value for %s, value is %s", DONOTCOPY, string);
      xdoNotCopy = Pattern.compile(DEFAULT_DO_NOT_COPY);
    }
  }
  return xdoNotCopy;
}

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

public boolean hasSources() {
  return isTrue(getProperty(SOURCES));
}

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

/**
 * Allow any local initialization by subclasses before we build.
 */
public void init() throws Exception {
  begin();
  doRequireBnd();
  // Check if we have sensible setup
  if (getClasspath().size() == 0
      && (getProperty(EXPORT_PACKAGE) != null || getProperty(EXPORT_PACKAGE) != null || getProperty(PRIVATE_PACKAGE) != null))
    warning("Classpath is empty. Private-Package and Export-Package can only expand from the classpath when there is one");
}

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

private Instructions getPreProcessMatcher(Map<String,String> extra) {
  if (defaultPreProcessMatcher == null) {
    defaultPreProcessMatcher = new Instructions(getProperty(PREPROCESSMATCHERS,
        Constants.DEFAULT_PREPROCESSS_MATCHERS));
  }
  if (extra == null)
    return defaultPreProcessMatcher;
  String additionalMatchers = extra.get(PREPROCESSMATCHERS);
  if (additionalMatchers == null)
    return defaultPreProcessMatcher;
  Instructions specialMatcher = new Instructions(additionalMatchers);
  specialMatcher.putAll(defaultPreProcessMatcher);
  return specialMatcher;
}

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

Map<Instruction,Map<String,String>> getMakeHeader() {
    if (make != null)
      return make;
    make = Processor.newMap();

    String s = builder.getProperty(Builder.MAKE);
    Parameters make = builder.parseHeader(s);

    for (Entry<String,Attrs> entry : make.entrySet()) {
      String pattern = Processor.removeDuplicateMarker(entry.getKey());

      Instruction instr = new Instruction(pattern);
      this.make.put(instr, entry.getValue());
    }

    return this.make;
  }
}

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

Map<Instruction,Map<String,String>> getMakeHeader() {
    if (make != null)
      return make;
    make = Processor.newMap();

    String s = builder.getProperty(Builder.MAKE);
    Parameters make = builder.parseHeader(s);

    for (Entry<String,Attrs> entry : make.entrySet()) {
      String pattern = Processor.removeDuplicateMarker(entry.getKey());

      Instruction instr = new Instruction(pattern);
      this.make.put(instr, entry.getValue());
    }

    return this.make;
  }
}

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

Map<Instruction,Map<String,String>> getMakeHeader() {
    if (make != null)
      return make;
    make = Processor.newMap();

    String s = builder.getProperty(Builder.MAKE);
    Parameters make = builder.parseHeader(s);

    for (Entry<String,Attrs> entry : make.entrySet()) {
      String pattern = Processor.removeDuplicateMarker(entry.getKey());

      Instruction instr = new Instruction(pattern);
      this.make.put(instr, entry.getValue());
    }

    return this.make;
  }
}

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

private void copy(Jar jar, String path, Resource resource, Map<String, String> extra) {
  jar.putResource(path, resource);
  if (isTrue(extra.get(LIB_DIRECTIVE))) {
    setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH, "."), path));
  }
}

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

private void copy(Jar jar, String path, Resource resource, Map<String, String> extra) {
  jar.putResource(path, resource);
  if (isTrue(extra.get(LIB_DIRECTIVE))) {
    setProperty(BUNDLE_CLASSPATH, append(getProperty(BUNDLE_CLASSPATH, "."), path));
  }
}

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

/**
 * Check if we need to calculate any checksums.
 * 
 * @param dot
 * @throws Exception
 */
private void doDigests(Jar dot) throws Exception {
  Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS));
  if (ps.isEmpty())
    return;
  trace("digests %s", ps);
  String[] digests = ps.keySet().toArray(new String[ps.size()]);
  dot.setDigestAlgorithms(digests);
}

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

/**
 * Check if we need to calculate any checksums.
 *
 * @param dot
 * @throws Exception
 */
private void doDigests(Jar dot) throws Exception {
  Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS));
  if (ps.isEmpty())
    return;
  trace("digests %s", ps);
  String[] digests = ps.keySet().toArray(new String[ps.size()]);
  dot.setDigestAlgorithms(digests);
}

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

/**
 * Check if we need to calculate any checksums.
 *
 * @param dot
 * @throws Exception
 */
private void doDigests(Jar dot) throws Exception {
  Parameters ps = OSGiHeader.parseHeader(getProperty(DIGESTS));
  if (ps.isEmpty())
    return;
  trace("digests %s", ps);
  String[] digests = ps.keySet().toArray(new String[ps.size()]);
  dot.setDigestAlgorithms(digests);
}

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

/**
 * Intercept the call to analyze and cleanup versions after we have analyzed
 * the setup. We do not want to cleanup if we are going to verify.
 */
@Override
public void analyze() throws Exception {
  super.analyze();
  cleanupVersion(getImports(), null);
  cleanupVersion(getExports(), getVersion());
  String version = getProperty(BUNDLE_VERSION);
  if (version != null) {
    version = cleanupVersion(version);
    version = doSnapshot(version);
    setProperty(BUNDLE_VERSION, version);
  }
}

相关文章

微信公众号

最新文章

更多

Builder类方法