CHOICE Value Specification

A CHOICE value specification causes a final static instance of the Java class generated for the CHOICE to be generated.

ASN.1 production:

   <name> <ChoiceType> ::= elemname : <elemvalue>

Generated Java constants:

   public static final <ChoiceType> <name> =
      new <ChoiceType> (<ElemCode>,
                        new <ElemType> (<elemvalue>));

For example, consider the following declaration:

   ChoiceType ::= CHOICE { oid OBJECT IDENTIFIER, id INTEGER }

   value ChoiceType ::= id: 1

This would result in the following Java constant being generated:

   public static final ChoiceType value =
      new ChoiceType (ChoiceType._ID, new Asn1Integer(1));