<?xml version="1.0" encoding="UTF-8"?>
<test-data>
    <test-code>
        <description>
            <![CDATA[
Qualified this as field
            ]]>
        </description>
        <expected-problems>1</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    final Foo otherFoo = Foo.this;
}
            ]]>
        </code>
    </test-code>

    <test-code>
        <description>
            <![CDATA[
Qualified this in a method
            ]]>
        </description>
        <expected-problems>1</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    public void doSomething() {
         final Foo anotherFoo = Foo.this;
    }
}
            ]]>
        </code>
    </test-code>

    <test-code>
        <description>
            <![CDATA[
Qualified this in a Inner Class
            ]]>
        </description>
        <expected-problems>0</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    private ActionListener returnListener() {
        return new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                doSomethingWithQualifiedThis(Foo.this);
            }
        };
    }
}
            ]]>
        </code>
    </test-code>

    <test-code>
        <description>
            <![CDATA[
Qualified this in a Nested Class
            ]]>
        </description>
        <expected-problems>0</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    private class Foo3 {
        final Foo myFoo = Foo.this;
    }
}
            ]]>
        </code>
    </test-code>

    <test-code>
        <description>
            <![CDATA[
Qualified this in a Nested Class part 2
            ]]>
        </description>
        <expected-problems>1</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    private class Foo2 {
        final Foo2 myFoo2 = Foo2.this;
    }
}
            ]]>
        </code>
    </test-code>

    <test-code>
        <description>
            <![CDATA[
Qualified this all in one
            ]]>
        </description>
        <expected-problems>3</expected-problems>
        <code>
            <![CDATA[
public class Foo {
    final Foo otherFoo = Foo.this;

    public void doSomething() {
         final Foo anotherFoo = Foo.this;
    }

    private ActionListener returnListener() {
        return new ActionListener() {
            @Override
            public void actionPerformed(ActionEvent e) {
                doSomethingWithQualifiedThis(Foo.this);
            }
        };
    }

    private class Foo3 {
        final Foo myFoo = Foo.this;
    }

    private class Foo2 {
        final Foo2 myFoo2 = Foo2.this;
    }
}
            ]]>
        </code>
    </test-code>

</test-data>