/** * Initializes this mapping with the regular expression used to map header * names and the {@link BeanField} they should be mapped to. * * @param pattern A valid regular expression against which potential header * names are matched * @param field The {@link BeanField} this mapping maps to * @param errorLocale The locale for error messages */ public RegexToBeanField(final String pattern, final BeanField<T> field, final Locale errorLocale) { super(field, errorLocale); regex = OpencsvUtils.compilePattern(pattern, Pattern.CASE_INSENSITIVE, BeanFieldJoin.class, this.errorLocale); }
this.splitOn = OpencsvUtils.compilePattern(splitOn, 0, BeanFieldSplit.class, this.errorLocale); this.capture = OpencsvUtils.compilePatternAtLeastOneGroup(capture, 0,
Pattern tempPattern = compilePattern(regex, regexFlags, callingClass, errorLocale); errorLocale = errorLocale == null ? Locale.getDefault() : errorLocale;