public static List < ? extends ExecutableElement > getEffectiveMethods ( TypeElement cls ) { List < ExecutableElement > list = new ArrayList <> ( ) ; while ( cls != null ) { for ( ExecutableElement method : ElementFilter . methodsIn ( cls . getEnclosedElements ( ) ) ) { if ( ! overrides ( list , method ) ) { list . add ( method ) ; } } cls = ( TypeElement ) Typ . asElement ( cls . getSuperclass ( ) ) ; } return list ; }
Return effective methods for a class . All methods accessible at class are returned . That includes superclass methods which are not override .