Rasool et al. present an approach for design pattern recovery using a detection technique with source code. Their technique is able to recover design patterns from source code based on annotations used in the source code.
To extract the information for the design pattern from the source code, Rasool et al. use annotations, which are based on singleton, composite, adapter, factory method, and proxy patterns. These annotations are used in their technique to block the source code for the purpose of refactoring it. They then extract the design pattern using their defined annotations, regular expressions, and SQL queries.
I recommend this paper to readers who are interested in knowing how to recover design patterns from source code using an annotation technique.