| .\" 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\-class\-properties | |
| Do not generate class properties for static variables and enum constants. | |
| .TP | |
| .BI \-\-no\-doc\-comments | |
| Do not translate Javadoc comments into Xcode-compatible comments. | |
| .TP | |
| .BI \-\-no\-extract\-unsequenced | |
| Don't rewrite expressions that would produce unsequenced modification errors. | |
| .TP | |
| .BI \-\-no\-nullability | |
| Do not generate Objective-C nullability annotations. | |
| .BI \-\-no\-package\-directories | |
| Generate output files to specified directory, without creating package sub-directories. | |
| .TP | |
| .BI \-\-no\-segmented\-headers | |
| Do not generate headers with guards around each declared type. | |
| .TP | |
| .BI \-\-no\-strip\-reflection | |
| Generate metadata needed for Java reflection. | |
| .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 \-\-swift-enum). | |
| .TP | |
| .BI \-\-no-swift-enums | |
| Disables generation of Swift-like enum case names. | |
| .TP | |
| .BI \-\-swift-naming | |
| Generates improved Swift interfaces. | |
| .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. |