J2Kコンバータをカスタマイズする

Bb0be4b9096f12090920d85107ad44cd?s=47 Paraya
July 03, 2018

 J2Kコンバータをカスタマイズする

2018/7/3 #love_kotlin vol2
paraya3636

Bb0be4b9096f12090920d85107ad44cd?s=128

Paraya

July 03, 2018
Tweet

Transcript

  1. 10.

    ७ਖ਼+,ίϯόʔλ͕ڧ੍తʹ /PO/VMMม׵͢Δ໰୊ public interface SampleInterface { String getText(Context context); int

    getValue(Context context); } interface SampleInterface { fun getText(context: Context): String fun getValue(context: Context): Int } /VMMBCMFͳ ίʔυͩͬͨͷ͕ /PO/VMMίʔυʹ ม׵͞Εͯ͠·͏ ʁ͕ͳ͍ʂ +BWB ,PUMJO
  2. 12.

    ७ਖ਼+,ίϯόʔλ͕ڧ੍తʹ /PO/VMMม׵͢Δ໰୊ Caused by: java.lang.IllegalArgumentException: Parameter specified as non-null is

    null: method kotlin.jvm.internal.Intrinsics.checkParameterIsNotNull, parameter context at org.paradrops.sample.SampleClass.getText(SampleClass.kt) at org.paradrops.sample.Main2Activity.onCreate(Main2Activity.java:14) at android.app.Activity.performCreate(Activity.java:6664) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1118) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2599) IllegalArgumentException: Parameter specified as non-null is null Ϋϥογϡͯ͠͠·͏ʂʂ
  3. 23.

    ,PUMJOͷ։ൃ؀ڥΛ༻ҙ ɾ *OUFMMJ+*%&" ɾ +%, ɾ CSFXJOTUBMMBOU ɾ IUUQTHJUIVCDPN+FU#SBJOTLPUMJO ɾ

    ৄࡉ͸!TIJSBKJ͞ΜͷϒϩάهࣄͳͲͰIUUQT TIJSBKJHJUIVCJPCMPHIPXUPLPOUSJCVUF WTFUVQ
  4. 26.

    ࣮ࡍʹ,PUMJOίʔυίϯόʔτ ͯ͠ΈΔ public interface SampleInterface { String getText(Context context); int

    getValue(Context context); } interface SampleInterface { fun getText(context: Context?): String? fun getValue(context: Context?): Int } /VMMBCMFͳ +BWBίʔυ ͩͬͨͷ͕ ͔ͬ͠Γͱ /VMMBCMFΛ อ࣋ͨ͠·· ม׵͞Ε͍ͯΔ +BWB ,PUMJO
  5. 29.