protected void initExtractors ( ) { Parameter [ ] parameters = controllerMethod . getParameters ( ) ; extractors = new MethodParameterExtractor [ parameters . length ] ; for ( int i = 0 ; i < parameters . length ; i ++ ) { MethodParameter parameter = new MethodParameter ( controllerMethod , i ) ; MethodParameterExtractor extractor = application . getExtractors ( ) . stream ( ) . filter ( e -> e . isApplicable ( parameter ) ) . findFirst ( ) . orElse ( null ) ; if ( extractor == null ) { throw new PippoRuntimeException ( "Method '{}' parameter {} of type '{}' does not specify a extractor" , LangUtils . toString ( controllerMethod ) , i + 1 , parameter . getParameterType ( ) ) ; } extractors [ i ] = extractor ; } }
Init extractors from controller method .