Search in sources :

Example 1 with SuperClassA

use of net.sourceforge.pmd.typeresolution.testdata.dummytypes.SuperClassA in project pmd by pmd.

the class FieldAccessSuper method foo.

public void foo() {
    // simple super field access
    // Primary[Prefix[Name[s]]]
    s = new SuperClassA();
    // access inherited field through primary
    // Primary[ Prefix[Primary[(this)]], Suffix[s], Suffix[s2] ]
    (this).s.s2 = new SuperClassA2();
    // access inherited field, second 's' has inherited field 's2'
    // Primary[Prefix[Name[s.s.s2]]]
    s.s.s2 = new SuperClassA2();
    // field access through super
    // Primary[Prefix["super"], Suffix["field"]]
    super.s = new SuperClassA();
    // fully qualified case
    // Primary[Prefix[Name[net...FieldAccessSuper]], Suffix[this], Suffix[s]]
    net.sourceforge.pmd.typeresolution.testdata.FieldAccessSuper.this.s = new SuperClassA();
}
Also used : SuperClassA2(net.sourceforge.pmd.typeresolution.testdata.dummytypes.SuperClassA2) SuperClassA(net.sourceforge.pmd.typeresolution.testdata.dummytypes.SuperClassA)

Aggregations

SuperClassA (net.sourceforge.pmd.typeresolution.testdata.dummytypes.SuperClassA)1 SuperClassA2 (net.sourceforge.pmd.typeresolution.testdata.dummytypes.SuperClassA2)1