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      /**
14       * Ignore using directives in C#.
15       * The default value is <code>false</code>.
16       */
17      String IGNORE_USINGS = "ignore_usings";
18  
19      /**
20       * Enables or disabled skipping of blocks like a pre-processor.
21       * It is a boolean property.
22       * The default value is <code>true</code>.
23       * @see #OPTION_SKIP_BLOCKS_PATTERN
24       */
25      String OPTION_SKIP_BLOCKS = "net.sourceforge.pmd.cpd.Tokenizer.skipBlocks";
26      /**
27       * Configures the pattern, to find the blocks to skip.
28       * It is a string property and contains of two parts, separated by {@code |}.
29       * The first part is the start pattern, the second part is the ending pattern.
30       * Default value is "{@code #if 0|#endif}".
31       * @see #DEFAULT_SKIP_BLOCKS_PATTERN
32       */
33      String OPTION_SKIP_BLOCKS_PATTERN = "net.sourceforge.pmd.cpd.Tokenizer.skipBlocksPattern";
34  
35      String DEFAULT_SKIP_BLOCKS_PATTERN = "#if 0|#endif";
36  
37      void tokenize(SourceCode sourceCode, Tokens tokenEntries) throws IOException;
38  }