What is annotation processing in Java?

前端 未结 3 1334
余生分开走
余生分开走 2020-12-14 20:18

Quoting, Sun\'s Official Java Tutorial

Class names, \'HelloWorldApp\', are only accepted if annotation processing is explicitly requested

3条回答
  •  臣服心动
    2020-12-14 20:29

    "Annotation Processing" is a hook into the compile process of the java compiler, to analyse the source code for user defined annotations and handle then (by producing compiler errors, compiler warning, emitting source code, byte code ...).

    API reference: http://java.sun.com/javase/6/docs/api/javax/annotation/processing/package-summary.html

提交回复
热议问题