Remove old 'get' delegate convention in interfaces
This commit is contained in:
@@ -260,8 +260,6 @@ public abstract class MapVar<T, K, V>() : MapVal<T, K, V>(), ReadWriteProperty<T
|
||||
map.put(key(property), value)
|
||||
}
|
||||
|
||||
override fun get(thisRef: T, property: PropertyMetadata) = getValue(thisRef, property)
|
||||
|
||||
override fun getValue(thisRef: T, property: PropertyMetadata): V {
|
||||
return super<MapVal>.getValue(thisRef, property)
|
||||
}
|
||||
|
||||
@@ -17,11 +17,7 @@ public interface ReadOnlyProperty<in R, out T> {
|
||||
* @param property the metadata for the property.
|
||||
* @return the property value.
|
||||
*/
|
||||
public fun getValue(thisRef: R, property: PropertyMetadata): T = get(thisRef, property)
|
||||
|
||||
//TODO drop after bootstrap
|
||||
@Deprecated("Use getValue() instead.", ReplaceWith("getValue(thisRef, property)"))
|
||||
public fun get(thisRef: R, property: PropertyMetadata): T = getValue(thisRef, property)
|
||||
public fun getValue(thisRef: R, property: PropertyMetadata): T
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -40,11 +36,7 @@ public interface ReadWriteProperty<in R, T> {
|
||||
* @param property the metadata for the property.
|
||||
* @return the property value.
|
||||
*/
|
||||
public fun getValue(thisRef: R, property: PropertyMetadata): T = get(thisRef, property)
|
||||
|
||||
//TODO drop after bootstrap
|
||||
@Deprecated("Use getValue() instead.", ReplaceWith("getValue(thisRef, property)"))
|
||||
public fun get(thisRef: R, property: PropertyMetadata): T = getValue(thisRef, property)
|
||||
public fun getValue(thisRef: R, property: PropertyMetadata): T
|
||||
|
||||
/**
|
||||
* Sets the value of the property for the given object.
|
||||
@@ -52,11 +44,5 @@ public interface ReadWriteProperty<in R, T> {
|
||||
* @param property the metadata for the property.
|
||||
* @param value the value to set.
|
||||
*/
|
||||
public fun setValue(thisRef: R, property: PropertyMetadata, value: T) {
|
||||
set(thisRef, property, value)
|
||||
}
|
||||
|
||||
//TODO drop after bootstrap
|
||||
@Deprecated("Use setValue() instead.", ReplaceWith("setValue(thisRef, property, value)"))
|
||||
public fun set(thisRef: R, property: PropertyMetadata, value: T) = setValue(thisRef, property, value)
|
||||
public fun setValue(thisRef: R, property: PropertyMetadata, value: T)
|
||||
}
|
||||
|
||||
@@ -13,9 +13,6 @@ package kotlin.properties
|
||||
*/
|
||||
public fun <V> Map<in String, *>.getValue(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||
|
||||
@Deprecated("Use getValue() instead")
|
||||
public fun <V> Map<in String, *>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||
|
||||
/**
|
||||
* Returns the value of the property for the given object from this mutable map.
|
||||
* @param thisRef the object for which the value is requested (not used).
|
||||
@@ -27,10 +24,6 @@ public fun <V> Map<in String, *>.get(thisRef: Any?, property: PropertyMetadata):
|
||||
@kotlin.jvm.JvmName("getVar")
|
||||
public fun <V> MutableMap<in String, in V>.getValue(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||
|
||||
@Deprecated("Use getValue() instead")
|
||||
@kotlin.jvm.JvmName("getVarDeprecated")
|
||||
public fun <V> MutableMap<in String, in V>.get(thisRef: Any?, property: PropertyMetadata): V = getOrImplicitDefault(property.name) as V
|
||||
|
||||
/**
|
||||
* Stores the value of the property for the given object in this mutable map.
|
||||
* @param thisRef the object for which the value is requested (not used).
|
||||
@@ -39,9 +32,4 @@ public fun <V> MutableMap<in String, in V>.get(thisRef: Any?, property: Property
|
||||
*/
|
||||
public fun <V> MutableMap<in String, in V>.setValue(thisRef: Any?, property: PropertyMetadata, value: V) {
|
||||
this.put(property.name, value)
|
||||
}
|
||||
|
||||
@Deprecated("Use setValue() instead")
|
||||
public fun <V> MutableMap<in String, in V>.set(thisRef: Any?, property: PropertyMetadata, value: V) {
|
||||
this.put(property.name, value)
|
||||
}
|
||||
}
|
||||
@@ -76,9 +76,6 @@ public fun lazy<T>(lock: Any?, initializer: () -> T): Lazy<T> = SynchronizedLazy
|
||||
*/
|
||||
public fun <T> Lazy<T>.getValue(thisRef: Any?, property: PropertyMetadata): T = value
|
||||
|
||||
@Deprecated("Use getValue() instead")
|
||||
public fun <T> Lazy<T>.get(thisRef: Any?, property: PropertyMetadata): T = value
|
||||
|
||||
/**
|
||||
* Specifies how a [Lazy] instance synchronizes access among multiple threads.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user