View Javadoc
1   /**
2    * BSD-style license; for more info see http://pmd.sourceforge.net/license.html
3    */
4   package net.sourceforge.pmd.cpd;
5   
6   import java.io.IOException;
7   
8   public interface Tokenizer {
9       String IGNORE_LITERALS = "ignore_literals";
10      String IGNORE_IDENTIFIERS = "ignore_identifiers";
11      String IGNORE_ANNOTATIONS = "ignore_annotations";
12      /**
13       * Enables or disabled skipping of blocks like a pre-processor.
14       * It is a boolean property.
15       * The default value is <code>true</code>.
16       * @see #OPTION_SKIP_BLOCKS_PATTERN
17       */
18      String OPTION_SKIP_BLOCKS = "net.sourceforge.pmd.cpd.Tokenizer.skipBlocks";
19      /**
20       * Configures the pattern, to find the blocks to skip.
21       * It is a string property and contains of two parts, separated by {@code |}.
22       * The first part is the start pattern, the second part is the ending pattern.
23       * Default value is "{@code #if 0|#endif}".
24       * @see #DEFAULT_SKIP_BLOCKS_PATTERN
25       */
26      String OPTION_SKIP_BLOCKS_PATTERN = "net.sourceforge.pmd.cpd.Tokenizer.skipBlocksPattern";
27  
28      String DEFAULT_SKIP_BLOCKS_PATTERN = "#if 0|#endif";
29  
30      void tokenize(SourceCode sourceCode, Tokens tokenEntries) throws IOException;
31  }