TOC PREV NEXT INDEX


Class Declaration



Next comes the class declaration. It is of the following form:

	public class <ProdName> extends <BaseClass>
 

<ProdName> is the name of the production in the ASN.1 source file. <BaseClass> is a class from which the type is derived. This can either be a standard run-time or compiler-generated class. In our example, the EmployeeNumber is an INTEGER, so we can directly extend the Asn1Integer run-time base class. If we had a declaration such as the following:

	EmployeeSSNumber ::= [APPLICATION 22] EmployeeNumber
 

Our EmployeeSSNumber class would be derived from the compiler-generated EmployeeNumber class as follows:

	public class EmployeeSSNumber extends EmployeeNumber
 

Note: the preceding example is not true if -compact is specified. In that case, all intermediate classes would be removed so EmployeeSSNumber would extend Asn1Integer as in the first case.


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