include::../description.adoc[]

include::../noncompliant.adoc[]

include::../compliant.adoc[]

== Exceptions

When the type of the field is the containing class and that field is static, no issue is raised to allow singletons named like the type. 


----
public class Foo {
  ...
  private static Foo foo;
  public Foo getInstance() {
    if(foo==null) {
      foo = new Foo();
    }
    return foo;
  }
  ...
}
----
