diff --git a/libraries/stdlib/src/kotlin/concurrent/Thread.kt b/libraries/stdlib/src/kotlin/concurrent/Thread.kt index 36fbb988b0a..6161a4acb0d 100644 --- a/libraries/stdlib/src/kotlin/concurrent/Thread.kt +++ b/libraries/stdlib/src/kotlin/concurrent/Thread.kt @@ -11,7 +11,8 @@ public val currentThread: Thread /** * Exposes the name of this thread as a property. */ -deprecated("Remove import of koltin.concurrent.name to use synthetic extension property instead.") +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) public var Thread.name: String get() = getName() set(value) { @@ -39,7 +40,8 @@ public val Thread.alive: Boolean /** * Exposes the priority of this thread as a property. */ -deprecated("Remove import of koltin.concurrent.priority to use synthetic extension property instead.") +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("priority")) public var Thread.priority: Int get() = getPriority() set(value) { @@ -49,7 +51,8 @@ public var Thread.priority: Int /** * Exposes the context class loader of this thread as a property. */ -deprecated("Remove import of koltin.concurrent.contextClassLoader to use synthetic extension property instead.") +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("contextClassLoader")) 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 8db6d0f2c4a..0f7ae45d086 100644 --- a/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt +++ b/libraries/stdlib/src/kotlin/dom/DomEventsJVM.kt @@ -1,24 +1,35 @@ package kotlin.dom -import org.w3c.dom.Node -import org.w3c.dom.events.* +import org.w3c.dom.events.Event +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")) public val Event.bubbles: Boolean get() = getBubbles() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("cancelable")) public val Event.cancelable: Boolean get() = getCancelable() public val Event.getCurrentTarget: EventTarget? get() = getCurrentTarget() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("eventPhase")) public val Event.eventPhase: Short get() = getEventPhase() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("target")) public val Event.target: EventTarget? get() = getTarget() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("timeStamp")) public val Event.timeStamp: Long get() = getTimeStamp() @@ -27,32 +38,52 @@ public val Event.eventType: String get() = getType()!! +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("altKey")) public val MouseEvent.altKey: Boolean get() = getAltKey() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("button")) public val MouseEvent.button: Short get() = getButton() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientX")) public val MouseEvent.clientX: Int get() = getClientX() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("clientY")) public val MouseEvent.clientY: Int get() = getClientY() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ctrlKey")) public val MouseEvent.ctrlKey: Boolean get() = getCtrlKey() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("metaKey")) public val MouseEvent.metaKey: Boolean get() = getMetaKey() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("relatedTarget")) public val MouseEvent.relatedTarget: EventTarget? get() = getRelatedTarget() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenX")) public val MouseEvent.screenX: Int get() = getScreenX() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("screenY")) public val MouseEvent.screenY: Int get() = getScreenY() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("shiftKey")) 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 58ec14b78cf..d1cbca17839 100644 --- a/libraries/stdlib/src/kotlin/dom/DomJVM.kt +++ b/libraries/stdlib/src/kotlin/dom/DomJVM.kt @@ -3,6 +3,8 @@ */ package kotlin.dom +import org.w3c.dom.* +import org.xml.sax.InputSource import java.io.File import java.io.InputStream import java.io.StringWriter @@ -16,8 +18,6 @@ import javax.xml.transform.Transformer import javax.xml.transform.TransformerFactory import javax.xml.transform.dom.DOMSource import javax.xml.transform.stream.StreamResult -import org.w3c.dom.* -import org.xml.sax.InputSource // JavaScript style properties - TODO could auto-generate these public val Node.nodeName: String @@ -26,33 +26,51 @@ public val Node.nodeName: String public val Node.nodeValue: String get() = getNodeValue() ?: "" +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nodeType")) public val Node.nodeType: Short get() = getNodeType() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("parentNode")) public val Node.parentNode: Node? get() = getParentNode() public val Node.childNodes: NodeList get() = getChildNodes()!! +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("firstChild")) public val Node.firstChild: Node? get() = getFirstChild() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("lastChild")) public val Node.lastChild: Node? get() = getLastChild() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("nextSibling")) public val Node.nextSibling: Node? get() = getNextSibling() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("previousSibling")) public val Node.previousSibling: Node? get() = getPreviousSibling() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("attributes")) public val Node.attributes: NamedNodeMap? get() = getAttributes() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("ownerDocument")) public val Node.ownerDocument: Document? get() = getOwnerDocument() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("documentElement")) public val Document.documentElement: Element? get() = this.getDocumentElement() @@ -74,21 +92,33 @@ public var Node.textContent: String setTextContent(value) } +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) public val DOMStringList.length: Int get() = this.getLength() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) public val NameList.length: Int get() = this.getLength() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) public val DOMImplementationList.length: Int get() = this.getLength() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) public val NodeList.length: Int get() = this.getLength() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) public val CharacterData.length: Int get() = this.getLength() +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("length")) 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 74b8c8b7a74..9448b447055 100644 --- a/libraries/stdlib/src/kotlin/io/files/Utils.kt +++ b/libraries/stdlib/src/kotlin/io/files/Utils.kt @@ -2,7 +2,7 @@ package kotlin.io import java.io.* import java.nio.charset.Charset -import java.util.ArrayList +import java.util.* /** * Creates an empty directory in the specified [directory], using the given [prefix] and [suffix] to generate its name. @@ -57,18 +57,24 @@ public val File.parent: File? /** * Returns the canonical path of this file. */ +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("canonicalPath")) public val File.canonicalPath: String get() = getCanonicalPath() /** * Returns the file name. */ +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("name")) public val File.name: String get() = getName() /** * Returns the file path. */ +@HiddenDeclaration +@deprecated("Is replaced with automatic synthetic extension", ReplaceWith("path")) public val File.path: String get() = getPath()