org.sonar.duplications.statement
Class StatementChunker.Builder

java.lang.Object
  extended by org.sonar.duplications.statement.StatementChunker.Builder
Enclosing class:
StatementChunker

public static final class StatementChunker.Builder
extends Object

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


Method Summary
 StatementChunker build()
           
 StatementChunker.Builder ignore(TokenMatcher... matchers)
          Defines that sequence of tokens must be ignored, if it matches specified list of matchers.
 StatementChunker.Builder statement(TokenMatcher... matchers)
          Defines that sequence of tokens, which is matched specified list of matchers, is a statement.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

build

public StatementChunker build()

ignore

public StatementChunker.Builder ignore(TokenMatcher... matchers)
Defines that sequence of tokens must be ignored, if it matches specified list of matchers.

See Also:
TokenMatcherFactory

statement

public StatementChunker.Builder statement(TokenMatcher... matchers)
Defines that sequence of tokens, which is matched specified list of matchers, is a statement.

See Also:
TokenMatcherFactory


Copyright © 2009-2011 SonarSource. All Rights Reserved.