Designing Auto Generated Codes

download Designing Auto Generated Codes

of 49

  • date post

    12-Apr-2017
  • Category

    Technology

  • view

    1.250
  • download

    3

Embed Size (px)

Transcript of Designing Auto Generated Codes

  • Designing Auto Generated Codes

    17 Nov 2015 Roppongi.aar #2 @kikuchy

  • Hiroshi Kikuchi (@kikuchy)

    Belonging to , inc , Working on , inc (mixi group)

    Making Dating App for Android

    Strict review OJISAN

    Who am I

  • APT made our work reduced!!

    So, you use APT, and be happy!!

    \\( '' ) //

  • I was going to talk about like that, but

  • Oh, you are already using APT.

  • fin.

  • (^o^)

  • So, Ill talk about

  • Designing Auto Generated Codes

  • What is the best way to use Generated Code in our project?

    Please consider and discuss.

  • The Problem Make Us Wakeful

  • Case 1 (/2)

  • If you make an awesome library hiding generated codes

    // Fields@ExecuteSomethingString foo;

    // Executor class ThisClass$$Executor is generated.// My library loads executor class automatically!AwesomeLibrary.execute(this);

  • Alice changes Naming Rule of Generated Class.

    ex) (ClassName)$$Executor -> (ClassName)$$Doer

  • proguard-rules.pro ????

  • < Hey, I obfuscated your code!

    Proguard @ Production Build

  • Case 2 (/2)

  • If you make awesome proguard-safe library

    // Fields@ExecuteSomethingString foo;

    // Executor class ThisClassExecutor is generated.// There are no reflection, no ClassNotFoundException!!new ThisClassExecutor().execute(this);

  • Bob often asks you Whats the name of Generated Classes and methods and constructor arguments and

    interfaces will use in Generated Code blablabla

  • Why ask me repeatedly? Why I have to remember invisible codes?

    Bob