APT2010   12   23         1
@vvakame                 Kinect   ↓                               Android                               appengine2010   12...
APT2010   12   23         3
APT                 • Annotation Processing Tool                 •                 •                     •                ...
meets Slim3                       http://amzn.to/e8noW82010   12   23                                 5
Slim3        APT                 • Entity ⇔ Model                  • Map<String, Object>                      POJO        ...
←                    →            •    Reflection   •            •                •            •                •          ...
                                  JavaSE5   JavaSE6   API                 Slim3                   JavaSE5               ...
• AbstractProcessor                   •                 • Messager                   •                      Warning    Err...
• Element                  •                  • javax.lang.model.element.*                 • TypeMirror                  •...
•       APT        jar                 • META-INF/services/                    javax.annotation.processing.Processor      ...
2010   12   23   12
• @Kazzz                   • http://d.hatena.ne.jp/Kazzz/20101208                 • Aptina                   •        Proc...
×                 •                     •                     • 2pass                               →2010   12   23       ...
FQN                 •                      import                     •                         • List   java.util.List   ...
•                     •                     •                 •                     •2010   12   23           16
• APT                  •                  • Annotation                                         Annotation                 ...
2010   12   23   18
JsonPullParser             • https://github.com/vvakame/JSONPullParser                 • APT Json→POJO             Java   ...
• 6000      Tweet         (MacBookPro)                 • JsonPullParser (POJO Mapping)                  • 1200ms          ...
• ClassWriterHelper.java                  •                , 2pass   etc                 • Log.java                  • and...
Slim3 1.0.6                               2.3.12010   12   23                         22
Upcoming SlideShare
Loading in...5
×

Androidで部 第7回 APTすごい

4,718

Published on

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
4,718
On Slideshare
0
From Embeds
0
Number of Embeds
7
Actions
Shares
0
Downloads
9
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Androidで部 第7回 APTすごい

  1. 1. APT2010 12 23 1
  2. 2. @vvakame Kinect ↓ Android appengine2010 12 23 2
  3. 3. APT2010 12 23 3
  4. 4. APT • Annotation Processing Tool • • • •2010 12 23 4
  5. 5. meets Slim3 http://amzn.to/e8noW82010 12 23 5
  6. 6. Slim3 APT • Entity ⇔ Model • Map<String, Object> POJO • • Reflection2010 12 23 6
  7. 7. ← → • Reflection • • • • • • •2010 12 23 7
  8. 8.   JavaSE5 JavaSE6 API Slim3 JavaSE5 JavaSE5 → com.sun.mirror . JavaSE6 → javax.model . JSR 269 JavaSE6 API2010 12 23 8
  9. 9. • AbstractProcessor • • Messager • Warning Error • ProcessingEnvironment • Elements, Types (Util ) • RoundEnvironment • (Annotation )2010 12 23 9
  10. 10. • Element • • javax.lang.model.element.* • TypeMirror • Primitive • javax.lang.model.type.*2010 12 23 10
  11. 11. • APT jar • META-INF/services/ javax.annotation.processing.Processor • Processor FQN FQN = package +2010 12 23 11
  12. 12. 2010 12 23 12
  13. 13. • @Kazzz • http://d.hatena.ne.jp/Kazzz/20101208 • Aptina • Processor JUnit • http://d.hatena.ne.jp/koichik/20090620 • printf • Eclipse ErrorLog2010 12 23 13
  14. 14. × • • • 2pass →2010 12 23 14
  15. 15. FQN • import • • List java.util.List •2010 12 23 15
  16. 16. • • • • •2010 12 23 16
  17. 17. • APT • • Annotation Annotation … • • Retention SOURCE→CLASS …orz2010 12 23 17
  18. 18. 2010 12 23 18
  19. 19. JsonPullParser • https://github.com/vvakame/JSONPullParser • APT Json→POJO Java • Android http://bit.ly/hFTbtP • Tweet →1Tweet • pom.xml , Benchmark, patch2010 12 23 19
  20. 20. • 6000 Tweet (MacBookPro) • JsonPullParser (POJO Mapping) • 1200ms • Jsonic (POJO Mapping) • 4400ms • JsonLib(JSONArray convert) • 3300ms • Jackson • orz2010 12 23 20
  21. 21. • ClassWriterHelper.java • , 2pass etc • Log.java • android.util.Log APT2010 12 23 21
  22. 22. Slim3 1.0.6 2.3.12010 12 23 22
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×