Examples of pattern()


Examples of org.bigtesting.routd.RegexRoute.pattern()

   
    @Test
    public void pattern_WithController_WithAction_WithMultiRegexParamPath() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", "clients/:id<[0-9]+>/:name"));
        String expected = "^/cntrl/actn/clients/([0-9]+)/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
   
    @Test
    public void pattern_WithController_WithAction_WithRegexSymbols() {
View Full Code Here

Examples of org.bigtesting.routd.RegexRoute.pattern()

   
    @Test
    public void pattern_WithController_WithAction_WithRegexSymbols() {
        RegexRoute r = new RegexRoute(new MojaveRoute("cntrl", "actn", "a+b/:id<[0-9]+>/:name"));
        String expected = "^/cntrl/actn/a\\+b/([0-9]+)/([^/]+)$";
        String actual = r.pattern().toString();
        assertEquals(expected, actual);
    }
}
View Full Code Here

Examples of org.conventionsframework.qualifier.DateFormat.pattern()

    @Produces
    @DateFormat
    public SimpleDateFormat getDateFormat(InjectionPoint ip){
        DateFormat df = ip.getAnnotated().getAnnotation(DateFormat.class);
        String pattern = df.pattern();
        if(dateFormatCache.containsKey(pattern)){
            return dateFormatCache.get(pattern);
        }
        SimpleDateFormat sdf = new SimpleDateFormat(df.pattern());
        dateFormatCache.put(pattern,sdf);
View Full Code Here

Examples of org.gwtwidgets.client.util.regex.Pattern.pattern()

    String[] parts = regExp.match(test);
    _assert(parts[1].equals("05"));
    _assert(parts[2].equals("10"));
    _assert(parts[3].equals("1977"));
    GWT.log("Patter.pattern()", null);
    _assert(regExp.pattern().equals(pattern));
   
    GWT.log("Patter.split(String)", null);
    regExp = new Pattern("-");
    parts = regExp.split(test);
    _assert(parts[0].equals("05"));
View Full Code Here

Examples of org.jfrog.build.api.builder.dependency.BuildPatternArtifactsRequestBuilder.pattern()

            for (String buildNumber : buildNumbers.keySet()) {
                List<BuildDependencyPattern> buildDependencyPatterns = buildNumbers.get(buildNumber);
                BuildPatternArtifactsRequestBuilder builder = new BuildPatternArtifactsRequestBuilder()
                        .buildName(buildName).buildNumber(buildNumber);
                for (BuildDependencyPattern buildDependencyPattern : buildDependencyPatterns) {
                    builder.pattern(buildDependencyPattern.getPattern());
                }
                artifactsRequests.add(builder.build());
            }
        }
View Full Code Here

Examples of org.kitesdk.morphline.shaded.com.google.code.regexp.Pattern.pattern()

      GrokDictionaries dict = new GrokDictionaries(config, getConfigs());
      String replacementStr = getConfigs().getString(config, "replacement");
      String pattern = getConfigs().getString(config, "pattern");
      if (getConfigs().getBoolean(config, "isRegex", false)) {
        Pattern regex = dict.compileExpression(pattern);
        this.matcher = regex.pattern().matcher("");
        replacementStr = regex.replaceProperties(replacementStr);
        this.literalPattern = null;
      } else {
        this.matcher = null;
        this.literalPattern = pattern;
View Full Code Here

Examples of org.springframework.security.oauth2.provider.ServerRunning.UriBuilder.pattern()

      uri.queryParam("client_id", clientId);
    }
    if (redirectUri != null) {
      uri.queryParam("redirect_uri", redirectUri);
    }
    ResponseEntity<String> response = serverRunning.getForString(uri.pattern(), headers, uri.params());
    assertEquals(HttpStatus.FOUND, response.getStatusCode());
    String location = response.getHeaders().getLocation().toString();
    assertTrue(location.startsWith("http://anywhere"));
    assertTrue(location.contains("error=invalid_scope"));
    assertFalse(location.contains("redirect_uri="));
View Full Code Here

Examples of org.strecks.converter.annotation.ConvertDate.pattern()

{

  public Converter createConverter(Annotation annotation)
  {
    ConvertDate annot = (ConvertDate) annotation;
    DatePatternConverter converter = new DatePatternConverter(annot.pattern());
    converter.setTargetClass(Date.class);
    return converter;
  }

}
View Full Code Here

Examples of org.strecks.validator.annotation.ValidatePattern.pattern()

{

  public ValidatorWrapper create(Annotation annot, Method method)
  {
    ValidatePattern annotation = (ValidatePattern) annot;
    PatternValidator validator = new PatternValidator(annotation.pattern());
    List<Object> parameters = new ArrayList<Object>();
    parameters.add(annotation.pattern());
    return create(validator, annotation.key(), annotation.order(), parameters, method);
  }
View Full Code Here

Examples of org.strecks.validator.annotation.ValidatePattern.pattern()

  public ValidatorWrapper create(Annotation annot, Method method)
  {
    ValidatePattern annotation = (ValidatePattern) annot;
    PatternValidator validator = new PatternValidator(annotation.pattern());
    List<Object> parameters = new ArrayList<Object>();
    parameters.add(annotation.pattern());
    return create(validator, annotation.key(), annotation.order(), parameters, method);
  }

}
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.