Name
apt — Annotation Processing Tool
Synopsis
apt [options]sourcefiles
Description
apt
reads and parses the
specified sourcefiles. Any annotations it
finds are passed to appropriate annotation processor factory objects,
which can use the annotations to produce auxiliary source or resource
files based on annotation content. apt next
compiles sourcefiles and generated files.
Annotation processor classes and factory classes are defined with the
com.sun.mirror.apt API and other subpackages of
com.sun.mirror.
Options
apt shares several options with
javac
. If a command-line argument begins with
@, apt treats it as a file
and reads options and source files from that specified file. See
javac for more on this.
-
-Aname=value Passes the
name=valuepair as an argument to annotation processors.-
-cppath-classpathpath Sets the classpath. See javac.
-
-ddir The directory under which to place class files. See javac.
-
-factoryclassname Explicitly specifies the class name of the annotation processor factory to use.
-
-factorypathpath A path to search for annotation processor factories instead of searching the classpath.
-
-help Prints usage information and exits.
-
-nocompile Tells apt not to compile the
sourcefilesor any generated files.-
-print Simply parses the specified
sourcefilesand prints a synopsis of the types they define. Does not process annotations or compile any files.-
-sdir Specifies the root directory beneath which generated source files will be stored.
-
-sourceversion Specifies ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access