RSS Feed for This PostCurrent Article

Singleton Detector

The Google Singleton Detector, or GSD, is a tool which analyzes Java bytecode and detects the use of Singletons.

It’s not quite as simple as that, however. First, GSD doesn’t only detect singletons; it detects four different types of global state, including singletons, hingletons, mingletons and fingletons (see the usage section for descriptions). Second, it outputs a graph with all these different types of static state highlighted, and shows all the classes that are directly dependent on them. The point of this tool is to allow you to see all of the uses of global state inside a project, as well as how they are all interrelated. Hopefully you’ll be able to locate global state that is heavily depended on and remove it.

GSD was build in order to help identify hard to test code which is due to singletons design pattern.


Trackback URL


Sorry, comments for this entry are closed at this time.