Package org.gradle.api.provider
Interface Property<T>
- Type Parameters:
T
- Type of value represented by the property
- All Superinterfaces:
Provider<T>
- All Known Subinterfaces:
DirectoryProperty
,DirectoryVar
,ListProperty<T>
,PropertyState<T>
,RegularFileProperty
,RegularFileVar
A
Provider
representation for capturing the state of a property. The value can be provided by using the method set(Object)
or set(Provider)
.
Note: This interface is not intended for implementation by build script or plugin authors. An instance of this class can be created through the factory method ObjectFactory.property(Class)
. There are also several specialized subtypes of this interface that can be created using various other factory methods.
- Since:
- 4.3
-
Method Summary
-
Method Details
-
set
Sets the value of the property the given value.This method can also be used to clear the value of the property, by passing
null
as the value.- Parameters:
value
- The value, can be null.
-
set
Sets the property to have the same value of the given provider. This property will track the value of the provider and query its value each time the value of the property is queried. When the provider has no value, this property will also have no value.- Parameters:
provider
- Provider
-