How to find the view layout

From a View instance annotated with @Route(...layout=...) I’d like to refer to the current layout instance dynamically.
Something like getUI().ifPresent(ui -> ui.getCurrentLayout()).