public ImmutableMap < String , String > validatedMatch ( String path , String exceptionMessagePrefix ) { ImmutableMap < String , String > matchMap = match ( path ) ; if ( matchMap == null ) { throw new ValidationException ( String . format ( "%s: Parameter \"%s\" must be in the form \"%s\"" , exceptionMessagePrefix , path , this . toString ( ) ) ) ; } return matchMap ; }
Matches the path returning a map from variable names to matched values . All matched values will be properly unescaped using URL encoding rules . If the path does not match the template throws a ValidationException . The exceptionMessagePrefix parameter will be prepended to the ValidationException message .