public static List < MethodNode > findMethodsWithName ( Collection < MethodNode > methodNodes , String name ) { Validate . notNull ( methodNodes ) ; Validate . notNull ( name ) ; Validate . noNullElements ( methodNodes ) ; List < MethodNode > ret = new ArrayList <> ( ) ; for ( MethodNode methodNode : methodNodes ) { if ( methodNode . name . equals ( name ) ) { ret . add ( methodNode ) ; } } return ret ; }
Find methods within a class with a specific name .