Inheritance - warning when shadowing superclass variable with same name
<p>When using Java, is there a way to get a compiler warning (using Eclipse, if it matters) when a child class shadows a super class's instance variables by declaring another one of the same name? For example:</p>

<pre><code>class A {
    String variable;

    A() {
        variable = "A";
    }
}

class B extends A {
    int variable;

    B() {
        variable = 1;
    }
}

B b = new B();
System.out.println("Variable value: " + b.variable + ", " + ((A) b).variable);
// prints out: "Variable value: 1, A"
</code></pre>

<p>I'd like to be warned in <code>B</code> that variable already exists.</p>
