There is no need to create an anonymous inner class of type Runnable. Just use a closure instead.
We should scan for all other one method interfaces within the JDK as well.
The inner class name is not available in the AST in Groovy 1.7, but is available in 1.8. Once we can standardize on Groovy 1.8+, we can implement a rule that checks for the predefined set of one-method interfaces in the JDK.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The inner class name is not available in the AST in Groovy 1.7, but is available in 1.8. Once we can standardize on Groovy 1.8+, we can implement a rule that checks for the predefined set of one-method interfaces in the JDK.