Tuesday, May 08, 2007

Semmle, an original idea


Semmle is a tool to make queries to our code similar to SQL. The following query:
from Class c 
where c.declaresMethod("equals")
and not(c.declaresMethod("hashCode"))
select c.getPackage(),c
returns the results:
Photo Sharing and Video Hosting at Photobucket
from the "framework" working space of my eclipse workspace (All classes that define an equals method but not hashCode).
".QL", an object-oriented query language, allows us to build our own classes to extend the query capabilities.
With a Metrics Library such as Lack of Cohesion of Methods and Afferent Coupling/Efferent Coupling, I only miss an ant task to add this tool to the continuos integration server.
Now, here's an original idea!