protected List < MethodNode > findMethodsWithGenerated ( ClassNode receiver , String name ) { List < MethodNode > methods = receiver . getMethods ( name ) ; if ( methods . isEmpty ( ) || receiver . isResolved ( ) ) return methods ; List < MethodNode > result = addGeneratedMethods ( receiver , methods ) ; return result ; }
This method returns the list of methods named against the supplied parameter that are defined on the specified receiver but it will also add non existing methods that will be generated afterwards by the compiler for example if a method is using default values and that the specified class node isn t compiled yet .