Slide 1

Slide 1 text

KDoc Ryo Sotoyama( @scal_ch )

Slide 2

Slide 2 text

About Me • ֎ࢁ ໆ (Ryo Sotoyama) • Twitter: @scal_ch • AndroidΞϓϦ࡞ͬͯ·͢

Slide 3

Slide 3 text

KDoc • KotlinͷυΩϡϝϯτهड़༻ݴޠ • Javadocͱॻ͖ํ͸ࣅ͍ͯΔ

Slide 4

Slide 4 text

Summary, Detailed Description fun doc() {}

Slide 5

Slide 5 text

Summary, Detailed Description /**
 * ࠷ॳͷߦʹ֓ཁΛॻ͘
 */ fun doc() {}

Slide 6

Slide 6 text

Summary, Detailed Description /**
 * ࠷ॳʹ֓ཁΛॻ͘
 *
 * վߦͨ͠ޙʹৄࡉΛॻ͘
 */ fun doc() {}

Slide 7

Slide 7 text

Link /**
 * Ϋϥε΁ͷϦϯΫ [android.app.Activity]
 */ fun doc() {}

Slide 8

Slide 8 text

Link import android.app.Activity /**
 * Activity΁ͷϦϯΫ [Activity]
 */ fun doc() {}

Slide 9

Slide 9 text

Link import android.app.Activity /**
 * [Activity΁ͷϦϯΫ][Activity]
 */ fun doc() {}

Slide 10

Slide 10 text

Link import android.app.Activity /**
 * [ؔ਺΁ͷϦϯΫ][Activity.onCreate]
 */ fun doc() {}

Slide 11

Slide 11 text

Link /**
 * [github](https://github.com/sckm) */ fun doc() {}

Slide 12

Slide 12 text

Block Tags

Slide 13

Slide 13 text

Function fun doc() { ... }

Slide 14

Slide 14 text

Function /**
 * @param arg argʹ͍ͭͯ
 */ fun doc(arg: String) { ... }

Slide 15

Slide 15 text

Function /**
 * @param[arg] argʹ͍ͭͯ
 */ fun doc(arg: String) { ... }

Slide 16

Slide 16 text

Function /**
 * @param arg argʹ͍ͭͯ * @return ໭Γ஋ʹ͍ͭͯ
 */ fun doc(arg: String): Int { ... }

Slide 17

Slide 17 text

Function /**
 * @param arg argʹ͍ͭͯ * @return ໭Γ஋ʹ͍ͭͯ * @receiver Ϩγʔόʹ͍ͭͯ
 */ fun String.doc(arg: String): Int { ... }

Slide 18

Slide 18 text

Function /** * @param T ܕύϥϝʔλT
 * @param arg argʹ͍ͭͯ * @return ໭Γ஋ʹ͍ͭͯ * @receiver Ϩγʔόʹ͍ͭͯ
 */ fun T.doc(arg: String): Int { ... }

Slide 19

Slide 19 text

Function /** * @param T ܕύϥϝʔλT
 * @param arg argʹ͍ͭͯ * @return ໭Γ஋ʹ͍ͭͯ * @receiver Ϩγʔόʹ͍ͭͯ * @throws IllegalArgumentException ྫ֎ * @exception IllegalArgumentException ྫ֎
 */ fun T.doc(arg: String): Int { ... }

Slide 20

Slide 20 text

Function /** * @param T ܕύϥϝʔλT
 * @param arg argʹ͍ͭͯ * @return ໭Γ஋ʹ͍ͭͯ * @receiver Ϩγʔόʹ͍ͭͯ * @throws IllegalArgumentException ྫ֎ * @exception IllegalArgumentException ྫ֎
 */ fun T.doc(arg: String): Int { ... }

Slide 21

Slide 21 text

Class class Doc

Slide 22

Slide 22 text

Class /**
 * @constructor ϓϥΠϚϦίϯετϥΫ
 */
 class Doc(val p: String)

Slide 23

Slide 23 text

Class /**
 * @constructor ϓϥΠϚϦίϯετϥΫ * @property p ϓϩύςΟp
 */
 class Doc(val p: String)

Slide 24

Slide 24 text

Sample fun usage() {
 val s = "str"
 doc(s)
 }
 
 /**
 * @sample usage
 */
 fun doc(arg: String): Int { ... }

Slide 25

Slide 25 text

Sample fun usage() {
 val s = "str"
 doc(s)
 }
 
 /**
 * @sample usage
 */
 fun doc(arg: String): Int { ... }

Slide 26

Slide 26 text

Tags /**
 * @see android.app.Activity
 * @author scache
 * @since 1.0
 * @suppress
 */
 class BlockTags

Slide 27

Slide 27 text

Tags /**
 * @see android.app.Activity
 * @author scache
 * @since 1.0
 * @suppress
 */ class BlockTags

Slide 28

Slide 28 text

Tags /**
 * @see android.app.Activity
 * @author scache
 * @since 1.0
 * @suppress
 */
 class BlockTags

Slide 29

Slide 29 text

Tags /**
 * @see android.app.Activity
 * @author scache
 * @since 1.0
 * @suppress
 */ class BlockTags

Slide 30

Slide 30 text

• Javadocͱॻ͖ํ͸΄ͱΜͲಉ͡ • DokkaΛ࢖͏ͱhtmlʹग़ྗՄೳ