protected void collectMethods ( Class < ? extends AbstractExtraLanguageValidator > clazz , Collection < Class < ? > > visitedClasses , Collection < MethodWrapper > result ) { if ( ! visitedClasses . add ( clazz ) ) { return ; } for ( final Method method : clazz . getDeclaredMethods ( ) ) { if ( method . getAnnotation ( Check . class ) != null && method . getParameterTypes ( ) . length == 1 ) { result . add ( createMethodWrapper ( method ) ) ; } } final Class < ? extends AbstractExtraLanguageValidator > superClass = getSuperClass ( clazz ) ; if ( superClass != null ) { collectMethods ( superClass , visitedClasses , result ) ; } }
Collect the check methods .