Record Class ModuleRuntimeMetadata
java.lang.Object
java.lang.Record
com.netflix.module.ModuleRuntimeMetadata
- Record Components:
release- the Java release of the class-file formatpreview- whether the module descriptor uses preview features
Runtime metadata not exposed by
ModuleDescriptor.-
Constructor Summary
ConstructorsConstructorDescriptionModuleRuntimeMetadata(int release, boolean preview) Validates and creates module runtime metadata. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ModuleRuntimeMetadatafromClassBytes(byte[] bytes) Reads metadata frommodule-info.classbytes.final inthashCode()Returns a hash code value for this object.booleanpreview()Returns the value of thepreviewrecord component.static Optional<ModuleRuntimeMetadata> read(ModuleReference reference) Reads metadata from a module descriptor.intrelease()Returns the value of thereleaserecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModuleRuntimeMetadata
public ModuleRuntimeMetadata(int release, boolean preview) Validates and creates module runtime metadata.
-
-
Method Details
-
read
Reads metadata from a module descriptor.- Parameters:
reference- the module to inspect- Returns:
- the metadata, or an empty value for an automatic module
- Throws:
IOException- if an explicit module descriptor cannot be read
-
fromClassBytes
Reads metadata frommodule-info.classbytes.- Parameters:
bytes- the class-file bytes- Returns:
- the module runtime metadata
- Throws:
IllegalArgumentException- if the bytes are not a valid class file
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
release
-
preview
-