abstract fun <T : Any> findModel(modelType: Class<T>): T
Fetches a snapshot of the model of the given type, if available.
See #getModel(Class)
for more details.
Return
The model, or null if not present.
abstract fun <T : Any> findModel(target: Model, modelType: Class<T>): T
Fetches a snapshot of the model of the given type, if available.
See #getModel(Model, Class)
for more details.
Return
The model, or null if not present.
abstract fun <T : Any, P : Any> findModel(modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): T
Fetches a snapshot of the model of the given type using the given parameter, if available.
See #getModel(Model, Class, Class, Action)
for more details.
parameterType
- The parameter type.
parameterInitializer
- Action to configure the parameter
Return
The model.
Since
4.4
abstract fun <T : Any, P : Any> findModel(target: Model, modelType: Class<T>, parameterType: Class<P>, parameterInitializer: Action<in P>): T
Fetches a snapshot of the model of the given type for the given element using the given parameter, if available.
See #getModel(Model, Class, Class, Action)
for more details.
target
- The target element, usually a project.
parameterType
- The parameter type.
parameterInitializer
- Action to configure the parameter
Return
The model.
Since
4.4