SLF4J Migrator 1.7.2-redhat-1

org.slf4j.migrator.line
Class SingleConversionRule

java.lang.Object
  extended by org.slf4j.migrator.line.SingleConversionRule
All Implemented Interfaces:
ConversionRule

public class SingleConversionRule
extends Object
implements ConversionRule

This class represents a conversion rule It uses a Pattern and defines for each capturing group of this Pattern a replacement text

Author:
jean-noelcharpin

Constructor Summary
SingleConversionRule(Pattern pattern, String replacementText)
           
SingleConversionRule(Pattern pattern, String replacementText, String additionalLine)
           
 
Method Summary
 String getAdditionalLine()
          Returns a non-null value if there should be an additional line following a match of this rule.
 Pattern getPattern()
           
 String replace(Matcher matcher)
          Given replacement rules, replace each capturing group in matcher's pattern
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SingleConversionRule

public SingleConversionRule(Pattern pattern,
                            String replacementText)

SingleConversionRule

public SingleConversionRule(Pattern pattern,
                            String replacementText,
                            String additionalLine)
Method Detail

getPattern

public Pattern getPattern()
Specified by:
getPattern in interface ConversionRule

replace

public String replace(Matcher matcher)
Description copied from interface: ConversionRule
Given replacement rules, replace each capturing group in matcher's pattern

Specified by:
replace in interface ConversionRule
Returns:
String

getAdditionalLine

public String getAdditionalLine()
Description copied from interface: ConversionRule
Returns a non-null value if there should be an additional line following a match of this rule. In most cases this method returns null.

Specified by:
getAdditionalLine in interface ConversionRule
Returns:
String

SLF4J Migrator 1.7.2-redhat-1

Copyright © 2005-2013 JBoss by Red Hat. All Rights Reserved.