This domain may be for sale!
APT とは Annotation Processing Tool のことで、Java でコードの自動生成を行う際に利用される。 APT を利用すると、Java クラスやリソースの自動生成が可能となる。 インターネットに情報は結構あるのだが、昔のものが多くて、Eclipse に JAR を追加して云々とかそういう感じのものが多くて辛いので調べたことをまとめておく。 アノテーションを作る 適当なアノテーションを作る。 import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; @Retention(RetentionPolicy.SO
APT、Pluggable Annotation Processorは皆さんお使いでしょうか。 タイトルの通りですが、APTでimport文を取ってみます。 gradleはとりあえずこんな感じです。 今回はAPTのProcessorを作るプロジェクトですがAPTを使います(グルグル目) 準備 apply plugin: 'java' apply plugin: "net.ltgt.apt" buildscript { repositories { maven { url "https://plugins.gradle.org/m2/" } } dependencies { classpath "net.ltgt.gradle:gradle-apt-plugin:0.9" } } sourceCompatibility = 1.8 repositories { jcenter() } dep
Post by Hannes Dorfmann Jan 10, 2015 In this blog entry I would like to explain how to write an annotation processor. First, I am going to explain to you what annotation processing is, what you can do with that powerful tool and finally what you cannot do with it. In a second step we will implement a simple annotation processor step by step. The Basics To clarify a very important thing from the ve
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く