module-info class file.
Implementation Note
The rationale for the hand-coded reader is startup performance and fine control over the throwing of InvalidModuleDescriptorException.
| Modifier and Type | Class and Description |
|---|---|
| public static class | ModuleInfo.
A holder class for the ModuleDescriptor that is created by reading the Module and other standard class file attributes. |
| private static class | ModuleInfo.
The constant pool in a class file. |
| private static class | ModuleInfo.
A DataInput implementation that reads from another DataInput and counts the number of bytes read. |
| private static class | ModuleInfo.
A DataInput implementation that reads from a ByteBuffer. |
| Modifier and Type | Field and Description |
|---|---|
| private static final JavaLangModuleAccess | |
| private final Supplier | |
| private final boolean | |
| private static volatile Set |
| Access | Constructor and Description |
|---|---|
| private | |
| private |
| Modifier and Type | Method and Description |
|---|---|
| private ModuleInfo. | |
| private static InvalidModuleDescriptorException | invalidModuleDescriptor(String msg)
Returns an InvalidModuleDescriptorException with the given detail message |
| private static boolean | isAttributeAtMostOnce(String name)
Returns true if the given attribute can be present at most once in the class file. |
| private static boolean | isAttributeDisallowed(String name)
Return true if the given attribute name is the name of a pre-defined attribute in JVMS 4.7 that is not allowed in a module-info class. |
| public static ModuleInfo. | read(InputStream in, Supplier<Set<String>> pf)
Reads a |
| public static ModuleInfo. | |
| public static ModuleInfo. | readIgnoringHashes(ByteBuffer bb, Supplier<Set<String>> pf)
Reads a |
| private ModuleDescriptor. | readModuleAttribute(DataInput in, ModuleInfo.
Reads the Module attribute, returning the ModuleDescriptor.Builder to build the corresponding ModuleDescriptor. |
| private ModuleHashes | readModuleHashesAttribute(DataInput in, ModuleInfo.
Reads the ModuleHashes attribute |
| private String | readModuleMainClassAttribute(DataInput in, ModuleInfo.
Reads the ModuleMainClass attribute |
| private Set | readModulePackagesAttribute(DataInput in, ModuleInfo.
Reads the ModulePackages attribute |
| private ModuleResolution | readModuleResolution(DataInput in, ModuleInfo.
Reads the ModuleResolution attribute. |
| private ModuleTarget | readModuleTargetAttribute(DataInput in, ModuleInfo.
Reads the ModuleTarget attribute |
| private static InvalidModuleDescriptorException | truncatedModuleDescriptor()
Returns an InvalidModuleDescriptorException with a detail message to indicate that the class file is truncated. |