NOTE: Information Object code generation is only done when the -tables option is selected.
This additional code is generated to support the processing required to verify table constraints, which is intended for use only in compiler-generated code. Therefore, it is not necessary for the average user to understand the mappings in order to use the product. The information presented here is informative only to provide a better understanding of how the compiler handles table constraints.
Information Object code will be generated in a Java source file with a special class to hold the values. The name of the source file and class is of the following format:
_<ModuleName>Values.java
In this definition, <ModuleName> would be replaced with the name of the ASN.1 module in which the values are defined.
For each Information Object defined within a specification, a Java constant is generated which is an instance of the ASN.1 CLASS definition for the object. Each Information Object constant calls the Class constructor with the field value specified in the ASN.1 information object definition.
If the ASN.1 CLASS field is optional and the field value is absent in the Information Object definition, then its corresponding member variable will be initialized to "null". If the ASN.1 CLASS field has a default value and its field value is absent in the Information Object, then the generated code for the Information Object will set the Class field's value to the default value.
ASN.1 definition:
<name> <ClassName> ::= <InfoObject>
Generated Java constants:
public final static <ClassName> <name> = new <ClassName> (<InfoObject values>>);
For example, consider the following Information Object declaration for the above ATTRIBUTE class:
name ATTRIBUTE ::= { WITH SYNTAX VisibleString ID { 0 1 1 } }
This would result in the following Java constant being generated:
public static final ATTRIBUTE name = new ATTRIBUTE ( new Asn1VisibleString(), new Asn1ObjectIdentifier(new int[]{0, 1, 1}));
NOTE: The following new Type Assignment is created for each TypeField's type definition if the type is one of the following ASN.1 built-in types: Sequence / Set / SequenceOf / SetOf / Choice / Constrained Type / Enumerated Type / NamedInteger Type / NamedBitList Type / ParameterizedType:
_<ObjectName>_<FieldName> ::= <Type>
Here ObjectName is replaced with name of the Object Assignment. If Object is defined in ObjectSet, then ObjectName is replaced with the name of the ObjectSet Assignment. FieldName is replaced with name of this type field. Type is the type definition in Object's typefield.
This type is used as Defined Type in the information object definition for type field. It is also useful for the user to generate value for related OpenType definition in table constraint.