Singleton Inspection Plugin at plugins portal
This inspection reports about (probably) inappropriate use of Singleton pattern.
Just write getInstance()
method, and this inspection will check this class like a Singleton.
Singleton class should be checked for next errors:
- Class should be final.
- Class should have private constructor.
getInstance()
method must be public and static and return instance of its class.
You may be also interested in JPatterns library for patterns annotations.