View Javadoc
1   /*
2   IllegalToken
3   tokens = LITERAL_NATIVE
4   
5   
6   */
7   
8   package com.puppycrawl.tools.checkstyle.checks.coding.illegaltoken;
9   
10  /**
11   * Test for illegal tokens
12   */
13  public class InputIllegalTokensCheckTokenNative
14  {
15      public void methodWithPreviouslyIllegalTokens()
16      {
17          int i = 0;
18          switch (i)
19          {
20              default:
21                  i--;
22                  i++;
23                  break;
24          }
25      }
26  
27      public native void nativeMethod(); // violation
28  
29      public void methodWithLiterals()
30      {
31          final String ref = "<a href=\"";
32          final String refCase = "<A hReF=\"";
33      }
34  
35      public void methodWithLabels() {
36          label:
37          {
38              anotherLabel: // some comment href
39              do {
40                  continue anotherLabel;
41              } while (false);
42              break label; // some a href
43          }
44      }
45  }