Drop deprecations: functions that were converted to properties.

This commit is contained in:
Ilya Gorbunov
2016-01-16 18:03:21 +03:00
parent 2813840769
commit 768a23f7eb
11 changed files with 14 additions and 179 deletions
@@ -1,52 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:kotlin.jvm.JvmName("DeprecatedBuiltinsKt")
package kotlin
@Deprecated("Use property 'message' instead", ReplaceWith("this.message"))
public inline fun Throwable.getMessage(): String? = message
@Deprecated("Use property 'cause' instead", ReplaceWith("this.cause"))
public inline fun Throwable.getCause(): Throwable? = cause
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun Array<*>.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun ByteArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun CharArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun ShortArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun IntArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun LongArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun FloatArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun DoubleArray.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("this.size"))
public inline fun BooleanArray.size() = size
@@ -40,53 +40,6 @@ public fun <@kotlin.internal.OnlyInputTypes T> MutableCollection<out T>.removeAl
*/
public fun <@kotlin.internal.OnlyInputTypes T> MutableCollection<out T>.retainAll(elements: Collection<T>): Boolean = (this as MutableCollection<T>).retainAll(elements)
@Deprecated("Use operator 'get' instead", ReplaceWith("this[index]"))
public fun CharSequence.charAt(index: Int): Char = this[index]
@Deprecated("Use property 'size' instead", ReplaceWith("size"))
public inline fun Collection<*>.size() = size
@Deprecated("Use property 'size' instead", ReplaceWith("size"))
public inline fun Map<*, *>.size() = size
@Deprecated("Use property 'key' instead", ReplaceWith("key"))
public fun <K, V> Map.Entry<K, V>.getKey(): K = key
@Deprecated("Use property 'value' instead.", ReplaceWith("value"))
public fun <K, V> Map.Entry<K, V>.getValue(): V = value
@Deprecated("Use 'removeAt' instead.", ReplaceWith("removeAt(index)"))
public fun <E> MutableList<E>.remove(index: Int): E = removeAt(index)
@Deprecated("Use property 'length' instead.", ReplaceWith("length"))
public fun CharSequence.length(): Int = length
@Deprecated("Use property 'keys' instead.", ReplaceWith("keys"))
public inline fun <K, V> Map<K, V>.keySet(): Set<K> = keys
@kotlin.jvm.JvmName("mutableKeys")
@Deprecated("Use property 'keys' instead.", ReplaceWith("keys"))
public fun <K, V> MutableMap<K, V>.keySet(): MutableSet<K> = keys
@Deprecated("Use property 'entries' instead.", ReplaceWith("entries"))
public inline fun <K, V> Map<K, V>.entrySet(): Set<Map.Entry<K, V>> = entries
@kotlin.jvm.JvmName("mutableEntrySet")
@Deprecated("Use property 'entries' instead.", ReplaceWith("entries"))
public fun <K, V> MutableMap<K, V>.entrySet(): MutableSet<MutableMap.MutableEntry<K, V>> = entries
@Deprecated("Use property 'values' instead.", ReplaceWith("values"))
public inline fun <K, V> Map<K, V>.values(): Collection<V> = values
@kotlin.jvm.JvmName("mutableValues")
@Deprecated("Use property 'values' instead.", ReplaceWith("values"))
public fun <K, V> MutableMap<K, V>.values(): MutableCollection<V> = values
/**
* Adds the specified [element] to this mutable collection.
*/
@@ -1,27 +0,0 @@
/*
* Copyright 2010-2015 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
@file:kotlin.jvm.JvmMultifileClass
@file:kotlin.jvm.JvmName("EnumsKt")
package kotlin
@Deprecated("Use property ''name'' instead", ReplaceWith("this.name"))
public inline fun Enum<*>.name() = name
@Deprecated("Use property ''ordinal'' instead", ReplaceWith("this.ordinal"))
public inline fun Enum<*>.ordinal() = ordinal
@@ -99,24 +99,11 @@ public fun Char.isTitleCase(): Boolean = Character.isTitleCase(this)
*/
public fun Char.toTitleCase(): Char = Character.toTitleCase(this)
/**
* Returns a value indicating a character's general category.
*/
@Deprecated("Use 'category' property instead.", ReplaceWith("category"))
public fun Char.category(): CharCategory = category
/**
* Returns a value indicating a character's general category.
*/
public val Char.category: CharCategory get() = CharCategory.valueOf(Character.getType(this))
/**
* Returns the Unicode directionality property for the given character.
*/
@Deprecated("Use 'directionality' property instead.", ReplaceWith("directionality"))
public fun Char.directionality(): CharDirectionality = directionality
/**
* Returns the Unicode directionality property for the given character.
*/
@@ -33,22 +33,3 @@ public fun Double.isFinite(): Boolean = !isInfinite() && !isNaN()
* Returns `true` if the argument is a finite floating-point value; returns `false` otherwise (for `NaN` and infinity arguments).
*/
public fun Float.isFinite(): Boolean = !isInfinite() && !isNaN()
@Deprecated("Use toInt() instead.", ReplaceWith("toInt()"))
public fun Number.intValue(): Int = toInt()
@Deprecated("Use toLong() instead.", ReplaceWith("toLong()"))
public fun Number.longValue(): Long = toLong()
@Deprecated("Use toShort() instead.", ReplaceWith("toShort()"))
public fun Number.shortValue(): Short = toShort()
@Deprecated("Use toByte() instead.", ReplaceWith("toByte()"))
public fun Number.byteValue(): Byte = toByte()
@Deprecated("Use toDouble() instead.", ReplaceWith("toDouble()"))
public fun Number.doubleValue(): Double = toDouble()
@Deprecated("Use toFloat() instead.", ReplaceWith("toFloat()"))
public fun Number.floatValue(): Float = toFloat()
@@ -30,13 +30,6 @@ public fun Throwable.printStackTrace(stream: PrintStream): Unit {
jlt.printStackTrace(stream)
}
/**
* Returns the list of stack trace elements in a Kotlin stack trace.
*/
@Deprecated("Use 'stackTrace' property instead.", ReplaceWith("stackTrace"))
@JvmName("getStackTraceDeprecated")
public inline fun Throwable.getStackTrace(): Array<StackTraceElement> = stackTrace
/**
* Returns an array of stack trace elements representing the stack trace
* pertaining to this throwable.