title: Java static self-references
body: <p>A non-static setter method can look like this:</p>
  
  <pre><code>private int var;
  
  public void setVar(int var) {
    this.var = var;
  }
  </code></pre>
  
  <p>And I can't find out how to solve that with a static method:</p>
  
  <pre><code>private static int var;
  
  public static void setVar(int var) {
    // ???
  }
  </code></pre>
  
  <p>One solution is to write <code>myClass.var = var;</code>. But that's ugly, because when I rename my class, I have to find and replace all occurrences.
  Another solution is to rename the parameter to <code>v</code> and write <code>var = v;</code>. For me this is ugly, too.</p>
  
  <p>Is there really no way to solve this like in php <code>self::var = var;</code>?</p>