{"id":705,"date":"2020-10-20T23:50:36","date_gmt":"2020-10-20T14:50:36","guid":{"rendered":"http:\/\/batmask.dothome.co.kr\/?p=705"},"modified":"2025-09-12T17:39:02","modified_gmt":"2025-09-12T08:39:02","slug":"kotlin-delegated-properties","status":"publish","type":"post","link":"http:\/\/batmask.net\/index.php\/2020\/10\/20\/705\/","title":{"rendered":"Kotlin: Delegated Properties"},"content":{"rendered":"\n<p>Kotlin \uacf5\uc2dd \ubb38\uc11c\ub97c \ubcf4\uace0 \uc815\ub9ac\ud588\ub2e4. <a href=\"https:\/\/kotlinlang.org\/docs\/reference\/delegated-properties.html#delegated-properties\">\uacf5\uc2dd \ubb38\uc11c \ucc38\uc870<\/a>.<\/p>\n\n\n\n<p>property\ub4e4\uc758 \uac12\uc744 get(), set()\uc73c\ub85c \uad6c\ud604\ud574\uc57c \ud558\ub294 \uacbd\uc6b0, \uac19\uc740 \ud615\ud0dc\uc758 property\uac00 \ud544\uc694\ud558\uba74, \uac01 property\ub9c8\ub2e4 get(), set()\uc744 \uad6c\ud604\ud574\uc57c \ud55c\ub2e4. \uc774\ub7f0 \uacbd\uc6b0, \ud55c\ubc88\ub9cc \uad6c\ud604\ud574\uc11c \uc911\ubcf5\uc744 \uc81c\uac70\ud558\uba74 \uc88b\uc744 \uac83\uc774\ub2e4. \uc774\ub294 delegate\ub97c \ud1b5\ud574 \uac00\ub2a5\ud574\uc9c4\ub2e4. \uc608\ub97c \ub4e4\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \ucf00\uc774\uc2a4\ub4e4\uc774 \uc874\uc7ac\ud55c\ub2e4.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>lazy properties : \uac12\uc744 \ucc98\uc74c \uac00\uc838\uc62c \ub54c, \uc0dd\uc131 \ubc0f \uacc4\uc0b0\uc774 \uc774\ub8e8\uc5b4\uc9d0.<\/li>\n\n\n\n<li>observable properties : \uac12\uc758 \ubcc0\uacbd\uc2dc listener\ub4e4\uc774 \uc54c\ub9bc\uc744 \ubc1b\uc74c.<\/li>\n\n\n\n<li>storing properties in a map : property\ub4e4\uc758 \uac12\uc744 map\uc5d0 \uc800\uc7a5\ud574\ub193\uace0 \uac00\uc838\uc624\ub294 \uacbd\uc6b0.<\/li>\n<\/ul>\n\n\n\n<p>\uc774\ub7f0 \uacbd\uc6b0\ub4e4\uc744 \uc704\ud574, Kotlin\uc5d0\uc11c\ub294 delegated properties\ub97c \uc9c0\uc6d0\ud55c\ub2e4.\uc0ac\uc6a9\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class Example {\n    \/\/ syntax : val\/var &lt;property name>: &lt;Type> by &lt;expression>\n    var p: String by Delegate()\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">Example<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #768390\">\/\/ syntax : val\/var &lt;property name&gt;: &lt;Type&gt; by &lt;expression&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> p: <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">Delegate<\/span><span style=\"color: #ADBAC7\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>&#8216;by&#8217; \ud0a4\uc6cc\ub4dc\uac00 \uc0ac\uc6a9\ub418\uace0 property\uc758 get(), set()\uc740 Delegate \ud074\ub798\uc2a4\uc758 getValue(), setValue()\uc5d0\uac8c \uc704\uc784(delegated)\ub41c\ub2e4. Delegate \ud074\ub798\uc2a4\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>import kotlin.reflect.KProperty\n\nclass Delegate {\n    operator fun getValue(thisRef: Any?, property: KProperty&lt;*>): String {\n        return \"$thisRef, thank you for delegating '${property.name}' to me!\"\n    }\n \n    operator fun setValue(thisRef: Any?, property: KProperty&lt;*>, value: String) {\n        println(\"$value has been assigned to '${property.name}' in $thisRef.\")\n    }\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">kotlin.reflect.KProperty<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">Delegate<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">operator<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">getValue<\/span><span style=\"color: #ADBAC7\">(thisRef: <\/span><span style=\"color: #F69D50\">Any<\/span><span style=\"color: #ADBAC7\">?, property: <\/span><span style=\"color: #F69D50\">KProperty<\/span><span style=\"color: #ADBAC7\">&lt;*&gt;): <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #F47067\">return<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #96D0FF\">&quot;<\/span><span style=\"color: #6CB6FF\">$thisRef<\/span><span style=\"color: #96D0FF\">, thank you for delegating &#39;${property.name}&#39; to me!&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\"> <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">operator<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">setValue<\/span><span style=\"color: #ADBAC7\">(thisRef: <\/span><span style=\"color: #F69D50\">Any<\/span><span style=\"color: #ADBAC7\">?, property: <\/span><span style=\"color: #F69D50\">KProperty<\/span><span style=\"color: #ADBAC7\">&lt;*&gt;, <\/span><span style=\"color: #F47067\">value<\/span><span style=\"color: #ADBAC7\">: <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;<\/span><span style=\"color: #6CB6FF\">$value<\/span><span style=\"color: #96D0FF\"> has been assigned to &#39;${property.name}&#39; in <\/span><span style=\"color: #6CB6FF\">$thisRef<\/span><span style=\"color: #96D0FF\">.&quot;<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Standard delegates<\/h2>\n\n\n\n<p>Kotlin standard library\uc5d0\uc11c\ub294 \uc720\uc6a9\ud55c delegate\ub4e4\uc744 \ud45c\uc900\uc73c\ub85c \uc81c\uacf5\ud55c\ub2e4. <\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Lazy<\/h3>\n\n\n\n<p>lazy()\ub294 \ud568\uc218\uc774\ub2e4. <a href=\"https:\/\/kotlinlang.org\/api\/latest\/jvm\/stdlib\/kotlin\/lazy.html\">\ud45c\uc900 \ub77c\uc774\ube0c\ub7ec\ub9ac\ubb38\uc11c<\/a>\ub97c \ucc3e\uc544\ubcf4\uba74 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>fun &lt;T> lazy(initializer: () -> T): Lazy&lt;T><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> &lt;<\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">&gt; <\/span><span style=\"color: #DCBDFB\">lazy<\/span><span style=\"color: #ADBAC7\">(initializer: () <\/span><span style=\"color: #F47067\">-&gt;<\/span><span style=\"color: #ADBAC7\"> T): <\/span><span style=\"color: #F69D50\">Lazy<\/span><span style=\"color: #ADBAC7\">&lt;<\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ucc98\uc74c get()\uc774 \ud638\ucd9c\ub420 \ub54c, \uae30\uc220\ud55c \ub78c\ub2e4\ud568\uc218\uac00 \uc2e4\ud589\ub418\uace0 property\uc5d0 \uc800\uc7a5\ub41c\ub2e4. \uadf8 \ub2e4\uc74c \ubd80\ud130 get()\uc774 \ud638\ucd9c\ub418\uba74, \uc800\uc7a5\ub41c \uac12\uc774 \ubd88\ub824\uc9c0\uac8c \ub41c\ub2e4. <\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>val lazyValue: String by lazy {\n    println(\"computed!\")\n    \"Hello\"\n}\n\nfun main() {\n    println(lazyValue)\n    println(lazyValue)\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> lazyValue: <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">lazy<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;computed!&quot;<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #96D0FF\">&quot;Hello&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">main<\/span><span style=\"color: #ADBAC7\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(lazyValue)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(lazyValue)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>computed!\nHello\nHello<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #ADBAC7\">computed<\/span><span style=\"color: #F47067\">!<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">Hello<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">Hello<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\">Observable<\/h3>\n\n\n\n<p>Property\uc5d0 \ub300\ud55c observer \ud328\ud134\uc740 \uc790\uc8fc \uc0ac\uc6a9\ub41c\ub2e4. \uc774 \uacbd\uc6b0, Delegates.observable()\uc744 \uc0ac\uc6a9\ud558\uba74 \ud3b8\ud574\uc9c4\ub2e4. <a href=\"https:\/\/kotlinlang.org\/api\/latest\/jvm\/stdlib\/kotlin.properties\/-delegates\/observable.html\">\ub808\ud37c\ub7f0\uc2a4<\/a>\ub97c \ucc3e\uc544\ubcf4\uba74, \ub2e4\uc74c\uacfc \uac19\uc774 \uc815\uc758\ub41c\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>inline fun &lt;T> observable(\n    initialValue: T,\n    crossinline onChange: (property: KProperty&lt;*>, oldValue: T, newValue: T) -> Unit\n): ReadWriteProperty&lt;Any?, T><\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">inline<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> &lt;<\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">&gt; <\/span><span style=\"color: #DCBDFB\">observable<\/span><span style=\"color: #ADBAC7\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    initialValue: <\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">crossinline<\/span><span style=\"color: #ADBAC7\"> onChange: (<\/span><span style=\"color: #F69D50\">property<\/span><span style=\"color: #ADBAC7\">: <\/span><span style=\"color: #F69D50\">KProperty<\/span><span style=\"color: #ADBAC7\">&lt;*&gt;, <\/span><span style=\"color: #F69D50\">oldValue<\/span><span style=\"color: #ADBAC7\">: <\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #F69D50\">newValue<\/span><span style=\"color: #ADBAC7\">: <\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">) -&gt; <\/span><span style=\"color: #F69D50\">Unit<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">): <\/span><span style=\"color: #F69D50\">ReadWriteProperty<\/span><span style=\"color: #ADBAC7\">&lt;<\/span><span style=\"color: #F69D50\">Any<\/span><span style=\"color: #ADBAC7\">?, <\/span><span style=\"color: #F69D50\">T<\/span><span style=\"color: #ADBAC7\">&gt;<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uccab\ubc88\uc9f8 \ud30c\ub77c\ubbf8\ud130\ub294 \uae30\ubcf8\uac12\uc744 \ubc1b\uace0, \ub450\ubc88\uc9f8\ub294 onChange\uc5d0 \ud574\ub2f9\ud558\ub294 \ud568\uc218\ub97c \ubc1b\ub294\ub2e4. property, old, new 3\uac1c\uc758 argument\ub97c \uac16\uac8c \ub418\ub294\ub370, \uac12 \ubcc0\uacbd\uc2dc \ud638\ucd9c\ub418\ub294 \ubd80\ubd84\uc774\ub2e4. \uc2e4\uc81c \uad6c\ud604\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>import kotlin.properties.Delegates\n\nclass User {\n    var name: String by Delegates.observable(\"&lt;no name>\") {\n        prop, old, new ->\n        println(\"$old -> $new\")\n    }\n}\n\nfun main() {\n    val user = User()\n    user.name = \"first\"\n    user.name = \"second\"\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">import<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">kotlin.properties.Delegates<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">User<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> name: <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">Delegates<\/span><span style=\"color: #ADBAC7\">.<\/span><span style=\"color: #DCBDFB\">observable<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;&lt;no name&gt;&quot;<\/span><span style=\"color: #ADBAC7\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        prop, old, new <\/span><span style=\"color: #F47067\">-&gt;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">        <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;<\/span><span style=\"color: #6CB6FF\">$old<\/span><span style=\"color: #96D0FF\"> -&gt; <\/span><span style=\"color: #6CB6FF\">$new<\/span><span style=\"color: #96D0FF\">&quot;<\/span><span style=\"color: #ADBAC7\">)<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    }<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">main<\/span><span style=\"color: #ADBAC7\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> user <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">User<\/span><span style=\"color: #ADBAC7\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    user.name <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #96D0FF\">&quot;first&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    user.name <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #96D0FF\">&quot;second&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ubcf4\uba74 \uc54c \uc218 \uc788\ub4ef\uc774, observer \ud328\ud134 \uc804\uccb4\uac00 \uad6c\ud604\ub418\uc9c4 \uc54a\uace0, observer \ud328\ud134\uc774 \ud544\uc694\ud55c \uacbd\uc6b0, \uc27d\uac8c \uad6c\ud604\ud560 \uc218 \uc788\ub3c4\ub85d \ud574\uc900\ub2e4. <\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Delegating to another property<\/h2>\n\n\n\n<p>Kotlin 1.4 \ubd80\ud130 \ub2e4\ub978 property\uc758 getter, setter\ub85c delegate\uac00 \uac00\ub2a5\ud558\ub2e4. delegate \ubc1b\ub294 property \uc55e\uc5d0 &#8220;::&#8221; \ub97c \ubd99\uc5ec\uc8fc\uc5b4 \uc0ac\uc6a9\ud55c\ub2e4. \uc608\uc81c\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class MyClass(var memberInt: Int, val anotherClassInstance: ClassWithDelegate) {\n    var delegatedToMember: Int by this::memberInt\n    var delegatedToTopLevel: Int by ::topLevelInt\n    \n    val delegatedToAnotherClass: Int by anotherClassInstance::anotherClassInt\n}\nvar MyClass.extDelegated: Int by ::topLevelInt<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">MyClass<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> memberInt: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> anotherClassInstance: <\/span><span style=\"color: #F69D50\">ClassWithDelegate<\/span><span style=\"color: #ADBAC7\">) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> delegatedToMember: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">this<\/span><span style=\"color: #ADBAC7\">::<\/span><span style=\"color: #DCBDFB\">memberInt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> delegatedToTopLevel: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> ::<\/span><span style=\"color: #DCBDFB\">topLevelInt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> delegatedToAnotherClass: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">anotherClassInstance<\/span><span style=\"color: #ADBAC7\">::<\/span><span style=\"color: #DCBDFB\">anotherClassInt<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> MyClass.extDelegated: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> ::<\/span><span style=\"color: #DCBDFB\">topLevelInt<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uacf5\uc2dd\ubb38\uc11c\uc5d0\uc11c \uc88b\uc740 \uc608\ub97c \ubcf4\uc5ec\uc8fc\ub294\ub370, property \uc774\ub984\uc744 \ubcc0\uacbd\ud558\uba74\uc11c \uc774\uc804 \ubc84\uc804\uc758 \ud638\ud658\uc131\uc744 \uc720\uc9c0\ud558\ub294 \uacbd\uc6b0\uc774\ub2e4. \uc774\uc804 property\uc758 \uad6c\ud604\uc744 \uc0c8 propery\uc5d0\uac8c \uc704\uc784\ud574\uc8fc\uba74\ub41c\ub2e4. \uc608\uc81c\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(2 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class MyClass {\n   var newName: Int = 0\n   @Deprecated(\"Use 'newName' instead\", ReplaceWith(\"newName\"))\n   var oldName: Int by this::newName\n}\n\nfun main() {\n   val myClass = MyClass()\n   \/\/ Notification: 'oldName: Int' is deprecated.\n   \/\/ Use 'newName' instead\n   myClass.oldName = 42\n   println(myClass.newName) \/\/ 42\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">MyClass<\/span><span style=\"color: #ADBAC7\"> {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> newName: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">0<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #F69D50\">@Deprecated<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;Use &#39;newName&#39; instead&quot;<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #DCBDFB\">ReplaceWith<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #96D0FF\">&quot;newName&quot;<\/span><span style=\"color: #ADBAC7\">))<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #F47067\">var<\/span><span style=\"color: #ADBAC7\"> oldName: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">this<\/span><span style=\"color: #ADBAC7\">::<\/span><span style=\"color: #DCBDFB\">newName<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span>\n<span class=\"line\"><\/span>\n<span class=\"line\"><span style=\"color: #F47067\">fun<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">main<\/span><span style=\"color: #ADBAC7\">() {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> myClass <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">MyClass<\/span><span style=\"color: #ADBAC7\">()<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #768390\">\/\/ Notification: &#39;oldName: Int&#39; is deprecated.<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #768390\">\/\/ Use &#39;newName&#39; instead<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   myClass.oldName <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #6CB6FF\">42<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">   <\/span><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(myClass.newName) <\/span><span style=\"color: #768390\">\/\/ 42<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-dots\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">Storing properties in a map<\/h2>\n\n\n\n<p>\uc55e\uc11c \ub9d0\ud588\ub4ef, map \uc5d0 property\ub4e4\uc744 \uc800\uc7a5\ud558\ub294 \uacbd\uc6b0, \uc0ac\uc6a9\ud560 \uc218 \uc788\ub2e4. \uc774 \uacbd\uc6b0, delegate \ub300\uc0c1\uc73c\ub85c map\uc758 \uc778\uc2a4\ud134\uc2a4\ub97c \uc9c1\uc811 \uc0ac\uc6a9\ud558\uba74\ub41c\ub2e4. \uc774\ub807\uac8c \uad6c\ud604\uc2dc, property\ub97c \ucc38\uc870\ud558\uba74 map\uc73c\ub85c\ubd80\ud130 \uac12\uc744 \uac00\uc838\uc628\ub2e4. \uc608\uc81c\ub294 \ub2e4\uc74c\uacfc \uac19\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>class User(val map: Map&lt;String, Any?>) {\n    val name: String by map\n    val age: Int     by map\n}<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">class<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">User<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> map: <\/span><span style=\"color: #F69D50\">Map<\/span><span style=\"color: #ADBAC7\">&lt;<\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\">, <\/span><span style=\"color: #F69D50\">Any<\/span><span style=\"color: #ADBAC7\">?&gt;) {<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> name: <\/span><span style=\"color: #F69D50\">String<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">map<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> age: <\/span><span style=\"color: #F69D50\">Int<\/span><span style=\"color: #ADBAC7\">     <\/span><span style=\"color: #F69D50\">by<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #F69D50\">map<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">}<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\uc0dd\uc131\uc790\uc5d0 map\uc774 \uc815\uc758\ub418\uc5b4 \uc788\uace0, property\uc778 name\uacfc age\ub294 map\uc5d0 delegate\ud558\uace0 \uc788\ub2e4. User \uc778\uc2a4\ud134\uc2a4\ub97c \ud558\ub098 \uc0dd\uc131\ud574\ubcf4\uc790.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>val user = User(mapOf(\n    \"name\" to \"John Doe\",\n    \"age\"  to 25\n))<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #F47067\">val<\/span><span style=\"color: #ADBAC7\"> user <\/span><span style=\"color: #F47067\">=<\/span><span style=\"color: #ADBAC7\"> <\/span><span style=\"color: #DCBDFB\">User<\/span><span style=\"color: #ADBAC7\">(<\/span><span style=\"color: #DCBDFB\">mapOf<\/span><span style=\"color: #ADBAC7\">(<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #96D0FF\">&quot;name&quot;<\/span><span style=\"color: #ADBAC7\"> to <\/span><span style=\"color: #96D0FF\">&quot;John Doe&quot;<\/span><span style=\"color: #ADBAC7\">,<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">    <\/span><span style=\"color: #96D0FF\">&quot;age&quot;<\/span><span style=\"color: #ADBAC7\">  to <\/span><span style=\"color: #6CB6FF\">25<\/span><\/span>\n<span class=\"line\"><span style=\"color: #ADBAC7\">))<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>map\uc73c\ub85c \ucd08\uae30\ud654 \uc2dc\ucf30\uc9c0\ub9cc, \uc0ac\uc6a9\uc740 propery\ub85c \uc774\uc6a9\uac00\ub2a5\ud558\ub2e4.<\/p>\n\n\n\n<div class=\"wp-block-kevinbatdorf-code-block-pro cbp-has-line-numbers\" data-code-block-pro-font-family=\"Code-Pro-Roboto-Mono.ttf\" style=\"font-size:clamp(14px, .875rem, 21px);font-family:Code-Pro-Roboto-Mono,ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;--cbp-line-number-color:#adbac7;--cbp-line-number-width:calc(1 * 0.6 * .875rem);line-height:clamp(20px, 1.25rem, 30px);--cbp-tab-width:2;tab-size:var(--cbp-tab-width, 2)\"><span style=\"display:block;padding:16px 0 0 16px;margin-bottom:-1px;width:100%;text-align:left;background-color:#22272e\"><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"54\" height=\"14\" viewBox=\"0 0 54 14\"><g fill=\"none\" fill-rule=\"evenodd\" transform=\"translate(1 1)\"><circle cx=\"6\" cy=\"6\" r=\"6\" fill=\"#FF5F56\" stroke=\"#E0443E\" stroke-width=\".5\"><\/circle><circle cx=\"26\" cy=\"6\" r=\"6\" fill=\"#FFBD2E\" stroke=\"#DEA123\" stroke-width=\".5\"><\/circle><circle cx=\"46\" cy=\"6\" r=\"6\" fill=\"#27C93F\" stroke=\"#1AAB29\" stroke-width=\".5\"><\/circle><\/g><\/svg><\/span><span role=\"button\" tabindex=\"0\" style=\"color:#adbac7;display:none\" aria-label=\"Copy\" class=\"code-block-pro-copy-button\"><pre class=\"code-block-pro-copy-button-pre\" aria-hidden=\"true\"><textarea class=\"code-block-pro-copy-button-textarea\" tabindex=\"-1\" aria-hidden=\"true\" readonly>println(user.name) \/\/ Prints \"John Doe\"\nprintln(user.age)  \/\/ Prints 25<\/textarea><\/pre><svg xmlns=\"http:\/\/www.w3.org\/2000\/svg\" style=\"width:24px;height:24px\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\" stroke-width=\"2\"><path class=\"with-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4\"><\/path><path class=\"without-check\" stroke-linecap=\"round\" stroke-linejoin=\"round\" d=\"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2\"><\/path><\/svg><\/span><pre class=\"shiki github-dark-dimmed\" style=\"background-color: #22272e\" tabindex=\"0\"><code><span class=\"line\"><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(user.name) <\/span><span style=\"color: #768390\">\/\/ Prints &quot;John Doe&quot;<\/span><\/span>\n<span class=\"line\"><span style=\"color: #DCBDFB\">println<\/span><span style=\"color: #ADBAC7\">(user.age)  <\/span><span style=\"color: #768390\">\/\/ Prints 25<\/span><\/span><\/code><\/pre><\/div>\n\n\n\n<p>\ucd94\uac00\uc801\uc778 \ub0b4\uc6a9\uc774 \ub354 \uc788\uc9c0\ub9cc, \ub2f9\uc7a5\uc740 \uc774\uc815\ub3c4\uba74 \ucda9\ubd84\ud558\uc5ec \uc0dd\ub7b5\ud55c\ub2e4. \ucc98\uc74c \uc5b8\uae09\ud55c\ub300\ub85c <a href=\"https:\/\/kotlinlang.org\/docs\/reference\/delegated-properties.html#delegated-properties\">\uacf5\uc2dd\ubb38\uc11c\ub97c \uc815\ub9ac\ud55c \ub0b4\uc6a9\uc774\ub2c8 \uc774\ub97c \ucc38\uace0<\/a>\ud558\uba74\ub41c\ub2e4.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Kotlin \uacf5\uc2dd \ubb38\uc11c\ub97c \ubcf4\uace0 \uc815\ub9ac\ud588\ub2e4. \uacf5\uc2dd \ubb38\uc11c \ucc38\uc870. property\ub4e4\uc758 \uac12\uc744 get(), set()\uc73c\ub85c \uad6c\ud604\ud574\uc57c \ud558\ub294 \uacbd\uc6b0, \uac19\uc740 \ud615\ud0dc\uc758 property\uac00 \ud544\uc694\ud558\uba74, \uac01 property\ub9c8\ub2e4 get(), set()\uc744 \uad6c\ud604\ud574\uc57c \ud55c\ub2e4. \uc774\ub7f0 \uacbd\uc6b0, \ud55c\ubc88\ub9cc \uad6c\ud604\ud574\uc11c \uc911\ubcf5\uc744 \uc81c\uac70\ud558\uba74 \uc88b\uc744 \uac83\uc774\ub2e4. \uc774\ub294 delegate\ub97c \ud1b5\ud574 \uac00\ub2a5\ud574\uc9c4\ub2e4. \uc608\ub97c \ub4e4\uba74 \ub2e4\uc74c\uacfc \uac19\uc740 \ucf00\uc774\uc2a4\ub4e4\uc774 \uc874\uc7ac\ud55c\ub2e4. \uc774\ub7f0 \uacbd\uc6b0\ub4e4\uc744 \uc704\ud574, Kotlin\uc5d0\uc11c\ub294 delegated properties\ub97c \uc9c0\uc6d0\ud55c\ub2e4.\uc0ac\uc6a9\ubc95\uc740 \ub2e4\uc74c\uacfc \uac19\ub2e4. &#8216;by&#8217; \ud0a4\uc6cc\ub4dc\uac00 \uc0ac\uc6a9\ub418\uace0 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5,34],"tags":[189,190,38,162,41],"class_list":["post-705","post","type-post","status-publish","format-standard","hentry","category-android","category-kotlin","tag-delegate","tag-delegated-properties","tag-kotlin","tag-property","tag-kotlin-kr"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/705","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/comments?post=705"}],"version-history":[{"count":8,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/705\/revisions"}],"predecessor-version":[{"id":3508,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/posts\/705\/revisions\/3508"}],"wp:attachment":[{"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/media?parent=705"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/categories?post=705"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/batmask.net\/index.php\/wp-json\/wp\/v2\/tags?post=705"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}