Matcher
Code IndexAdd Codota to your IDE (free)

Best code snippets using ch.qos.logback.core.boolex.Matcher(Showing top 13 results out of 315)

origin: ch.qos.logback/logback-classic

protected String[] getParameterNames() {
  List<String> fullNameList = new ArrayList<String>();
  fullNameList.addAll(DEFAULT_PARAM_NAME_LIST);
  for (int i = 0; i < matcherList.size(); i++) {
    Matcher m = (Matcher) matcherList.get(i);
    fullNameList.add(m.getName());
  }
  return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
origin: ch.qos.logback/logback-classic

public JaninoEventEvaluatorTest() {
  jee.setContext(loggerContext);
  matcherX.setName("x");
  matcherX.setRegex("^Some\\s.*");
  matcherX.start();
}
origin: ch.qos.logback/logback-core

public void testFullRegion() throws Exception {
  matcher.setRegex(".*test.*");
  matcher.start();
  assertTrue(matcher.matches("test"));
  assertTrue(matcher.matches("xxxxtest"));
  assertTrue(matcher.matches("testxxxx"));
  assertTrue(matcher.matches("xxxxtestxxxx"));
}
origin: ch.qos.logback/logback-core

public void setUp() throws Exception {
  context = new ContextBase();
  matcher = new Matcher();
  matcher.setContext(context);
  matcher.setName("testMatcher");
  super.setUp();
}
origin: ch.qos.logback/logback-core

  public void testCaseSensitive() throws Exception {
    matcher.setRegex("test");
    matcher.setCaseSensitive(true);
    matcher.start();

    assertFalse(matcher.matches("TEST"));
    assertFalse(matcher.matches("tEst"));
    assertFalse(matcher.matches("tESt"));
    assertFalse(matcher.matches("TesT"));
  }
}
origin: ch.qos.logback/logback-core

public void start() {
  if (name == null) {
    addError("All Matcher objects must be named");
    return;
  }
  try {
    int code = 0;
    if (!caseSensitive) {
      code |= Pattern.CASE_INSENSITIVE;
    }
    if (canonEq) {
      code |= Pattern.CANON_EQ;
    }
    if (unicodeCase) {
      code |= Pattern.UNICODE_CASE;
    }
    // code |= Pattern.DOTALL;
    pattern = Pattern.compile(regex, code);
    start = true;
  } catch (PatternSyntaxException pse) {
    addError("Failed to compile regex [" + regex + "]", pse);
  }
}
origin: ch.qos.logback/logback-core

public void testCaseInsensitive() throws Exception {
  matcher.setRegex("test");
  matcher.setCaseSensitive(false);
  matcher.start();
  assertTrue(matcher.matches("TEST"));
  assertTrue(matcher.matches("tEst"));
  assertTrue(matcher.matches("tESt"));
  assertTrue(matcher.matches("TesT"));
}
origin: ch.qos.logback/logback-core

public void testPartRegion() throws Exception {
  matcher.setRegex("test");
  matcher.start();
  assertTrue(matcher.matches("test"));
  assertTrue(matcher.matches("xxxxtest"));
  assertTrue(matcher.matches("testxxxx"));
  assertTrue(matcher.matches("xxxxtestxxxx"));
}
origin: intuit/wasabi

protected String[] getParameterNames() {
 List<String> fullNameList = new ArrayList<String>();
 fullNameList.addAll(DEFAULT_PARAM_NAME_LIST);
 for (int i = 0; i < matcherList.size(); i++) {
  Matcher m = (Matcher) matcherList.get(i);
  fullNameList.add(m.getName());
 }
 return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
origin: intuit/wasabi

protected String[] getParameterNames() {
 List<String> fullNameList = new ArrayList<String>();
 fullNameList.addAll(DEFAULT_PARAM_NAME_LIST);
 for (int i = 0; i < matcherList.size(); i++) {
  Matcher m = (Matcher) matcherList.get(i);
  fullNameList.add(m.getName());
 }
 return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
origin: Nextdoor/bender

protected String[] getParameterNames() {
  List<String> fullNameList = new ArrayList<String>();
  fullNameList.addAll(DEFAULT_PARAM_NAME_LIST);
  for (int i = 0; i < matcherList.size(); i++) {
    Matcher m = (Matcher) matcherList.get(i);
    fullNameList.add(m.getName());
  }
  return (String[]) fullNameList.toArray(CoreConstants.EMPTY_STRING_ARRAY);
}
origin: intuit/wasabi

public void start() {
 if(name ==  null) {
  addError("All Matcher objects must be named");
  return;
 }
 try {
  int code = 0;
  if(!caseSensitive) {
   code |= Pattern.CASE_INSENSITIVE; 
  }
  if(canonEq) {
   code |= Pattern.CANON_EQ;
  }
  if(unicodeCase) {
   code |= Pattern.UNICODE_CASE; 
  }
  
  //code |= Pattern.DOTALL;
  
  pattern = Pattern.compile(regex, code);
  start = true;
 } catch (PatternSyntaxException pse) {
  addError("Failed to compile regex [" + regex + "]", pse);
 }
}
origin: Nextdoor/bender

public void start() {
  if (name == null) {
    addError("All Matcher objects must be named");
    return;
  }
  try {
    int code = 0;
    if (!caseSensitive) {
      code |= Pattern.CASE_INSENSITIVE;
    }
    if (canonEq) {
      code |= Pattern.CANON_EQ;
    }
    if (unicodeCase) {
      code |= Pattern.UNICODE_CASE;
    }
    // code |= Pattern.DOTALL;
    pattern = Pattern.compile(regex, code);
    start = true;
  } catch (PatternSyntaxException pse) {
    addError("Failed to compile regex [" + regex + "]", pse);
  }
}
ch.qos.logback.core.boolexMatcher

Most used methods

  • addError
  • getName
  • setName
  • setRegex
  • start
  • <init>
  • matches
    Checks whether the input matches the regular expression.
  • setCaseSensitive
  • setContext

Popular classes and methods

  • getApplicationContext (Context)
  • requestLocationUpdates (LocationManager)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Date (java.sql)
    A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
  • Locale (java.util)
    Locale represents a language/country/variant combination. Locales are used to alter the presentatio
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeMap (java.util)
    A map whose entries are sorted by their keys. All optional operations such as #put and #remove are s
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i

For IntelliJ IDEA and
Android Studio

  • Codota IntelliJ IDEA pluginCodota Android Studio pluginCode IndexSign in
  • EnterpriseFAQAboutContact Us
  • Terms of usePrivacy policyCodeboxFind Usages
Add Codota to your IDE (free)