プロジェクトでKotlinを導入した話

B6d9eb9a3825f15c84b5e7588c56a405?s=47 DMM.com
July 07, 2017

 プロジェクトでKotlinを導入した話

社内Kotlin勉強会でのLT資料を公開します!
サーバーサイドの Java プロジェクトの一部に Kotlin を導入した話!

B6d9eb9a3825f15c84b5e7588c56a405?s=128

DMM.com

July 07, 2017
Tweet

Transcript

  1. None
  2. None
  3. val text = """ for (c in "foo") print(c) """

  4. None
  5. None
  6. public interface UserMapper { @Select("select id, name, birthdate from users

    where id = # User select(int id); }
  7. interface UserMapper { @Select(""" select id, name, birthdate from users

    where id = #{id} """) fun select(id: Int): User }
  8. None
  9. String jobj = "{" + "\"key1\": \"val1\"," + "\"key2\": [\"val2a\",

    \"val2b\"]" + "}"; String jobj = "{\"key1\":\"val1\",\"key2\":[\"val2a\",\"val2b\" String jobj = new JSONObject() .put("key1", "val1") .put("key2", new JSONArray().put("val2a").put("val2b" .toString();
  10. val jobj = """ { "key1": "val1", "key2": ["val2a", "val2b"]

    } """
  11. doReturn(false).when(domain).isSuccess(); doReturn(false).`when`<Domain>(domain).isSuccess

  12. None