1 ." Copyright (c) 2004, 2012, Oracle and/or its affiliates. All rights reserved. 2 ." DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 ." 4 ." This code is free software; you can redistribute it and/or modify it 5 ." under the terms of the GNU General Public License version 2 only, as 6 ." published by the Free Software Foundation. 7 ." 8 ." This code is distributed in the hope that it will be useful, but WITHOUT 9 ." ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 10 ." FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 11 ." version 2 for more details (a copy is included in the LICENSE file that 12 ." accompanied this code). 13 ." 14 ." You should have received a copy of the GNU General Public License version 15 ." 2 along with this work; if not, write to the Free Software Foundation, 16 ." Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 17 ." 18 ." Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 19 ." or visit www.oracle.com if you need additional information or have any 20 ." questions. 21 ." 22 .TH apt 1 "10 May 2011" 23 24 .LP 25 .SH "NAME" 26 .LP 27 .LP 28 \f2apt\fP \- annotation processing tool 29 .LP 30 .SH "SYNOPSIS" 31 .LP 32 .LP 33 \f2apt [\-classpath \fP\f2classpath\fP] [\-sourcepath \f2sourcepath\fP] [\-d \f2directory\fP] [\-s \f2directory\fP] [\-factorypath \f2path\fP] [\-factory \f2class\fP] [\-print] [\-nocompile] [\-A\f2key\fP[\f2=val\fP] ...] [\f2javac option\fP] sourcefiles [@files] 34 .LP 35 .SH "PARAMETERS" 36 .LP 37 .LP 38 Options may be in any order. For a discussion of parameters which apply to a specific option, see OPTIONS below. 39 .LP 40 .RS 3 41 .TP 3 42 sourcefiles 43 Zero or more source files to be processed. 44 .TP 3 45 @files 46 One or more files that list source files or other options 47 .RE 48 49 .LP 50 .SH "DESCRIPTION" 51 .LP 52 .LP 53 \f3Note\fP: The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. 54 .LP 55 .LP 56 The tool \f2apt\fP, annotation processing tool, includes reflective APIs and supporting infrastructure to process program annotations. The \f2apt\fP reflective APIs provide a build\-time, source\-based, read\-only view of program structure. These reflective APIs are designed to cleanly model the Java(TM) programming language's type system after the addition of generics. First, \f2apt\fP runs annotation processors that can produce new source code and other files. Next, \f2apt\fP can cause compilation of both original and generated source files, easing development. The reflective APIs and other APIs used to interact with the tool are subpackages of \f2com.sun.mirror\fP. 57 .LP 58 .LP 59 A fuller discussion of how the tool operates as well as instructions for developing with \f2apt\fP are in 60 .na 61 \f4Getting Started with \fP\f4apt\fP. @ 62 .fi 63 http://download.oracle.com/javase/7/docs/technotes/guides/apt/GettingStarted.html 64 .LP 65 .SH "OPTIONS" 66 .LP 67 .SS 68 apt specific options 69 .LP 70 .RS 3 71 .TP 3 72 \-s dir 73 Specify the directory root under which processor\-generated source files will be placed; files are placed in subdirectories based on package namespace. 74 .TP 3 75 \-nocompile 76 Do not compile source files to class files. 77 .TP 3 78 \-print 79 Print out textual representation of specified types; perform no annotation processing or compilation. 80 .TP 3 81 \-A[key[=val]] 82 Options to pass to annotation processors \-\- these are not interpreted by \f2apt\fP directly, but are made available for use by individual processors 83 .TP 3 84 \-factorypath path 85 Specify where to find annotation processor factories; if this option is used, the classpath is \f2not\fP searched for factories. 86 .TP 3 87 \-factory classname 88 Name of annotation processor factory to use; bypasses default discovery process 89 .TP 3 90 \-version 91 Print version information. 92 .TP 3 93 \-X 94 Display information about non\-standard options. 95 .RE 96 97 .LP 98 .SS 99 Options shared with javac 100 .LP 101 .RS 3 102 .TP 3 103 \-d dir 104 Specify where to place processor and javac generated class files 105 .TP 3 106 \-cp path or \-classpath path 107 Specify where to find user class files and annotation processor factories. If \f2\-factorypath\fP is given, the classpath is not searched for factories. 108 .RE 109 110 .LP 111 .LP 112 Consult the javac(1) man page for information on \f2javac\fP options. 113 .LP 114 .SS 115 Non\-Standard Options 116 .LP 117 .RS 3 118 .TP 3 119 \-XListAnnotationTypes 120 List found annotation types. 121 .TP 3 122 \-XListDeclarations 123 List specified and included declarations. 124 .TP 3 125 \-XPrintAptRounds 126 Print information about initial and recursive \f2apt\fP rounds. 127 .TP 3 128 \-XPrintFactoryInfo 129 Print information about which annotations a factory is asked to process. 130 .TP 3 131 \-XclassesAsDecls 132 Treat both class and source files as declarations to process. 133 .RE 134 135 .LP 136 .LP 137 \f3Note\fP: Because these options are non\-standard, they are subject to change without notice. 138 .LP 139 .SH "NOTES" 140 .LP 141 .LP 142 The \f2apt\fP tool and its associated API contained in the package \f2com.sun.mirror\fP have been deprecated since JDK 7 and are planned to be removed in the next major JDK release. Use the options available in the \f2javac(1)\fP tool and the APIs contained in the packages \f2javax.annotation.processing\fP and \f2javax.lang.model\fP to process annotations. 143 .LP 144 .SH "SEE ALSO" 145 .LP 146 .RS 3 147 .TP 2 148 o 149 javac(1), java(1) 150 .RE 151 152 .LP 153