Module ModuleDefinition

module ModuleDefinition: sig .. end
Module definition as well as conversion functions from/to ClassFile.t.


type t = {
   access_flags :AccessFlag.for_module list;
   name :Name.for_module;
   attributes :Attribute.for_module list;
Definition of a Java module.
val equal : t -> t -> bool
Equality over modules.
val compare : t -> t -> int
Comparison over modules.
val hash : t -> int
Hash function over modules.


type error = 
| Invalid_module_name
| Too_many of string
| Version_error of Version.error
| Invalid_module_definition
exception Exception of error
val string_of_error : error -> string

Conversion functions

val decode : ClassFile.t -> t
Converts from a ClassFile.t into a module definition. Raises Exception if an error occurs during conversion.
val encode : ?version:Version.t -> t -> ClassFile.t
Converts a module definition into to a ClassFile.t, using the passed version. The default version is Version.default. Raises Exception if an error occurs during conversion.