-
Notifications
You must be signed in to change notification settings - Fork 959
/
j2objc.1
247 lines (243 loc) · 7.03 KB
/
j2objc.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
.\" Licensed under the Apache License, Version 2.0 (the "License");
.\" you may not use this file except in compliance with the License.
.\" You may obtain a copy of the License at
.\"
.\" http://www.apache.org/licenses/LICENSE-2.0
.\"
.\" Unless required by applicable law or agreed to in writing, software
.\" distributed under the License is distributed on an "AS IS" BASIS,
.\" WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
.\" See the License for the specific language governing permissions and
.\" limitations under the License.
.na
.TH J2OBJC "1" "May 2014" "j2objc" "User Commands"
.SH NAME
.B j2objc
\- translate Java source files to Objective-C
.SH SYNOPSIS
.B j2objc
[
.I options
] \fIfile1.java\fR ...
.SH DESCRIPTION
The
.B j2objc
tool translates specified Java source files into either Objective-C or
Objective-C++ sources for use in an iOS application.
.SH COMMON OPTIONS
.TP \w'\fB\-copyright\fP\fI\ nnnn\fP'u+10n
.BI \-sourcepath " path "
Specify where to find input source files
.TP
.BI \-classpath " path "
Specify where to find user class files
.TP
.BI \-d " directory "
Specify where to place generated Objective\-C files
.TP
.BI \-encoding " encoding "
Specify character encoding used by source files
.TP
.BI \-source " release "
Provide source compatibility with specified release
.TP
.BI \-g
Generate Java source debugging support
.TP
\fB\-l\fR, \fB\-\-list\fR
List files that are translated
.TP
\fB\-v\fR, \fB\-\-verbose
Output messages about what the translator is doing
.TP
.BI \-Werror
Make all warnings into errors
.TP
\fB\-h\fR, \fB\-\-help\fR
Print this message.
.SH TRANSLATION OPTIONS
.TP
.BI \-\-add\-reads
Option forwarded directly to the Java compiler (see javac help for details).
.TP
.BI \-\-allow\-inherited\-constructors
Don't issue compiler warnings when native code accesses inherited constructors.
.TP
.BI \-\-build\-closure
Translate dependent classes if out-of-date.
.TP
.BI \-\-class\-properties
Generates class properties for static variables and enum constants.
.TP
.BI \-\-dead\-code\-report " file "
Specify a ProGuard usage report for dead code elimination.
.TP
.BI \-\-doc\-comments
Translate Javadoc comments into Xcode-compatible comments.
.TP
.BI \-\-doc\-comment-warnings
Report warnings when translating Javadoc comments.
.TP
.BI \-external\-annotation\-file
Specify the most common annotations that affect
transpilation in a Java Annotation Index File
(format defined by the Checker Framework).
.TP
.BI \-g:none
Do not generate Java source debugging support
.TP
.BI \-g:relative
Generate Java source debugging support with relative paths
.TP
.BI \-\-generate\-deprecated
Generate deprecated attributes for deprecated methods, classes, and interfaces.
.TP
.BI \-\J<flag>
Pass <flag> directly to the Java runtime.
.TP
.BI \-\-mapping " file "
Add a method mapping file.
.TP
.BI \-\-no\-extract\-unsequenced
Don't rewrite expressions that would produce unsequenced modification errors.
.TP
.BI \-\-no\-package\-directories
Generate output files to specified directory, without creating package sub-directories.
.TP
\fB\-\-no\-segmented\-headers\fR
Do not generate headers with guards around each declared type.
.TP
.BI \-\-no\-wrapper\-methods
Do not generate Objective-C wrapper methods for constructors and static methods.
(J2ObjC generates C functions for these kinds of executables)
.TP
.BI \-\-nullability
Converts Nullable and Nonnull annotations to Objective-C.
.TP
.BI \-\-patch\-module
Option forwarded directly to the Java compiler (see javac help for details).
.TP
.BI \-\-prefix " package=prefix "
Substitute a specified prefix for a package name.
.TP
.BI \-\-prefixes " file "
Specify a properties file with prefix definitions.
.TP
.BI \-\-preserve\-full\-paths
Generates output files with the same relative paths as the input files.
.TP
.BI \-processor " class"[, "class..."]
Names of the annotation processors to run; bypasses default discovery process.
.TP
.BI \-processorpath " path "
Specify where to find annotation processors.
.TP
.BI \-\-reserved\-names " file "
Avoids redefining identifiers present in system headers.
.TP
.BI \-\-static\-accessor\-methods
Generates accessor methods for static variables and enum constants.
.TP
.BI \-\-strip\-gwt\-incompatible
Removes methods that are marked with a GwtIncompatible
annotation, unless its value is known to be compatible.
.TP
.BI \-\-strip\-reflection
Do not generate metadata needed for Java reflection.
.TP
.BI \-\-swift\-friendly
Generate code that facilitates Swift importing (equivalent to
\-\-class\-properties \-\-nullability).
.TP
.BI \-\-system
Option forwarded directly to the Java compiler (see javac help for details).
.TP
\fB\-t\fR, \fB\-\-timing\-info\fR
Print time spent in translation steps and total execution time.
.TP
\fB\-\-timing\-info:all\fR
Print time spent in translation steps and total execution time.
.TP
\fB\-\-timing\-info:total\fR
Print total execution time.
.TP
\fB\-\-timing\-info:none\fR
Do not print timing information (default).
.TP
.BI \-use\-arc
Generate Objective\-C code to support Automatic Reference Counting (ARC).
.TP
.BI \-use\-reference\-counting
Generate Objective\-C code to support iOS manual reference counting (default).
.TP
\fB-version\fR
Version information.
.TP
.BI \-x " language "
Specify what language to output. Possible values are objective\-c (default)
and objective\-c++.
.TP
.BI \-X
Displays information about nonstandard options and exits.
.SH NONSTANDARD OPTIONS
.TP
.BI \-Xbootclasspath\fR:\fIpath
Boot path used by translation (not the tool itself).
.TP
.BI \-Xlint
Enable recommended warnings. In this release, all available warnings are recommended.
.TP
.BI \-Xlint:none
Disable all warnings not mandated by the Java Language Specification.
.TP
.BI \-Xlint:- xxx
Disable warning \f2xxx\fR, where \f2xxx\fR is one of the warning
names supported for \f3\-Xlint:\f2xxx\fR, below.
.TP
.B \-Xlint:cast
Warn about unnecessary and redundant cast expressions.
.TP
.B \-Xlint:deprecation
Warn about the use of deprecated items.
.TP
.B \-Xlint:dep-ann
Warn about items that are documented with an @deprecated Javadoc comment,
but do not have a @Deprecated annotation.
.TP
.B \-Xlint:empty
Warn about empty statements.
.TP
.B \-Xlint:fallthrough
Check switch blocks for fall-through cases and provide a
warning message for any that are
found.
.TP
.B \-Xlint:finally
Warn about finally clauses that cannot complete normally.
.TP
.B \-Xlint:rawtypes
Warn about unchecked operations on raw types.
.TP
.B \-Xlint:serial
Warn about missing serialVersionUID definitions on serializable classes.
.TP
.B \-Xlint:static
Warn about serial methods called on instances.
.TP
.B \-Xlint:unchecked
Give more detail for unchecked conversion warnings
that are mandated by the Java Language Specification.
.TP
.B \-Xlint:varargs
Warn about unsafe usages of variable arguments (varargs) methods,
in particular, those that contain non-reifiable arguments.
.TP
.BI \-Xno\-jsni\-warnings
Warn if JSNI (GWT) native code delimiters are used instead of OCNI delimiters.
.SH "SEE ALSO"
.BR j2objcc (1)
.PP
The full documentation for
.B j2objc
is maintained on the project site at
\fIhttp://j2objc.org/\fR.