protected static interface ObjectFactory.Dispatcher
org.gradle.api.model.ObjectFactory if available.| Modifier and Type | Interface and Description |
|---|---|
static class |
ObjectFactory.Dispatcher.ForApi4CapableGradle
A dispatcher for a Gradle version that supports the object factory API.
|
static class |
ObjectFactory.Dispatcher.ForLegacyGradle
A dispatcher for a legacy version of Gradle that does not support the object factory API.
|
| Modifier and Type | Method and Description |
|---|---|
Object |
newInstance(Project project,
Class<?> type,
Object... argument)
Returns a new instance of the supplied class by invoking a constructor or returns
null if the feature
is not available. |
@MaybeNull Object newInstance(Project project, Class<?> type, Object... argument)
null if the feature
is not available.project - The Gradle project to use.type - The type of the class to be instantiated.argument - The arguments to supply.null if the feature is not available.