aQute.libg.glob.Glob.toPattern()方法的使用及代码示例

x33g5p2x  于2022-01-20 转载在 其他  
字(4.6k)|赞(0)|评价(0)|浏览(124)

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

Glob.toPattern介绍

暂无

代码示例

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

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

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

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

代码示例来源:origin: org.osgi/osgi.enroute.web.simple.provider

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

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

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

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

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

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

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

代码示例来源:origin: org.osgi/osgi.enroute.configurer.simple.provider

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

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

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

代码示例来源:origin: org.osgi/osgi.enroute.rest.simple.provider

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.bundle

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

代码示例来源:origin: org.apache.aries.spifly/org.apache.aries.spifly.dynamic.framework.extension

public static Pattern toPattern(String s) {
  return toPattern(s, 0);
}

代码示例来源:origin: org.osgi/osgi.enroute.authorization.simple.provider

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

代码示例来源:origin: org.osgi/osgi.enroute.logger.simple.provider

public static Pattern toPattern(String s) {
  return toPattern(s,0);
}

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

public String _glob(String[] args) {
  verifyCommand(args, _globHelp, null, 2, 2);
  String glob = args[1];
  boolean negate = false;
  if (glob.startsWith("!")) {
    glob = glob.substring(1);
    negate = true;
  }
  Pattern pattern = Glob.toPattern(glob);
  if (negate)
    return "(?!" + pattern.pattern() + ")";
  else
    return pattern.pattern();
}

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

public String _glob(String[] args) {
  verifyCommand(args, _globHelp, null, 2, 2);
  String glob = args[1];
  boolean negate = false;
  if (glob.startsWith("!")) {
    glob = glob.substring(1);
    negate = true;
  }
  Pattern pattern = Glob.toPattern(glob);
  if (negate)
    return "(?!" + pattern.pattern() + ")";
  else
    return pattern.pattern();
}

代码示例来源:origin: org.osgi/osgi.enroute.logger.simple.provider

@Override
public List<Info> list(String glob) throws Exception {
  final List<Info> infos = new ArrayList<>();
  final Pattern p = glob == null ? null : Glob.toPattern(glob);
  ;
  LoggerDispatcher.dispatcher.evaluate(new Eval() {
    @Override
    public void eval(AbstractLogger msf) {
      if (p == null || p.matcher(msf.name).find()) {
        Info info = new Info();
        info.bundleId = msf.bundle.getBundleId();
        info.level = msf.level;
        info.name = msf.name;
        infos.add(info);
      }
    }
  });
  return infos;
}

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

protected RepoFilter parseRepoFilter(Map<String, String> attrs) {
  if (attrs == null)
    return null;
  String patternStr = attrs.get("repo");
  if (patternStr == null)
    return null;
  List<Pattern> patterns = new LinkedList<>();
  QuotedTokenizer tokenize = new QuotedTokenizer(patternStr, ",");
  String token = tokenize.nextToken();
  while (token != null) {
    patterns.add(Glob.toPattern(token));
    token = tokenize.nextToken();
  }
  return new RepoFilter(patterns.toArray(new Pattern[0]));
}

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

match = s;
matchFlags = flags;
pattern = Glob.toPattern(match, matchFlags);

代码示例来源:origin: org.osgi/osgi.enroute.logger.simple.provider

@Override
public void setSettings(Settings settings) throws Exception {
  Map<Pattern, Control> controls = new HashMap<>();
  for (Control c : settings.controls) {
    try {
      Pattern p = Glob.toPattern(c.pattern);
      controls.put(p, c);
    } catch (Exception ee) {
      error("Invalid filter " + c.pattern, ee);
      return;
    }
  }
  synchronized (this.controls) {
    this.controls.clear();
    this.controls.putAll(controls);
  }
  LoggerDispatcher.dispatcher.evaluate(this);
  if (javaUtilLogging != null) {
    javaUtilLogging.update(controls);
  }
}

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

protected RepoFilter parseRepoFilter(Map<String, String> attrs) {
  if (attrs == null)
    return null;
  String patternStr = attrs.get("repo");
  if (patternStr == null)
    return null;
  List<Pattern> patterns = new LinkedList<>();
  QuotedTokenizer tokenize = new QuotedTokenizer(patternStr, ",");
  String token = tokenize.nextToken();
  while (token != null) {
    patterns.add(Glob.toPattern(token));
    token = tokenize.nextToken();
  }
  return new RepoFilter(patterns.toArray(new Pattern[0]));
}

相关文章