View Javadoc
1   /*
2   RequireThis
3   checkFields = (default)true
4   checkMethods = (default)true
5   validateOnlyOverlapping = (default)true
6   
7   
8   */
9   
10  package com.puppycrawl.tools.checkstyle.checks.coding.requirethis;
11  
12  public class InputRequireThisFinalInstanceVariable {
13      final int x = 1;
14      final int y = 2;
15      final int z;
16  
17      public InputRequireThisFinalInstanceVariable(int y, int z) {
18          y = y; // violation until #8973 is fixed // violation '.* variable 'y' needs "this.".'
19          z = z; // violation until #8973 is fixed // violation '.* variable 'z' needs "this.".'
20      }
21  
22      {
23          this.z = 3;
24      }
25  
26      public void foo(int x) {
27          x = x;
28      }
29  }