org.sonar.duplications.token
Class TokenChunker.Builder

java.lang.Object
  extended by org.sonar.duplications.token.TokenChunker.Builder
Enclosing class:
TokenChunker

public static final class TokenChunker.Builder
extends Object

Note that order is important, e.g. token("A").ignore("A") for the input string "A" will produce token, whereas ignore("A").token("A") will not.


Method Summary
 TokenChunker build()
           
 TokenChunker.Builder ignore(String regularExpression)
          Defines that sequence of characters must be ignored, if it matches specified regular expression.
 TokenChunker.Builder token(String regularExpression)
          Defines that sequence of characters, which is matched specified regular expression, is a token.
 TokenChunker.Builder token(String regularExpression, String normalizationValue)
          Defines that sequence of characters, which is matched specified regular expression, is a token with specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

build

public TokenChunker build()

ignore

public TokenChunker.Builder ignore(String regularExpression)
Defines that sequence of characters must be ignored, if it matches specified regular expression.


token

public TokenChunker.Builder token(String regularExpression)
Defines that sequence of characters, which is matched specified regular expression, is a token.


token

public TokenChunker.Builder token(String regularExpression,
                                  String normalizationValue)
Defines that sequence of characters, which is matched specified regular expression, is a token with specified value.



Copyright © 2009-2012 SonarSource. All Rights Reserved.