1apt(1)                      General Commands Manual                     apt(1)
2
3
4

NAME

6       apt - annotation processing tool
7

SYNOPSIS

9       apt  [-classpath classpath] [-sourcepath sourcepath] [-d directory] [-s
10       directory] [-factorypath path] [-factory class]  [-print]  [-nocompile]
11       [-Akey[=val] ...] [javac option] sourcefiles [@files]
12

PARAMETERS

14       Options may be in any order. For a discussion of parameters which apply
15       to a specific option, see OPTIONS below.
16
17          sourcefiles
18             Zero or more source files to be processed.
19
20          @files
21             One or more files that list source files or other options
22
23

DESCRIPTION

25       Note: The apt tool and its associated  API  contained  in  the  package
26       com.sun.mirror  have  been deprecated since JDK 7 and are planned to be
27       removed in the next major JDK release. Use the options available in the
28       javac(1)  tool  and  the  APIs  contained in the packages javax.annota‐
29       tion.processing and javax.lang.model to process annotations.
30
31       The tool apt, annotation processing tool, includes reflective APIs  and
32       supporting  infrastructure  to  process  program  annotations.  The apt
33       reflective APIs provide a build-time, source-based, read-only  view  of
34       program  structure. These reflective APIs are designed to cleanly model
35       the Java(TM) programming language's type system after the  addition  of
36       generics.  First,  apt  runs annotation processors that can produce new
37       source code and other files. Next, apt can cause  compilation  of  both
38       original and generated source files, easing development. The reflective
39       APIs and other APIs used to interact with the tool are  subpackages  of
40       com.sun.mirror.
41
42       A  fuller  discussion  of how the tool operates as well as instructions
43       for developing with apt are in Getting Started with apt. @
44       http://docs.oracle.com/javase/7/docs/technotes/guides/apt/Get
45       tingStarted.html
46

OPTIONS

48   apt specific options
49          -s dir
50             Specify the directory root under which processor-generated source
51             files will be placed; files are placed in subdirectories based on
52             package namespace.
53
54          -nocompile
55             Do not compile source files to class files.
56
57          -print
58             Print out textual representation of specified types; perform no
59             annotation processing or compilation.
60
61          -A[key[=val]]
62             Options to pass to annotation processors -- these are not inter‐
63             preted by apt directly, but are made available for use by indi‐
64             vidual processors
65
66          -factorypath path
67             Specify where to find annotation processor factories; if this
68             option is used, the classpath is not searched for factories.
69
70          -factory classname
71             Name of annotation processor factory to use; bypasses default
72             discovery process
73
74          -version
75             Print version information.
76
77          -X Display information about non-standard options.
78
79
80   Options shared with javac
81          -d dir
82             Specify where to place processor and javac generated class files
83
84          -cp path or -classpath path
85             Specify where to find user class files and annotation processor
86             factories. If -factorypath is given, the classpath is not
87             searched for factories.
88
89
90       Consult the javac(1) man page for information on javac options.
91
92   Non-Standard Options
93          -XListAnnotationTypes
94             List found annotation types.
95
96          -XListDeclarations
97             List specified and included declarations.
98
99          -XPrintAptRounds
100             Print information about initial and recursive apt rounds.
101
102          -XPrintFactoryInfo
103             Print information about which annotations a factory is asked to
104             process.
105
106          -XclassesAsDecls
107             Treat both class and source files as declarations to process.
108
109
110       Note: Because these options are non-standard, they are subject to
111       change without notice.
112

NOTES

114       The apt tool and its associated API contained in the package
115       com.sun.mirror have been deprecated since JDK 7 and are planned to be
116       removed in the next major JDK release. Use the options available in the
117       javac(1) tool and the APIs contained in the packages javax.annota‐
118       tion.processing and javax.lang.model to process annotations.
119

SEE ALSO

121          o javac(1), java(1)
122
123
124                                  16 Mar 2012                           apt(1)
Impressum