Module PackageDefinition

module PackageDefinition: sig .. end
Package definition as well as conversion functions from/to ClassFile.t.


Type

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

Exception

type error = 
| Invalid_package_name
| Too_many of string
| Version_error of Version.error
| Invalid_package_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 package definition. Raises Exception if an error occurs during conversion.
val encode : ?version:Version.t -> t -> ClassFile.t
Converts a package definition into to a ClassFile.t, using the passed version. The default version is Version.default. Raises Exception if an error occurs during conversion.