spring-framework / org.springframework.ui.context / ThemeSource / getTheme

getTheme

@Nullable abstract fun getTheme(themeName: String): Theme

Return the Theme instance for the given theme name.

The returned Theme will resolve theme-specific messages, codes, file paths, etc (e.g. CSS and image files in a web environment).

Parameters

themeName - the name of the theme

Return
the corresponding Theme, or null if none defined. Note that, by convention, a ThemeSource should at least be able to return a default Theme for the default theme name "theme" but may also return default Themes for other theme names.

See Also
org.springframework.web.servlet.theme.AbstractThemeResolver#ORIGINAL_DEFAULT_THEME_NAME