A map of name to model instances used by a jakarta.
to process a view. Instances implementing this interface must be injectable using
jakarta. and are jakarta..
Note that certain view engines, such as the engine for Jakarta Server Pages, support
model binding via jakarta. in which case the use of Models is
optional.
jakarta.inject.Named , jakarta.enterprise.context.RequestScoped
| Modifier and Type | Method and Description |
|---|---|
| public Map | |
| public Object | |
| public < type of the model T> T | |
| public Models |
| asMap | back to summary |
|---|---|
| public Map Returns a unmodifiable view of the models map. | |
| get | back to summary |
|---|---|
| public Object get(String name) Retrieve a model by name. | |
| get | back to summary |
|---|---|
| public <T> T get(String name, Class<T> clazz) Retrieve a model by name in a type-safe way. | |
| put | back to summary |
|---|---|
| public Models put(String name, Object model) Stores a new model in the map. | |