public void validateMethodArgs ( String uriPattern ) { Set < String > namedParameters = new LinkedHashSet <> ( ) ; for ( ArgumentExtractor extractor : extractors ) { if ( extractor instanceof NamedExtractor ) { NamedExtractor namedExtractor = ( NamedExtractor ) extractor ; namedParameters . add ( namedExtractor . getName ( ) ) ; } } // validate the url specification and method signature agree on required parameters List < String > requiredParameters = getParameterNames ( uriPattern ) ; if ( ! namedParameters . containsAll ( requiredParameters ) ) { throw new FatalException ( "Controller method '{}' declares parameters {} but the URL specification requires {}" , Util . toString ( method ) , namedParameters , requiredParameters ) ; } }
Validate that the parameters specified in the uri pattern are declared in the method signature .