Package io.micronaut.views
Interface ModelAndViewRenderer<T,R>
- Type Parameters:
T- The model typeR- The request type
- All Known Implementing Classes:
DefaultModelAndViewRenderer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
@DefaultImplementation(DefaultModelAndViewRenderer.class)
public interface ModelAndViewRenderer<T,R>
Renders a
ModelAndView.- Since:
- 5.2.0
- Author:
- Tim Yates
-
Method Summary
Modifier and TypeMethodDescription@NonNull Optional<io.micronaut.core.io.Writable>render(@NonNull ModelAndView<T> modelAndView, R request, @NonNull String mediaType) Renders aModelAndViewinto aWritable.
-
Method Details
-
render
@NonNull @NonNull Optional<io.micronaut.core.io.Writable> render(@NonNull @NonNull ModelAndView<T> modelAndView, @Nullable R request, @NonNull @NonNull String mediaType) Renders aModelAndViewinto aWritable.- Parameters:
modelAndView- Model And Viewrequest- RequestmediaType- Media Type- Returns:
- a
ModelAndViewinto aWritable
-