TOC PREV NEXT INDEX


BOOLEAN



The ASN.1 BOOLEAN type is converted to a Java class that extends the Asn1Boolean run-time class. This base class encapsulates the following public member variable:

public boolean value;

This is where the Boolean value to be encoded is stored. It also contains the result of a decode operation. Since it is public, it can be accessed directly to get or set the value. The generated constructors can also be used to set the value.

The following shows the basic mapping from ASN.1 type to Java class definition:

ASN.1 Production:
<name> ::= BOOLEAN


 
Generated Java class:

public class <name> extends Asn1Boolean {
 
   public <name> () {
 
      super();
 
   }
 
   public <name> (boolean value_) {
 
      super (value_);
 
   }
 
}


 



This definition assumes a simple assignment of the form "<name> ::= BOOLEAN" (i.e., no tagging or subtypes have been added to the BOOLEAN declaration). In this case, no specific encode or decode methods are generated - calls to these methods pass through to the generic calls defined in the base class. This is true of all other primitive type declarations as well unless otherwise noted.


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.