public class ObjectFactory extends Object
org.gradle.api.model.ObjectFactory API if available.| Modifier and Type | Class and Description |
|---|---|
protected static interface |
ObjectFactory.Dispatcher
A dispatcher for using the
org.gradle.api.model.ObjectFactory if available. |
| Modifier and Type | Method and Description |
|---|---|
static <T> T |
newInstance(Project project,
Class<T> 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 public static <T> T newInstance(Project project, Class<T> type, Object... argument)
null if the feature
is not available.T - The type of the created class.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.