Submit Search
Upload
僕の考えるAPT開発の常識
•
16 likes
•
3,771 views
Masahiro Wakame
Follow
2011/04/08 トップゲート社内で実施した勉強会の発表資料
Read less
Read more
Technology
Report
Share
Report
Share
1 of 35
Download now
Download to read offline
Recommended
Elementary Sort
Elementary Sort
Sri Prasanna
Javascript basic course
Javascript basic course
Tran Khoa
Developing a Language
Developing a Language
evanphx
Developing a Language
Developing a Language
Engine Yard
Basic Javascript
Basic Javascript
Bunlong Van
JavaScript 101
JavaScript 101
Sven Lito
Lecture08 stacks and-queues_v3
Lecture08 stacks and-queues_v3
Hariz Mustafa
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynote
Emil Eifrem
Recommended
Elementary Sort
Elementary Sort
Sri Prasanna
Javascript basic course
Javascript basic course
Tran Khoa
Developing a Language
Developing a Language
evanphx
Developing a Language
Developing a Language
Engine Yard
Basic Javascript
Basic Javascript
Bunlong Van
JavaScript 101
JavaScript 101
Sven Lito
Lecture08 stacks and-queues_v3
Lecture08 stacks and-queues_v3
Hariz Mustafa
NOSQL part of the SpringOne 2GX 2010 keynote
NOSQL part of the SpringOne 2GX 2010 keynote
Emil Eifrem
Lecture02 class -_templatev2
Lecture02 class -_templatev2
Hariz Mustafa
Modul Praktek Java OOP
Modul Praktek Java OOP
Zaenal Arifin
Exploring type level programming in Scala
Exploring type level programming in Scala
Jorge Vásquez
Java2
Java2
Shridhar Ramesh
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JSFestUA
Java Generics - by Example
Java Generics - by Example
Ganesh Samarthyam
Iphone course 1
Iphone course 1
Janet Huang
A Prelude of Purity: Scaling Back ZIO
A Prelude of Purity: Scaling Back ZIO
Jorge Vásquez
Java 7 New Features
Java 7 New Features
Jussi Pohjolainen
Java SE 8 best practices
Java SE 8 best practices
Stephen Colebourne
Database handling with room
Database handling with room
Sergi Martínez
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
Masahiro Wakame
CPython 3.2 SourceCodeReading
CPython 3.2 SourceCodeReading
Shinya Kawanaka
appengine java night #1
appengine java night #1
Shinichi Ogawa
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
潤一 加藤
みゆっき☆Think#7 「本気で学ぶJavascript」
みゆっき☆Think#7 「本気で学ぶJavascript」
techtalkdwango
第7回みゆっき☆Think 本気で学ぶ JavaScript
第7回みゆっき☆Think 本気で学ぶ JavaScript
Takuya Fujimura
2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
ikailan
Appengine Java Night #2a
Appengine Java Night #2a
Shinichi Ogawa
Interface result set
Interface result set
myrajendra
Serializing EMF models with Xtext
Serializing EMF models with Xtext
meysholdt
ERRest and Dojo
ERRest and Dojo
WO Community
More Related Content
What's hot
Lecture02 class -_templatev2
Lecture02 class -_templatev2
Hariz Mustafa
Modul Praktek Java OOP
Modul Praktek Java OOP
Zaenal Arifin
Exploring type level programming in Scala
Exploring type level programming in Scala
Jorge Vásquez
Java2
Java2
Shridhar Ramesh
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JSFestUA
Java Generics - by Example
Java Generics - by Example
Ganesh Samarthyam
Iphone course 1
Iphone course 1
Janet Huang
A Prelude of Purity: Scaling Back ZIO
A Prelude of Purity: Scaling Back ZIO
Jorge Vásquez
Java 7 New Features
Java 7 New Features
Jussi Pohjolainen
Java SE 8 best practices
Java SE 8 best practices
Stephen Colebourne
Database handling with room
Database handling with room
Sergi Martínez
What's hot
(11)
Lecture02 class -_templatev2
Lecture02 class -_templatev2
Modul Praktek Java OOP
Modul Praktek Java OOP
Exploring type level programming in Scala
Exploring type level programming in Scala
Java2
Java2
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
JS Fest 2019. Max Koretskiy. A sneak peek into super optimized code in JS fra...
Java Generics - by Example
Java Generics - by Example
Iphone course 1
Iphone course 1
A Prelude of Purity: Scaling Back ZIO
A Prelude of Purity: Scaling Back ZIO
Java 7 New Features
Java 7 New Features
Java SE 8 best practices
Java SE 8 best practices
Database handling with room
Database handling with room
Similar to 僕の考えるAPT開発の常識
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
Masahiro Wakame
CPython 3.2 SourceCodeReading
CPython 3.2 SourceCodeReading
Shinya Kawanaka
appengine java night #1
appengine java night #1
Shinichi Ogawa
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
潤一 加藤
みゆっき☆Think#7 「本気で学ぶJavascript」
みゆっき☆Think#7 「本気で学ぶJavascript」
techtalkdwango
第7回みゆっき☆Think 本気で学ぶ JavaScript
第7回みゆっき☆Think 本気で学ぶ JavaScript
Takuya Fujimura
2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
ikailan
Appengine Java Night #2a
Appengine Java Night #2a
Shinichi Ogawa
Interface result set
Interface result set
myrajendra
Serializing EMF models with Xtext
Serializing EMF models with Xtext
meysholdt
ERRest and Dojo
ERRest and Dojo
WO Community
Java
Java
JAy YourJust'one
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
ZongXian Shen
About Python
About Python
Shao-Chuan Wang
Domänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit Xtext
Dr. Jan Köhnlein
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
Quinton Sheppard
State of GeoTools 2012
State of GeoTools 2012
Jody Garnett
Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing Part
Gabriele Lana
Kotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platforms
Kirill Rozov
Kotlin for Android Developers - 3
Kotlin for Android Developers - 3
Mohamed Nabil, MSc.
Similar to 僕の考えるAPT開発の常識
(20)
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
僕の考えるAPT開発の常識 ぐだ生 2011/04/09版
CPython 3.2 SourceCodeReading
CPython 3.2 SourceCodeReading
appengine java night #1
appengine java night #1
コードで学ぶドメイン駆動設計入門
コードで学ぶドメイン駆動設計入門
みゆっき☆Think#7 「本気で学ぶJavascript」
みゆっき☆Think#7 「本気で学ぶJavascript」
第7回みゆっき☆Think 本気で学ぶ JavaScript
第7回みゆっき☆Think 本気で学ぶ JavaScript
2011 july-nyc-gtug-go
2011 july-nyc-gtug-go
Appengine Java Night #2a
Appengine Java Night #2a
Interface result set
Interface result set
Serializing EMF models with Xtext
Serializing EMF models with Xtext
ERRest and Dojo
ERRest and Dojo
Java
Java
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
(COSCUP 2015) A Beginner's Journey to Mozilla SpiderMonkey JS Engine
About Python
About Python
Domänenspezifische Sprachen mit Xtext
Domänenspezifische Sprachen mit Xtext
Awesomeness of JavaScript…almost
Awesomeness of JavaScript…almost
State of GeoTools 2012
State of GeoTools 2012
Refactoring In Tdd The Missing Part
Refactoring In Tdd The Missing Part
Kotlin 1.2: Sharing code between platforms
Kotlin 1.2: Sharing code between platforms
Kotlin for Android Developers - 3
Kotlin for Android Developers - 3
More from Masahiro Wakame
GoCon2016 spring 自作Webフレームワーク uconを作った話
GoCon2016 spring 自作Webフレームワーク uconを作った話
Masahiro Wakame
GoCon 2015 Summer GoのASTをいじくって新しいツールを作る
GoCon 2015 Summer GoのASTをいじくって新しいツールを作る
Masahiro Wakame
ng-japan 2015 TypeScript+AngularJS 1.3
ng-japan 2015 TypeScript+AngularJS 1.3
Masahiro Wakame
TypeScriptは明日から使うべき
TypeScriptは明日から使うべき
Masahiro Wakame
TypeScript 型定義ファイルのある開発 TypeScript勉強会 VSハッカソン倶楽部
TypeScript 型定義ファイルのある開発 TypeScript勉強会 VSハッカソン倶楽部
Masahiro Wakame
Google Glass XE17版
Google Glass XE17版
Masahiro Wakame
Google Glassでできること XE12版 最新開発情報 Mirror API & GDK
Google Glassでできること XE12版 最新開発情報 Mirror API & GDK
Masahiro Wakame
コンパイラ指向ReVIEW
コンパイラ指向ReVIEW
Masahiro Wakame
20ヶ月を取り戻す Dart flight school
20ヶ月を取り戻す Dart flight school
Masahiro Wakame
TypeScript 独習会
TypeScript 独習会
Masahiro Wakame
Google Glassでできること XE11版 最新開発情報 Mirror API & GDK
Google Glassでできること XE11版 最新開発情報 Mirror API & GDK
Masahiro Wakame
CEATEC Glassware(Google Glassアプリ)開発の指南と開発事例
CEATEC Glassware(Google Glassアプリ)開発の指南と開発事例
Masahiro Wakame
ReVIEW & CI - ChefでCI環境構築
ReVIEW & CI - ChefでCI環境構築
Masahiro Wakame
Firefox OS勉強会 2nd TypeScript+AngularJS
Firefox OS勉強会 2nd TypeScript+AngularJS
Masahiro Wakame
AngularJS+TypeScript - AngularJS 1周年記念勉強会
AngularJS+TypeScript - AngularJS 1周年記念勉強会
Masahiro Wakame
Buildinsider OFFLINE TypeScriptの基礎から実践・利用事例まで
Buildinsider OFFLINE TypeScriptの基礎から実践・利用事例まで
Masahiro Wakame
俺とお前とGoogleware
俺とお前とGoogleware
Masahiro Wakame
Datastoreへのアクセスを楽してMemcacheアクセスに置き換えるライブラリ作った
Datastoreへのアクセスを楽してMemcacheアクセスに置き換えるライブラリ作った
Masahiro Wakame
TypeScript 勉強会
TypeScript 勉強会
Masahiro Wakame
TypeScript Hands-on
TypeScript Hands-on
Masahiro Wakame
More from Masahiro Wakame
(20)
GoCon2016 spring 自作Webフレームワーク uconを作った話
GoCon2016 spring 自作Webフレームワーク uconを作った話
GoCon 2015 Summer GoのASTをいじくって新しいツールを作る
GoCon 2015 Summer GoのASTをいじくって新しいツールを作る
ng-japan 2015 TypeScript+AngularJS 1.3
ng-japan 2015 TypeScript+AngularJS 1.3
TypeScriptは明日から使うべき
TypeScriptは明日から使うべき
TypeScript 型定義ファイルのある開発 TypeScript勉強会 VSハッカソン倶楽部
TypeScript 型定義ファイルのある開発 TypeScript勉強会 VSハッカソン倶楽部
Google Glass XE17版
Google Glass XE17版
Google Glassでできること XE12版 最新開発情報 Mirror API & GDK
Google Glassでできること XE12版 最新開発情報 Mirror API & GDK
コンパイラ指向ReVIEW
コンパイラ指向ReVIEW
20ヶ月を取り戻す Dart flight school
20ヶ月を取り戻す Dart flight school
TypeScript 独習会
TypeScript 独習会
Google Glassでできること XE11版 最新開発情報 Mirror API & GDK
Google Glassでできること XE11版 最新開発情報 Mirror API & GDK
CEATEC Glassware(Google Glassアプリ)開発の指南と開発事例
CEATEC Glassware(Google Glassアプリ)開発の指南と開発事例
ReVIEW & CI - ChefでCI環境構築
ReVIEW & CI - ChefでCI環境構築
Firefox OS勉強会 2nd TypeScript+AngularJS
Firefox OS勉強会 2nd TypeScript+AngularJS
AngularJS+TypeScript - AngularJS 1周年記念勉強会
AngularJS+TypeScript - AngularJS 1周年記念勉強会
Buildinsider OFFLINE TypeScriptの基礎から実践・利用事例まで
Buildinsider OFFLINE TypeScriptの基礎から実践・利用事例まで
俺とお前とGoogleware
俺とお前とGoogleware
Datastoreへのアクセスを楽してMemcacheアクセスに置き換えるライブラリ作った
Datastoreへのアクセスを楽してMemcacheアクセスに置き換えるライブラリ作った
TypeScript 勉強会
TypeScript 勉強会
TypeScript Hands-on
TypeScript Hands-on
Recently uploaded
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
naman860154
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Maria Levchenko
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
Anna Loughnan Colquhoun
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
RTylerCroy
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Allon Mureinik
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
OnBoard
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
ThousandEyes
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
Radu Cotescu
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Pooja Nehwal
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
Sujit Pal
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
soniya singh
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
BookNet Canada
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Delhi Call girls
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
gurkirankumar98700
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
Malak Abu Hammad
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
Safe Software
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
Pixlogix Infotech
Recently uploaded
(20)
How to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
🐬 The future of MySQL is Postgres 🐘
🐬 The future of MySQL is Postgres 🐘
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
僕の考えるAPT開発の常識
1.
APT
Annotation Processing Tool TOPGATE 2011/04/08 2011 4 9
2.
@vvakame
↓ 2011 4 9
3.
Annotation 2011
4 9
4.
Annotation
@JsonModel public class Message { • Annotation = @JsonKey String id; • @JsonKey String room; • @JsonKey String text; • @Override @JsonKey String timestamp; 2011 4 9
5.
APT 2011
4 9
6.
APT
• Annotation Processing Tool • • • • 2011 4 9
7.
Slim3
APT • Entity ⇔ Model • Map<String, Object> POJO • • Reflection 2011 4 9
8.
←
→ • Reflection • • • • • • • • • 2011 4 9
9.
APT
Version 2011 4 9
10.
APT
Version • • com.sun.mirror • Java5 • Slim3 2011 4 9
11.
APT
Version • JSR 269 • javax.lang.model • Java6 (JSR270) • JsonPullParser • Project Coin(JSR334) 2011 4 9
12.
JsonPullParser
→ 2011 4 9
13.
Annotation
• @interface • Retention ( Annotation ) • Target ( Annotation ) @Retention(RetentionPolicy.SOURCE) @Target({ ElementType.FIELD }) JsonModel public @interface JsonKey { JsonKey public String value() default ""; public boolean in() default true; public boolean out() default true; public boolean decamelize() default false; } 2011 4 9
14.
AbstractProcessor
• @SupportedSourceVersion(SourceVersion.RELEASE_6) @SupportedAnnotationTypes("net.vvakame.util.jsonpullparser.annotation.*") public class JsonAnnotationProcessor extends AbstractProcessor { • EntryPoint • process • RoundEnviroment Element JsonAnnotationProcessor 2011 4 9
15.
RoundEnviroment
• Element • • • • Retention SOURCE Annotation … 2011 4 9
16.
Element
• Element • • Annotation Element • • (ex setter, getter ) • ClassGenerateHelper#ValueExtractVisitor 2011 4 9
17.
TypeMirror
• • Element→TypeMirror→ Element • … • Element … 2011 4 9
18.
Annotation
• Annotation APT @JsonModel(treatUnknownKeyAsError = true, String getElementKeyString(Element element) { decamelize = true) JsonKey key = element.getAnnotation(JsonKey.class); public class Hoge extends RecvGeoInfoLog { JsonModel model = element.getEnclosingElement() .getAnnotation(JsonModel.class); @JsonKey("foga") String keyStr; String piyo; if (!"".equals(key.value())) { keyStr = key.value(); @JsonKey(converter = DateConverter.class) } else if ("".equals(key.value()) && key.decamelize()) { Date at; keyStr = decamelize(element.toString()); } } else if ("".equals(key.value()) && model.decamelize()) { keyStr = decamelize(element.toString()); } else { keyStr = element.toString(); } return keyStr; } 2011 4 9
19.
Message
• • Element | JsonKey key = el.getAnnotation(JsonKey.class); String setter = getElementSetter(el); if (key.in() && setter == null) { Log.e("can't find setter method", el); encountError = true; return defaultAction(t, el); } Log 2011 4 9
20.
JavaFileObject
• Java • ProcessingEnvironment Filer • ClassGenerateHelper#write 2011 4 9
21.
• Util
• Elements Element • Types • TypeMirror • Visitor • Annotation, Element, TypeMirror ClassGenerateHelper#ValueExtractVisitor 2011 4 9
22.
•
APT jar • META-INF/services/ javax.annotation.processing.Processor • Processor FQN FQN = package + /src/main/resources/ 2011 4 9
23.
2011
4 9
24.
• Aptina
• UnitTest • TemplateEngine (MVEL) • • Eclipse • maven • jar 2011 4 9
25.
Aptina
• Aptina • Processor JUnit • Try&Error • UnitTest … • • … JsonAnnotationProcessorTest 2011 4 9
26.
TemplateEngine(MVEL)
• • • • Javadoc • ( ) MvelTemplate, JsonModelGen.java.mvel 2011 4 9
27.
maven
• jar • • Eclipse • • ... pom.xml 2011 4 9
28.
Formatter...?
• Java • ( ) • UnitTest … • FQN import … } else if ("place".equals(key)) { net.vvakame.sample.twitter.Place tmp = net.vvakame.sample.twitter.PlaceGenerated.get(parser); obj.setPlace(tmp); if (listener != null) { listener.onAdd(tmp); } 2011 4 9
29.
• core
• jar • apt • APT jar • APT UnitTest • usage • APT UnitTest • 2011 4 9
30.
Eclipse
• 1 • MVEL 2011 4 9
31.
2011
4 9
32.
JsonPullParser
• https://github.com/vvakame/JSONPullParser • APT Json→POJO Java • Android http://bit.ly/hFTbtP • Tweet →1Tweet • SengokuDroid server-side 2011 4 9
33.
2011
4 9
34.
• Android Slim3
• HamsterDB..? → GPL... • SQLite..? → KVS ... • MsgpackParser • Java Formatter 2011 4 9
35.
Minecraft 2011
4 9
Download now