The language of choice is AspectJ, but I'm open to a general answer.
http://www.christianschenk.org/blog/singletons-with-aspectj/
The link above provides a small tutorial on using singletons in AspectJ.
Source: https://habr.com/ru/post/1718846/More articles:Unable to get XML node tracking information :( - xmlHow to get a timestamp older than 1901 - c ++End of file in C ++ - c ++Working with Subversion with a USB dongle - svnCreating identifiers for uniqueness and a link URL - urlhow to iterate over elements in a form using getElementsByName? - javascriptSilverlight 3 Validation - does manual validation not work? - validationHow does the compiler type in the delegate example? - c #InProc session state not working - asp.netServe .ICS files as binary files only through .htaccess or apache conf - web-configAll Articles