---
spec: JVMS
title: "The Java Virtual Machine Specification"
edition: "Java SE 18 Edition"
java_version: 18
chapter: "Chapter 4. The class File Format"
section: "4.4.11"
heading: "4.4.11. The CONSTANT_Module_info Structure"
parent: "4.4. The Constant Pool"
source: https://docs.oracle.com/javase/specs/jvms/se18/html/jvms-4.html#jvms-4.4.11
id: "4.4.11"
url: https://jvm.obfuscated.software/jvms/se18/4.4.11.html
raw: https://jvm.obfuscated.software/jvms/se18/4.4.11.md
---

# 4.4.11. The `CONSTANT_Module_info` Structure

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 `tag` item has the value `CONSTANT_Module` (19).

- **name_index**

  The value of the `name_index` item must be a valid index into the `constant_pool` table. The `constant_pool` entry at that index must be a `CONSTANT_Utf8_info` structure ([§4.4.7](4.4.7.md)) representing a valid module name ([§4.2.3](4.2.3.md)).

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.
