TOC PREV NEXT INDEX


ASN1C Java Command Line Options



The following table shows a summary of the command line options that have meaning when Java code generation is selected:
Option
Argument
Description
-ber
 
None
This option instructs the compiler to generate functions that implement the Basic Encoding Rules (BER) as specified in the ASN.1 standards.

-der
 
None
This option instructs the compiler to generate functions that implement the Distinguished Encoding Rules (DER) as specified in the ASN.1 standards.

-cer
None
This option instructs the compiler to generate functions that implement the Canonical Encoding Rules (CER) as specified in the ASN.1 standards.
 
-per
 
None
This option instructs the compiler to generate functions that implement the Packed Encoding Rules (PER) as specified in the ASN.1 standards.

-xer
 
None
This option instructs the compiler to generate functions that implement the XML Encoding Rules (XER) as specified in the ASN.1 standards.

-xml
None
This option instructs the compiler to generate functions that implement the XML Encoding Rules (XML) as specified in the World-Wide Consortium (W3C). Related XML Schema can be produced by using the -xsd command line option.
-java
 
None
Generate Java source code.

-events
 
None
Generate extra code to invoke user defined event and error handler callback methods (see the Event Handlers section).

-config
 
<filename>
This option is used to specify the name of a file containing configuration information for the source file being parsed. A full discussion of the contents of a configuration file is provided in the Compiler Configuration File section.
 
-noencode
 
None
This option suppresses the generation of encode functions.
.

-nodecode
 
None
This option suppresses the generation of decode functions.

-noIndefLen
 
None
This option instructs the compiler to omit indefinite length tests in generated decode functions. These tests result in the generation of a large amount of code. If you know that your application only uses definite length encoding, this option can result in a much smaller code base size.
 
-noOpenExt
 
None
This option instructs the compiler to not add an open extension element in constructs that contain extensibility markers. The purpose of the element is to collect any unknown items in a message. If an application does not care about these unknown items, it can use this option to reduce the size of the generated code.
 
-compact
 
None
This option instructs the compiler to generate more compact code at the expense of some constraint and error checking. This is an optimization option that should be used after an application is thoroughly tested.
 
-lax
 
None
This option instructs the compiler to not generate code to check constraints. When used in conjunction with the -compact option (described next), it produces the smallest code base for a given ASN.1 specification.
 
-warnings
 
None
Output information on compiler generated warnings.

-o
 
<directory>
This option is used to specify the name of a directory to which all of the generated files will be written.
 
-I
 
<directory>
This option is used to specify a directory that the compiler will search for ASN.1 source files for IMPORT items. Multiple -I qualifiers can be used to specify multiple directories to search.
 
-pkgpfx
 
<prefixName>
This is a Java option for adding a prefix in front of the assigned Java package name. By default, the Java package name is set to the module name. If the package is embedded within a hierarchy, this option can be used to set the other directory names that must be added to allow Java to find the .class files.
 
-pkgname
 
<packageName>
This is a Java option that allows the entire Java package name
to be changed. Instead of the module name, the full name specified using this option will be used. This option cannot be used in conjunction with -pkgpfx option.
 
-dirs
 
None
This is a Java option that causes a subdirectory to be created to hold each of the generated Java source files for each module in an ASN.1 source file.
 
-list
 
None
Generate listing. This will dump the source code to the standard output device as it is parsed. This can be useful for finding parse errors.
 
-compat
 
<versionNumber>
Generate code compatible with an older version of the compiler. The compiler will attempt to generate code more closely aligned with the given previous release of the compiler.

<versionNumber> is specified as x.x (for example, -compat 5.2)
 
-genPrint
-print
 
None
This option specifies that print methods should be generated. Print functions are debug functions that allow the contents of generated type variables to be written to stdout. They are optional: if -print is not specified, no print functions will be generated.

-stream
None
This option instructs the compiler to generate stream-based encoders/decoders instead of memory buffer based. This makes it possible to encode directly to or decode directly from a source or sink such as a file or socket. In the case of BER, it will also cause forward encoders to be generated, which will use indefinite lengths for all constructed elements in a message.
 
-tables
None
This option is used to generate additional code for the handling of table constraints as defined in the X.682 standard.
 
-shortnames
None
This option is used to change the name generated by compiler for embedded types in constructed types. This option is required to handle the limit on the size of filenames in certain situations. With this option, the generated code filenames would be shorter than without this option.
 



Objective Systems, Inc.

102 Pickering Way, Suite #506
Exton, Pennsylvania 19341
http://www.obj-sys.com
Phone: (484) 875-9841
Toll-free: (877) 307-6855 (US only)
Fax: (484) 875-9830
info@obj-sys.com
TOC PREV NEXT INDEX

Copyright © 1997-2004 Objective Systems,Inc.
All Rights Reserved.


This document may be distributed in any form, electronic
or otherwise, provided that it is distributed in its entirety
and that the copyright and this notice are included.