/** * Indicates whether or not this {@link org.springframework.web.servlet.ViewResolver} can * handle the supplied view name. If not, {@link #createView(String, java.util.Locale)} will * return {@code null}. The default implementation checks against the configured * {@link #setViewNames view names}. * @param viewName the name of the view to retrieve * @param locale the Locale to retrieve the view for * @return whether this resolver applies to the specified view * @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String) */ protected boolean canHandle(String viewName, Locale locale) { String[] viewNames = getViewNames(); return (viewNames == null || PatternMatchUtils.simpleMatch(viewNames, viewName)); }
/** * Indicates whether or not this {@link org.springframework.web.servlet.ViewResolver} can * handle the supplied view name. If not, {@link #createView(String, java.util.Locale)} will * return {@code null}. The default implementation checks against the configured * {@link #setViewNames view names}. * @param viewName the name of the view to retrieve * @param locale the Locale to retrieve the view for * @return whether this resolver applies to the specified view * @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String) */ protected boolean canHandle(String viewName, Locale locale) { String[] viewNames = getViewNames(); return (viewNames == null || PatternMatchUtils.simpleMatch(viewNames, viewName)); }
/** * Indicates whether or not this {@link org.springframework.web.servlet.ViewResolver} can * handle the supplied view name. If not, {@link #createView(String, java.util.Locale)} will * return {@code null}. The default implementation checks against the configured * {@link #setViewNames view names}. * @param viewName the name of the view to retrieve * @param locale the Locale to retrieve the view for * @return whether this resolver applies to the specified view * @see org.springframework.util.PatternMatchUtils#simpleMatch(String, String) */ protected boolean canHandle(String viewName, Locale locale) { String[] viewNames = getViewNames(); return (viewNames == null || PatternMatchUtils.simpleMatch(viewNames, viewName)); }