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

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

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

Analyzer.getProperty介绍

暂无

代码示例

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

/**
 * Answer the bundle version.
 */
public String getVersion() {
  String version = getProperty(BUNDLE_VERSION);
  if (version == null)
    version = "0.0.0";
  return version;
}

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

public String getVersionPolicy(boolean implemented) {
  if (implemented) {
    return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY);
  }
  return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY);
}

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

public String getVersionPolicy(boolean implemented) {
  if (implemented) {
    return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY);
  }
  return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY);
}

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

/**
 * Answer the bundle version.
 * 
 * @return
 */
public String getVersion() {
  String version = getProperty(BUNDLE_VERSION);
  if (version == null)
    version = "0.0.0";
  return version;
}

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

public String getVersionPolicy(boolean implemented) {
  if (implemented) {
    return getProperty(PROVIDER_POLICY, DEFAULT_PROVIDER_POLICY);
  }
  return getProperty(CONSUMER_POLICY, DEFAULT_CONSUMER_POLICY);
}

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

@Override
protected List<XMLType> getTypes(Analyzer analyzer) throws Exception {
  List<XMLType> types = new ArrayList<>();
  String header = analyzer.getProperty(Constants.BUNDLE_BLUEPRINT, "OSGI-INF/blueprint");
  process(types, "extract.xsl", header, ".*\\.xml");
  header = analyzer.getProperty("Spring-Context", "META-INF/spring");
  process(types, "extract.xsl", header, ".*\\.xml");
  return types;
}

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

/**
 * @return {@code true} if the {@code -resourceonly} instruction is set,
 *         {@code false} otherwise
 */
boolean isResourceOnly() {
  return isTrue(getProperty(RESOURCEONLY));
}

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

@Override
protected List<XMLType> getTypes(Analyzer analyzer) throws Exception {
  List<XMLType> types = new ArrayList<XMLType>();
  String header = analyzer.getProperty("Bundle-Blueprint", "OSGI-INF/blueprint");
  process(types, "extract.xsl", header, ".*\\.xml");
  header = analyzer.getProperty("Spring-Context", "META-INF/spring");
  process(types, "extract.xsl", header, ".*\\.xml");
  return types;
}

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

public MetaTypeReader(Clazz clazz, Analyzer reporter) {
  this.clazz = clazz;
  this.reporter = reporter;
  this.inherit = Processor.isTrue(reporter.getProperty("-metatype-inherit"));
}

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

Instructions getFilter() {
  if (instructions == null) {
    String contract = analyzer.getProperty(Constants.CONTRACT, "*");
    this.instructions = new Instructions(contract);
  }
  return instructions;
}

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

/**
 * @return
 */
boolean isResourceOnly() {
  return isTrue(getProperty(RESOURCEONLY));
}

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

@Override
protected List<XMLType> getTypes(Analyzer analyzer) throws Exception {
  List<XMLType> types = new ArrayList<XMLType>();
  String header = analyzer.getProperty(Constants.BUNDLE_BLUEPRINT, "OSGI-INF/blueprint");
  process(types, "extract.xsl", header, ".*\\.xml");
  header = analyzer.getProperty("Spring-Context", "META-INF/spring");
  process(types, "extract.xsl", header, ".*\\.xml");
  return types;
}

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

Instructions getFilter() {
  if (instructions == null) {
    String contract = analyzer.getProperty(Constants.CONTRACT);
    this.instructions = new Instructions(contract);
  }
  return instructions;
}

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

public MetaTypeReader(Clazz clazz, Analyzer reporter) {
  this.clazz = clazz;
  this.reporter = reporter;
  this.inherit = Processor.isTrue(reporter.getProperty("-metatype-inherit"));
}

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

/**
 * Find the source file for this type
 * 
 * @param type
 * @throws Exception
 */
public String getSourceFileFor(TypeRef type) throws Exception {
  Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src")));
  return getSourceFileFor(type, sp);
}

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

/**
 * Find the source file for this type
 * 
 * @param type
 * @throws Exception
 */
public String getSourceFileFor(TypeRef type) throws Exception {
  Set<File> sp = Collections.singleton(getFile(getProperty(DEFAULT_PROP_SRC_DIR, "src")));
  return getSourceFileFor(type, sp);
}

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

public static ComponentDef getDefinition(Clazz c, Analyzer analyzer) throws Exception {
  boolean inherit = Processor.isTrue(analyzer.getProperty("-dsannotations-inherit"));
  boolean felixExtensions = Processor.isTrue(analyzer.getProperty("-ds-felix-extensions"));
  AnnotationReader r = new AnnotationReader(analyzer, c, inherit, felixExtensions);
  return r.getDef();
}

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

static OCDDef getOCDDef(Clazz c, Analyzer analyzer) throws Exception {
   boolean inherit = Processor.isTrue(analyzer.getProperty("-metatypeannotations-inherit"));
   OCDReader r = new OCDReader(analyzer, c, inherit);
   return r.getDef();
}

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

public static ComponentDef getDefinition(Clazz c, Analyzer analyzer) throws Exception {
  boolean inherit = Processor.isTrue(analyzer.getProperty("-dsannotations-inherit"));
  AnnotationReader r = new AnnotationReader(analyzer, c, inherit);
  return r.getDef();
}

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

private static void setBundleOptions(Analyzer analyzer, ArtifactBundlerInstructions instructions) {
  analyzer.setProperty(Analyzer.BUNDLE_SYMBOLICNAME, instructions.getSymbolicNameWithOptions());
  if (analyzer.getProperty(Analyzer.BUNDLE_NAME) == null) {
    // in case name was not set in the instructions
    analyzer.setProperty(Analyzer.BUNDLE_NAME, instructions.getName());
  }
  analyzer.setProperty(Analyzer.BUNDLE_VERSION, instructions.getVersion());
  analyzer.setProperty(TOOL_KEY, TOOL);
}

相关文章

Analyzer类方法