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

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

本文整理了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

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

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

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

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

  1. public static Clause[] parseHeader(String header) throws IllegalArgumentException
  2. {
  3. Clause[] clauses = null;
  4. if (header != null)
  5. {
  6. if (header.length() == 0)
  7. {
  8. throw new IllegalArgumentException("The header cannot be an empty string.");
  9. }
  10. String[] ss = parseDelimitedString(header, ",");
  11. clauses = parseClauses(ss);
  12. }
  13. return (clauses == null) ? new Clause[0] : clauses;
  14. }

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

  1. public static Clause[] parseHeader(String header) throws IllegalArgumentException
  2. {
  3. Clause[] clauses = null;
  4. if (header != null)
  5. {
  6. if (header.length() == 0)
  7. {
  8. throw new IllegalArgumentException("The header cannot be an empty string.");
  9. }
  10. String[] ss = parseDelimitedString(header, ",");
  11. clauses = parseClauses(ss);
  12. }
  13. return (clauses == null) ? new Clause[0] : clauses;
  14. }

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

  1. public static Clause[] parseHeader(String header) throws IllegalArgumentException
  2. {
  3. Clause[] clauses = null;
  4. if (header != null)
  5. {
  6. if (header.length() == 0)
  7. {
  8. throw new IllegalArgumentException("The header cannot be an empty string.");
  9. }
  10. String[] ss = parseDelimitedString(header, ",");
  11. clauses = parseClauses(ss);
  12. }
  13. return (clauses == null) ? new Clause[0] : clauses;
  14. }

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

  1. public static Clause[] parseHeader(String header) throws IllegalArgumentException
  2. {
  3. Clause[] clauses = null;
  4. if (header != null)
  5. {
  6. if (header.length() == 0)
  7. {
  8. throw new IllegalArgumentException("The header cannot be an empty string.");
  9. }
  10. String[] ss = parseDelimitedString(header, ",");
  11. clauses = parseClauses(ss);
  12. }
  13. return (clauses == null) ? new Clause[0] : clauses;
  14. }

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

  1. public Blacklist(String blacklistUrl) {
  2. Set<String> blacklist = new HashSet<>();
  3. if (blacklistUrl != null) {
  4. try (InputStream is = new URL(blacklistUrl).openStream();
  5. BufferedReader reader = new BufferedReader(new InputStreamReader(is))) {
  6. reader.lines() //
  7. .map(String::trim) //
  8. .filter(line -> !line.isEmpty() && !line.startsWith("#"))
  9. .forEach(blacklist::add);
  10. } catch (FileNotFoundException e) {
  11. LOGGER.debug("Unable to load blacklist bundles list", e.toString());
  12. } catch (Exception e) {
  13. LOGGER.debug("Unable to load blacklist bundles list", e);
  14. }
  15. }
  16. this.clauses = Parser.parseClauses(blacklist.toArray(new String[blacklist.size()]));
  17. compileClauses();
  18. }

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

相关文章