code: static boolean isSingleton(Types types, TypeElement element) {
      return isSingleton(types, element, element.asType());
    }
docs: A singleton is defined by a class with a public static final field named "INSTANCE"
  with a type assignable from itself.