public static TemplatedURLFormatter getTemplatedURLFormatter ( ServletRequest servletRequest ) { assert servletRequest != null : "The ServletRequest cannot be null." ; if ( servletRequest == null ) { throw new IllegalArgumentException ( "The ServletRequest cannot be null." ) ; } return ( TemplatedURLFormatter ) servletRequest . getAttribute ( TEMPLATED_URL_FORMATTER_ATTR ) ; }
Gets the TemplatedURLFormatter instance from a ServletRequest attribute .