public String processIfMatches ( final I input ) { String uriAsString = input . getUri ( ) ; String text = input . getTextToProcess ( ) ; Matcher m = patternImpl . matcher ( uriAsString ) ; if ( ! m . find ( ) ) { if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . fine ( "Rule " + getClass ( ) . getSimpleName ( ) + ": skipped " + uriAsString ) ; } return text ; } String result = new String ( text ) ; for ( PatternBasedTextProcessor proc : processors ) { result = proc . process ( result ) ; } if ( LOGGER . isLoggable ( Level . FINE ) ) { LOGGER . fine ( "Rule " + getClass ( ) . getSimpleName ( ) + ": processed " + uriAsString ) ; } return result ; }
Processes the given URI if it matches the configured pattern .