From 8e7f6f3c8c36f8411f6ab1b5277b8821ec3aa937 Mon Sep 17 00:00:00 2001 From: Andrey Breslav Date: Fri, 9 Oct 2015 14:49:41 +0300 Subject: [PATCH] Migrated from @HiddenDeclaration to @Deprecated(..., level = DeprecationLevel.HIDDEN) --- .../tests/resolve/HiddenDeclarations.kt | 22 ++++----- .../tests/resolve/HiddenDeclarations.txt | 38 ++++++++-------- .../testData/writeFlags/hidden/function.kt | 5 ++- .../writeFlags/hidden/propertyGetter.kt | 5 ++- .../writeFlags/hidden/propertySetter.kt | 5 ++- .../src/kotlin/reflect/jvm/_Deprecated.kt | 6 +-- .../HiddenDeclarations.dependency.kt | 8 ++-- .../HiddenDeclarations/HiddenDeclarations.kt | 2 +- .../conflictingExtensionProperty/File.kt | 2 +- .../stdlib/src/kotlin/concurrent/Thread.kt | 13 +++--- .../stdlib/src/kotlin/dom/DomEventsJVM.kt | 45 +++++++------------ libraries/stdlib/src/kotlin/dom/DomJVM.kt | 45 +++++++------------ libraries/stdlib/src/kotlin/io/files/Utils.kt | 9 ++-- libraries/stdlib/src/kotlin/util/Ordering.kt | 3 +- 14 files changed, 88 insertions(+), 120 deletions(-) diff --git a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt index 397e847bab9..6594190f6c5 100644 --- a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt +++ b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.kt @@ -4,34 +4,34 @@ package test import test.topLevelFun import test.topLevelProperty -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun topLevelFun(){} -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) var topLevelProperty = 1 -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun String.topLevelExtensionFun(){} -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) val String.topLevelExtensionProperty: Int get() = 1 open class A { constructor(p: Int) : this("") {} - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) constructor(s: String){} - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) open fun memberFun(){} - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) val memberProperty = 1 - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun String.memberExtensionFun(){} - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) val String.memberExtensionProperty: Int get() = 1 fun foo() { @@ -50,10 +50,10 @@ open class A { } interface I { - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun foo1() - @HiddenDeclaration + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun foo2() } diff --git a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.txt b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.txt index d8dde751ccc..de9bc5ff054 100644 --- a/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.txt +++ b/compiler/testData/diagnostics/tests/resolve/HiddenDeclarations.txt @@ -1,52 +1,52 @@ package package test { - @kotlin.HiddenDeclaration() public var topLevelProperty: kotlin.Int - @kotlin.HiddenDeclaration() public val kotlin.String.topLevelExtensionProperty: kotlin.Int - @kotlin.HiddenDeclaration() public fun topLevelFun(): kotlin.Unit - @kotlin.HiddenDeclaration() public fun kotlin.String.topLevelExtensionFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public var topLevelProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public val kotlin.String.topLevelExtensionProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public fun topLevelFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public fun kotlin.String.topLevelExtensionFun(): kotlin.Unit public open class A { public constructor A(/*0*/ p: kotlin.Int) - @kotlin.HiddenDeclaration() public constructor A(/*0*/ s: kotlin.String) - @kotlin.HiddenDeclaration() public final val memberProperty: kotlin.Int = 1 - @kotlin.HiddenDeclaration() public final val kotlin.String.memberExtensionProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public constructor A(/*0*/ s: kotlin.String) + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final val memberProperty: kotlin.Int = 1 + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final val kotlin.String.memberExtensionProperty: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - @kotlin.HiddenDeclaration() public open fun memberFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public open fun memberFun(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - @kotlin.HiddenDeclaration() public final fun kotlin.String.memberExtensionFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final fun kotlin.String.memberExtensionFun(): kotlin.Unit } public final class B : test.A { public constructor B() - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ fun memberFun(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit } public final class C : test.A { public constructor C() - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ val memberProperty: kotlin.Int + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ val kotlin.String.memberExtensionProperty: kotlin.Int public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public final override /*1*/ /*fake_override*/ fun foo(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int - @kotlin.HiddenDeclaration() public open override /*1*/ /*fake_override*/ fun memberFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public open override /*1*/ /*fake_override*/ fun memberFun(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String - @kotlin.HiddenDeclaration() public final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public final override /*1*/ /*fake_override*/ fun kotlin.String.memberExtensionFun(): kotlin.Unit } public interface I { public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean - @kotlin.HiddenDeclaration() public abstract fun foo1(): kotlin.Unit - @kotlin.HiddenDeclaration() public abstract fun foo2(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public abstract fun foo1(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public abstract fun foo2(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } @@ -55,7 +55,7 @@ package test { public constructor X() public open override /*1*/ /*fake_override*/ fun equals(/*0*/ other: kotlin.Any?): kotlin.Boolean public open override /*1*/ fun foo1(): kotlin.Unit - @kotlin.HiddenDeclaration() public abstract override /*1*/ /*fake_override*/ fun foo2(): kotlin.Unit + @kotlin.Deprecated(level = DeprecationLevel.HIDDEN, message = "hidden") public abstract override /*1*/ /*fake_override*/ fun foo2(): kotlin.Unit public open override /*1*/ /*fake_override*/ fun hashCode(): kotlin.Int public open override /*1*/ /*fake_override*/ fun toString(): kotlin.String } diff --git a/compiler/testData/writeFlags/hidden/function.kt b/compiler/testData/writeFlags/hidden/function.kt index a38f7cd1dc6..1a5e697d8f1 100644 --- a/compiler/testData/writeFlags/hidden/function.kt +++ b/compiler/testData/writeFlags/hidden/function.kt @@ -1,7 +1,8 @@ class MyClass() { - @HiddenDeclaration fun test() {} + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) + fun test() {} } // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: MyClass, test -// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL +// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL, ACC_DEPRECATED diff --git a/compiler/testData/writeFlags/hidden/propertyGetter.kt b/compiler/testData/writeFlags/hidden/propertyGetter.kt index 5520fd0c600..ee1f82749e4 100644 --- a/compiler/testData/writeFlags/hidden/propertyGetter.kt +++ b/compiler/testData/writeFlags/hidden/propertyGetter.kt @@ -1,9 +1,10 @@ class MyClass() { - @HiddenDeclaration var test: Int + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) + var test: Int get() = 0 set(value) {} } // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: MyClass, getTest -// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL +// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL, ACC_DEPRECATED diff --git a/compiler/testData/writeFlags/hidden/propertySetter.kt b/compiler/testData/writeFlags/hidden/propertySetter.kt index 467568cdab9..bc046e313ca 100644 --- a/compiler/testData/writeFlags/hidden/propertySetter.kt +++ b/compiler/testData/writeFlags/hidden/propertySetter.kt @@ -1,9 +1,10 @@ class MyClass() { - @HiddenDeclaration var test: Int + @Deprecated("hidden", level = DeprecationLevel.HIDDEN) + var test: Int get() = 0 set(value) {} } // TESTED_OBJECT_KIND: function // TESTED_OBJECTS: MyClass, setTest -// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL +// FLAGS: ACC_SYNTHETIC, ACC_PUBLIC, ACC_FINAL, ACC_DEPRECATED diff --git a/core/reflection.jvm/src/kotlin/reflect/jvm/_Deprecated.kt b/core/reflection.jvm/src/kotlin/reflect/jvm/_Deprecated.kt index 926031282d2..80be186598f 100644 --- a/core/reflection.jvm/src/kotlin/reflect/jvm/_Deprecated.kt +++ b/core/reflection.jvm/src/kotlin/reflect/jvm/_Deprecated.kt @@ -46,12 +46,10 @@ public var KProperty<*>.accessible: Boolean get() = isAccessible set(value) { isAccessible = value } -@HiddenDeclaration -@Deprecated("Moved to package kotlin.jvm", ReplaceWith("java")) +@Deprecated("Moved to package kotlin.jvm", ReplaceWith("java"), level = DeprecationLevel.HIDDEN) public val KClass.java: Class get() = java -@HiddenDeclaration -@Deprecated("Moved to package kotlin.jvm", ReplaceWith("kotlin")) +@Deprecated("Moved to package kotlin.jvm", ReplaceWith("kotlin"), level = DeprecationLevel.HIDDEN) public val Class.kotlin: KClass get() = kotlin diff --git a/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.dependency.kt b/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.dependency.kt index a24eb5c8577..8342fb89cca 100644 --- a/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.dependency.kt +++ b/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.dependency.kt @@ -1,14 +1,16 @@ package test -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun hiddenFun(){} fun notHiddenFun(){} -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) var hiddenProperty: Int = 1 var notHiddenProperty: Int = 1 -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) val String.hiddenExtension: Int get() = 1 + +// ALLOW_AST_ACCESS \ No newline at end of file diff --git a/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.kt b/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.kt index 02c5d2a983e..559d7137d95 100644 --- a/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.kt +++ b/idea/idea-completion/testData/basic/multifile/HiddenDeclarations/HiddenDeclarations.kt @@ -1,6 +1,6 @@ package test -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) fun hiddenFunFromSameFile(){} fun String.foo() { diff --git a/idea/testData/inspections/conflictingExtensionProperty/File.kt b/idea/testData/inspections/conflictingExtensionProperty/File.kt index 9a5fa1b3960..9cc767bea8d 100644 --- a/idea/testData/inspections/conflictingExtensionProperty/File.kt +++ b/idea/testData/inspections/conflictingExtensionProperty/File.kt @@ -15,6 +15,6 @@ class MyFile : File("") val MyFile.isFile: Boolean get() = isFile() -@HiddenDeclaration +@Deprecated("hidden", level = DeprecationLevel.HIDDEN) val Thread.priority: Int get() = getPriority() diff --git a/libraries/stdlib/src/kotlin/concurrent/Thread.kt b/libraries/stdlib/src/kotlin/concurrent/Thread.kt index 3520da13e3a..a1062277dc8 100644 --- a/libraries/stdlib/src/kotlin/concurrent/Thread.kt +++ b/libraries/stdlib/src/kotlin/concurrent/Thread.kt @@ -2,7 +2,9 @@ @file:JvmName("ThreadsKt") package kotlin.concurrent -import java.util.concurrent.* +import java.util.concurrent.Executor +import java.util.concurrent.ExecutorService +import java.util.concurrent.Future /** * Returns the current thread. @@ -13,8 +15,7 @@ public val currentThread: Thread /** * Exposes the name of this thread as a property. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name"), level = DeprecationLevel.HIDDEN) public var Thread.name: String get() = getName() set(value) { @@ -42,8 +43,7 @@ public val Thread.alive: Boolean /** * Exposes the priority of this thread as a property. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("priority")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("priority"), level = DeprecationLevel.HIDDEN) public var Thread.priority: Int get() = getPriority() set(value) { @@ -53,8 +53,7 @@ public var Thread.priority: Int /** * Exposes the context class loader of this thread as a property. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("contextClassLoader")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("contextClassLoader"), level = DeprecationLevel.HIDDEN) public var Thread.contextClassLoader: ClassLoader? get() = getContextClassLoader() set(value) { diff --git a/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt b/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt index b489bfd9fba..58a7754b756 100644 --- a/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt +++ b/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt @@ -7,31 +7,26 @@ import org.w3c.dom.events.EventTarget import org.w3c.dom.events.MouseEvent // JavaScript style properties for JVM : TODO could auto-generate these -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("bubbles")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("bubbles"), level = DeprecationLevel.HIDDEN) public val Event.bubbles: Boolean get() = getBubbles() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("cancelable")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("cancelable"), level = DeprecationLevel.HIDDEN) public val Event.cancelable: Boolean get() = getCancelable() public val Event.getCurrentTarget: EventTarget? get() = getCurrentTarget() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("eventPhase")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("eventPhase"), level = DeprecationLevel.HIDDEN) public val Event.eventPhase: Short get() = getEventPhase() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("target")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("target"), level = DeprecationLevel.HIDDEN) public val Event.target: EventTarget? get() = getTarget() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("timeStamp")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("timeStamp"), level = DeprecationLevel.HIDDEN) public val Event.timeStamp: Long get() = getTimeStamp() @@ -40,52 +35,42 @@ public val Event.eventType: String get() = getType()!! -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("altKey")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("altKey"), level = DeprecationLevel.HIDDEN) public val MouseEvent.altKey: Boolean get() = getAltKey() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("button")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("button"), level = DeprecationLevel.HIDDEN) public val MouseEvent.button: Short get() = getButton() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientX")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientX"), level = DeprecationLevel.HIDDEN) public val MouseEvent.clientX: Int get() = getClientX() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientY")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientY"), level = DeprecationLevel.HIDDEN) public val MouseEvent.clientY: Int get() = getClientY() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ctrlKey")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ctrlKey"), level = DeprecationLevel.HIDDEN) public val MouseEvent.ctrlKey: Boolean get() = getCtrlKey() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("metaKey")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("metaKey"), level = DeprecationLevel.HIDDEN) public val MouseEvent.metaKey: Boolean get() = getMetaKey() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("relatedTarget")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("relatedTarget"), level = DeprecationLevel.HIDDEN) public val MouseEvent.relatedTarget: EventTarget? get() = getRelatedTarget() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenX")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenX"), level = DeprecationLevel.HIDDEN) public val MouseEvent.screenX: Int get() = getScreenX() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenY")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenY"), level = DeprecationLevel.HIDDEN) public val MouseEvent.screenY: Int get() = getScreenY() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("shiftKey")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("shiftKey"), level = DeprecationLevel.HIDDEN) public val MouseEvent.shiftKey: Boolean get() = getShiftKey() diff --git a/libraries/stdlib/src/kotlin/dom/DomJVM.kt b/libraries/stdlib/src/kotlin/dom/DomJVM.kt index 039fdc9cc50..45a5edbaa55 100644 --- a/libraries/stdlib/src/kotlin/dom/DomJVM.kt +++ b/libraries/stdlib/src/kotlin/dom/DomJVM.kt @@ -31,13 +31,11 @@ public val Node.nodeName: String public val Node.nodeValue: String get() = getNodeValue() ?: "" -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nodeType")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nodeType"), level = DeprecationLevel.HIDDEN) public val Node.nodeType: Short get() = getNodeType() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("parentNode")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("parentNode"), level = DeprecationLevel.HIDDEN) public val Node.parentNode: Node? get() = getParentNode() @@ -45,38 +43,31 @@ public val Node.parentNode: Node? public val Node.childNodes: NodeList get() = getChildNodes()!! -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("firstChild")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("firstChild"), level = DeprecationLevel.HIDDEN) public val Node.firstChild: Node? get() = getFirstChild() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("lastChild")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("lastChild"), level = DeprecationLevel.HIDDEN) public val Node.lastChild: Node? get() = getLastChild() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nextSibling")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nextSibling"), level = DeprecationLevel.HIDDEN) public val Node.nextSibling: Node? get() = getNextSibling() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("previousSibling")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("previousSibling"), level = DeprecationLevel.HIDDEN) public val Node.previousSibling: Node? get() = getPreviousSibling() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("attributes")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("attributes"), level = DeprecationLevel.HIDDEN) public val Node.attributes: NamedNodeMap? get() = getAttributes() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ownerDocument")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ownerDocument"), level = DeprecationLevel.HIDDEN) public val Node.ownerDocument: Document? get() = getOwnerDocument() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("documentElement")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("documentElement"), level = DeprecationLevel.HIDDEN) public val Document.documentElement: Element? get() = this.getDocumentElement() @@ -103,33 +94,27 @@ public var Node.textContent: String setTextContent(value) } -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val DOMStringList.length: Int get() = this.getLength() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val NameList.length: Int get() = this.getLength() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val DOMImplementationList.length: Int get() = this.getLength() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val NodeList.length: Int get() = this.getLength() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val CharacterData.length: Int get() = this.getLength() -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length"), level = DeprecationLevel.HIDDEN) public val NamedNodeMap.length: Int get() = this.getLength() diff --git a/libraries/stdlib/src/kotlin/io/files/Utils.kt b/libraries/stdlib/src/kotlin/io/files/Utils.kt index f94a668d917..478568f4f33 100644 --- a/libraries/stdlib/src/kotlin/io/files/Utils.kt +++ b/libraries/stdlib/src/kotlin/io/files/Utils.kt @@ -61,24 +61,21 @@ public val File.parent: File? /** * Returns the canonical path of this file. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("canonicalPath")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("canonicalPath"), level = DeprecationLevel.HIDDEN) public val File.canonicalPath: String get() = getCanonicalPath() /** * Returns the file name. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name"), level = DeprecationLevel.HIDDEN) public val File.name: String get() = getName() /** * Returns the file path. */ -@HiddenDeclaration -@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("path")) +@Deprecated("Is replaced with automatic synthetic extension", ReplaceWith("path"), level = DeprecationLevel.HIDDEN) public val File.path: String get() = getPath() diff --git a/libraries/stdlib/src/kotlin/util/Ordering.kt b/libraries/stdlib/src/kotlin/util/Ordering.kt index 272c47661c8..9fd78bea4bd 100644 --- a/libraries/stdlib/src/kotlin/util/Ordering.kt +++ b/libraries/stdlib/src/kotlin/util/Ordering.kt @@ -19,8 +19,7 @@ package kotlin import java.util.Comparator -@HiddenDeclaration -@Deprecated("Use compareValuesBy", ReplaceWith("compareValuesBy(a, b, *selectors)")) +@Deprecated("Use compareValuesBy", ReplaceWith("compareValuesBy(a, b, *selectors)"), level = DeprecationLevel.HIDDEN) public fun compareValuesByNullable(a: T, b: T, vararg selectors: (T) -> Comparable<*>?): Int = compareValuesBy(a, b, *selectors) /**