void checkMethod ( Method method , List < Object > arguments , List < String > parameters , int nbparam ) throws IllegalArgumentException , JsonUnmarshallingException , JsonMarshallerException { Type [ ] paramTypes = method . getGenericParameterTypes ( ) ; Annotation [ ] [ ] parametersAnnotations = method . getParameterAnnotations ( ) ; int idx = 0 ; for ( Type paramType : paramTypes ) { logger . debug ( "Try to convert argument ({}) {} : {}.", ew bject[ ] { i dx, aramType, arameters. g et( i dx) } ) ; arguments . add ( argumentConvertor . convertJsonToJava ( parameters . get ( idx ) , paramType , parametersAnnotations [ idx ] ) ) ; idx ++ ; if ( idx > nbparam ) { throw new IllegalArgumentException ( ) ; } } }
Check if for nbparam in parameters the method is correct . If yes store parameters String converted to Java in arguments list