@@ -44,30 +44,30 @@ private Bindings() {
4444
4545 /**
4646 * @param type the type
47- * @return the method names declared in the class or a super type of it
47+ * @return the methods declared in the class or a super type of it
4848 */
49- public static Set <String > findAllMethodNames (ITypeBinding type ) {
50- Set <String > result = new HashSet <String >();
49+ public static Set <IMethodBinding > findAllMethods (ITypeBinding type ) {
50+ Set <IMethodBinding > result = new HashSet <IMethodBinding >();
5151
52- collectMethodNames ( type , new HashSet <ITypeBinding >(), result );
52+ collectMethods ( type , new HashSet <ITypeBinding >(), result );
5353
5454 return result ;
5555 }
5656
57- private static void collectMethodNames (ITypeBinding type , Set <ITypeBinding > visited ,
58- Collection <String > methodNames ) {
57+ private static void collectMethods (ITypeBinding type , Set <ITypeBinding > visited ,
58+ Collection <IMethodBinding > methods ) {
5959 if ( !isJavaLangObject ( type ) && visited .add ( type ) ) {
6060 for ( IMethodBinding methodBinding : type .getDeclaredMethods () ) {
61- methodNames .add ( methodBinding . getName () );
61+ methods .add ( methodBinding );
6262 }
6363
6464 for ( ITypeBinding ifc : type .getInterfaces () ) {
65- collectMethodNames ( ifc , visited , methodNames );
65+ collectMethods ( ifc , visited , methods );
6666 }
6767
6868 ITypeBinding superClass = type .getSuperclass ();
6969 if ( superClass != null ) {
70- collectMethodNames ( superClass , visited , methodNames );
70+ collectMethods ( superClass , visited , methods );
7171 }
7272 }
7373 }
0 commit comments