Package ball.util
Interface PatternMatcherBean
-
public interface PatternMatcherBean
Interface providing default methods for beans classes annotated withPatternRegex
and whose methods are annotated withMatcherGroup
.- Author:
- Allen D. Ball
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
initialize(CharSequence sequence)
Method to initialize fields and methods annotated withMatcherGroup
with the results of parsing thesequence
argument.default Matcher
matcher(CharSequence sequence)
Method to get theMatcher
for the argument input.default Pattern
pattern()
Method to get the compiledPattern
for this annotated bean.
-
-
-
Method Detail
-
initialize
default void initialize(CharSequence sequence)
Method to initialize fields and methods annotated withMatcherGroup
with the results of parsing thesequence
argument.- Parameters:
sequence
- TheCharSequence
to parse.- Throws:
IllegalArgumentException
- If theCharSequence
does not match thePatternRegex.value()
.
-
matcher
default Matcher matcher(CharSequence sequence)
Method to get theMatcher
for the argument input.- Parameters:
sequence
- TheCharSequence
to parse.- Returns:
- The
Matcher
for thepattern()
applied to theCharSequence
.
-
-