org.apache.felix.utils.manifest.Parser.parseClauses()方法的使用及代码示例

x33g5p2x  于2022-01-26 转载在 其他  
字(5.7k)|赞(0)|评价(0)|浏览(135)

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

Parser.parseClauses介绍

暂无

代码示例

代码示例来源:origin: apache/karaf

public static String extractUrl(String override) {
  Clause[] cs = Parser.parseClauses(new String[]{override});
  if (cs.length != 1) {
    throw new IllegalStateException("Override contains more than one clause: " + override);
  }
  return cs[0].getName();
}

代码示例来源:origin: apache/karaf

public Blacklist(List<String> blacklist) {
  this.clauses = Parser.parseClauses(blacklist.toArray(new String[blacklist.size()]));
  compileClauses();
}

代码示例来源:origin: org.everit.osgi.bundles/org.everit.osgi.bundles.org.apache.felix.utils

public static Clause[] parseHeader(String header) throws IllegalArgumentException
{
  Clause[] clauses = null;
  if (header != null)
  {
    if (header.length() == 0)
    {
      throw new IllegalArgumentException("The header cannot be an empty string.");
    }
    String[] ss = parseDelimitedString(header, ",");
    clauses = parseClauses(ss);
  }
  return (clauses == null) ? new Clause[0] : clauses;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.utils

public static Clause[] parseHeader(String header) throws IllegalArgumentException
{
  Clause[] clauses = null;
  if (header != null)
  {
    if (header.length() == 0)
    {
      throw new IllegalArgumentException("The header cannot be an empty string.");
    }
    String[] ss = parseDelimitedString(header, ",");
    clauses = parseClauses(ss);
  }
  return (clauses == null) ? new Clause[0] : clauses;
}

代码示例来源:origin: org.apache.felix/org.apache.felix.fileinstall

public static Clause[] parseHeader(String header) throws IllegalArgumentException
{
  Clause[] clauses = null;
  if (header != null)
  {
    if (header.length() == 0)
    {
      throw new IllegalArgumentException("The header cannot be an empty string.");
    }
    String[] ss = parseDelimitedString(header, ",");
    clauses = parseClauses(ss);
  }
  return (clauses == null) ? new Clause[0] : clauses;
}

代码示例来源:origin: apache/felix

public static Clause[] parseHeader(String header) throws IllegalArgumentException
{
  Clause[] clauses = null;
  if (header != null)
  {
    if (header.length() == 0)
    {
      throw new IllegalArgumentException("The header cannot be an empty string.");
    }
    String[] ss = parseDelimitedString(header, ",");
    clauses = parseClauses(ss);
  }
  return (clauses == null) ? new Clause[0] : clauses;
}

代码示例来源:origin: apache/karaf

public Blacklist(String blacklistUrl) {
  Set<String> blacklist = new HashSet<>();
  if (blacklistUrl != null) {
    try (InputStream is = new URL(blacklistUrl).openStream();
      BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
      reader.lines() //
        .map(String::trim) //
        .filter(line -> !line.isEmpty() && !line.startsWith("#"))
        .forEach(blacklist::add);
    } catch (FileNotFoundException e) {
      LOGGER.debug("Unable to load blacklist bundles list", e.toString());
    } catch (Exception e) {
      LOGGER.debug("Unable to load blacklist bundles list", e);
    }
  }
  this.clauses = Parser.parseClauses(blacklist.toArray(new String[blacklist.size()]));
  compileClauses();
}

代码示例来源:origin: apache/karaf

public static <T extends Resource> void override(Map<String, T> resources, Collection<String> overrides) {
  for (Clause override : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) {
    String overrideRange = override.getAttribute(OVERRIDE_RANGE);
    T over = resources.get(override.getName());

代码示例来源:origin: apache/karaf

List<BundleReplacements.OverrideBundle> result = new LinkedList<>();
for (Clause clause : Parser.parseClauses(overrides.toArray(new String[overrides.size()]))) {

代码示例来源:origin: apache/karaf

versionString = originalId.substring(originalId.indexOf("/") + 1);
} else if (originalId.contains(";")) {
  Clause[] c = org.apache.felix.utils.manifest.Parser.parseClauses(new String[] { originalId });
  nameString = c[0].getName();
  versionString = c[0].getAttribute(RANGE);

代码示例来源:origin: apache/karaf

void downloadLibraries(Downloader downloader, final Properties config, Collection<String> libraries, String indent) throws MalformedURLException {
  Clause[] clauses = org.apache.felix.utils.manifest.Parser.parseClauses(libraries.toArray(new String[libraries.size()]));
  for (final Clause clause : clauses) {
    final String filename;

代码示例来源:origin: org.apache.karaf.profile/org.apache.karaf.profile.core

void downloadLibraries(Downloader downloader, final Properties config, Collection<String> libraries, String indent) throws MalformedURLException {
  Clause[] clauses = org.apache.felix.utils.manifest.Parser.parseClauses(libraries.toArray(new String[libraries.size()]));
  for (final Clause clause : clauses) {
    final String filename;

代码示例来源:origin: apache/karaf

for (Clause bundle : Parser.parseClauses(this.bundles.toArray(new String[this.bundles.size()]))) {
  final String loc = bundle.getName();
  downloader.download(loc, provider -> {
for (Clause bundle : Parser.parseClauses(this.bundles.toArray(new String[this.bundles.size()]))) {
  final String loc = bundle.getName();
  boolean dependency = Boolean.parseBoolean(bundle.getAttribute("dependency"));

代码示例来源:origin: org.everit.persistence/org.everit.persistence.liquibase.ext.osgi

Clause[] clauses = Parser.parseClauses(new String[] { schemaExpression });
if (clauses.length != 1) {
 throw new SchemaExpressionSyntaxException(

代码示例来源:origin: org.everit.osgi/org.everit.osgi.liquibase.bundle

public static Filter createFilterForLiquibaseCapabilityAttributes(final String schemaExpression) {
  Clause[] clauses = Parser.parseClauses(new String[] { schemaExpression });
  if (clauses.length != 1) {
    throw new SchemaExpressionSyntaxException("The number of Clauses in the Schema expression should be 1");

代码示例来源:origin: org.everit.osgi/org.everit.osgi.ecm.component.ri

Clause[] clauses = Parser.parseClauses(new String[] { requirementString });
if (clauses != null) {
 fillAttributesOfRequirementFromClause(attributes, clauses[0]);

相关文章

微信公众号

最新文章

更多