The CONSTANT_Module_info structure is used to represent a module:
CONSTANT_Module_info {
u1 tag;
u2 name_index;
}
The items of the CONSTANT_Module_info structure are as follows:
-
tag
The
tagitem has the valueCONSTANT_Module(19). -
name_index
The value of the
name_indexitem must be a valid index into theconstant_pooltable. Theconstant_poolentry at that index must be aCONSTANT_Utf8_infostructure (§4.4.7) representing a valid module name (§4.2.3).
A CONSTANT_Module_info structure is permitted only in the constant pool of a class file that declares a module, that is, a ClassFile structure where the access_flags item has the ACC_MODULE flag set. In all other class files, a CONSTANT_Module_info structure is illegal.