protected Object query ( Type type , String name ) { return parameter ( type , name , new Function < String , Object > ( ) { public Object apply ( String name ) { return context . request ( ) . getParameter ( name ) ; } } , new Function < String , Collection < Object > > ( ) { @ SuppressWarnings ( "unchecked" ) public Collection < Object > apply ( String name ) { HttpServletRequest request = context . request ( ) ; Map < String , Object > map = new TreeMap < String , Object > ( ) ; for ( Object object : Collections . list ( request . getParameterNames ( ) ) ) { String key = ( String ) object ; if ( key . startsWith ( name + "[" ) ) { map . put ( key , request . getParameter ( key ) ) ; } } return ( map . isEmpty ( ) ) ? null : map . values ( ) ; } } ) ; }
Returns the Web endpoint method parameter from query string .