Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Have you tried some tools to recognize design patterns in code?

Has somebody tried any tools for design patterns recognition in source code?

I'm looking for one that is more or less effective and expects some reasonable input (for example, an xmi file produced by a reverse engineering tool or another data that can be easily generated from the source code).

I've found some academic tools like CrocoPat, Columbus + Maisa, but haven't tried them yet.

Would appreciate if someone shares his/her experience in such experiments.


1 Answers

I don't know of anything that works. There is a lot of information that gets lost when you realize your patterns in code so reverse engineering them is bound to fail.

  • Almost every method call on a field can be considered to be a a bridge/adapter/staregy
  • Almost every non-void method can be considered to be a factory (including, for example, toString())
  • Almost every object with fields and a non-void return method can be considered to be a Builder
  • Etc.
like image 183
Itay Maman Avatar answered Jan 30 '26 22:01

Itay Maman