当前位置: 首页>>代码示例>>Java>>正文


Java Regex类代码示例

本文整理汇总了Java中scala.util.matching.Regex的典型用法代码示例。如果您正苦于以下问题:Java Regex类的具体用法?Java Regex怎么用?Java Regex使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Regex类属于scala.util.matching包,在下文中一共展示了Regex类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: start

import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
  Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
  @SuppressWarnings("deprecation")
  AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
      this.mPort,
      20,
      List$.MODULE$.<StatsFactory>empty(),
      Option.<String>empty(),
      List$.MODULE$.<Regex>empty(),
      Map$.MODULE$.<String, CustomHttpHandler>empty(),
      List.<Duration>fromArray(defaultLatchIntervals));
  RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
  AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
  for (Map.Entry<String, CustomHttpHandler> entry : this.mCustomHttpHandlerMap.entrySet()) {
    service.httpServer().createContext(entry.getKey(), entry.getValue());
  }
}
 
开发者ID:pinterest-attic,项目名称:pinlater,代码行数:18,代码来源:OstrichAdminService.java

示例2: start

import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
  Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
  @SuppressWarnings("deprecation")
  AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
      this.mPort,
      20,
      List$.MODULE$.<StatsFactory>empty(),
      Option.<String>empty(),
      List$.MODULE$.<Regex>empty(),
      Map$.MODULE$.<String, CustomHttpHandler>empty(),
      List.<Duration>fromArray(defaultLatchIntervals));
  RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
  AdminHttpService service = adminServiceFactory.apply(runtimeEnvironment);
  for (Map.Entry<String, CustomHttpHandler> entry: this.mCustomHttpHandlerMap.entrySet()) {
    service.httpServer().createContext(entry.getKey(), entry.getValue());
  }
}
 
开发者ID:pinterest-attic,项目名称:terrapin,代码行数:18,代码来源:OstrichAdminService.java

示例3: start

import scala.util.matching.Regex; //导入依赖的package包/类
public void start() {
    Duration[] defaultLatchIntervals = {Duration.apply(1, TimeUnit.MINUTES)};
    @SuppressWarnings("deprecation")
    AdminServiceFactory adminServiceFactory = new AdminServiceFactory(
        this.mPort,
        20,
        List$.MODULE$.<StatsFactory>empty(),
        Option.<String>empty(),
        List$.MODULE$.<Regex>empty(),
        Map$.MODULE$.<String, CustomHttpHandler>empty(),
        List.<Duration>fromArray(defaultLatchIntervals)
    );
    RuntimeEnvironment runtimeEnvironment = new RuntimeEnvironment(this);
    adminServiceFactory.apply(runtimeEnvironment);
    try {
        Properties properties = new Properties();
        properties.load(this.getClass().getResource("build.properties").openStream());
        String buildRevision = properties.getProperty("build_revision", "unknown");
        LOG.info("build.properties build_revision: {}",
                 properties.getProperty("build_revision", "unknown"));
        StatsUtil.setLabel("secor.build_revision", buildRevision);
    } catch (Throwable t) {
        LOG.error("Failed to load properties from build.properties", t);
    }
}
 
开发者ID:pinterest,项目名称:secor,代码行数:26,代码来源:OstrichAdminService.java


注:本文中的scala.util.matching.Regex类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。