Package ball.util
Interface PatternMatcherBean
-
public interface PatternMatcherBean
Interface providing default methods for beans classes annotated withPatternRegexand whose methods are annotated withMatcherGroup.- Author:
- Allen D. Ball
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidinitialize(CharSequence sequence)Method to initialize fields and methods annotated withMatcherGroupwith the results of parsing thesequenceargument.default Matchermatcher(CharSequence sequence)Method to get theMatcherfor the argument input.default Patternpattern()Method to get the compiledPatternfor this annotated bean.
-
-
-
Method Detail
-
initialize
default void initialize(CharSequence sequence)
Method to initialize fields and methods annotated withMatcherGroupwith the results of parsing thesequenceargument.- Parameters:
sequence- TheCharSequenceto parse.- Throws:
IllegalArgumentException- If theCharSequencedoes not match thePatternRegex.value().
-
matcher
default Matcher matcher(CharSequence sequence)
Method to get theMatcherfor the argument input.- Parameters:
sequence- TheCharSequenceto parse.- Returns:
- The
Matcherfor thepattern()applied to theCharSequence.
-
-