sig
type element =
Class of Utils.u2
| Fieldref of Utils.u2 * Utils.u2
| Methodref of Utils.u2 * Utils.u2
| InterfaceMethodref of Utils.u2 * Utils.u2
| String of Utils.u2
| Integer of int32
| Float of int32
| Long of int32 * int32
| Double of int32 * int32
| NameAndType of Utils.u2 * Utils.u2
| UTF8 of Utils.UTF8.t
| MethodHandle of Reference.kind * Utils.u2
| MethodType of Utils.u2
| InvokeDynamic of Utils.u2 * Utils.u2
| ModuleId of Utils.u2 * Utils.u2
val equal_element : ConstantPool.element -> ConstantPool.element -> bool
val compare_element : ConstantPool.element -> ConstantPool.element -> int
val hash_element : ConstantPool.element -> int
val dummy_element : ConstantPool.element
type tag =
CONSTANT_Class
| CONSTANT_Fieldref
| CONSTANT_Methodref
| CONSTANT_InterfaceMethodref
| CONSTANT_String
| CONSTANT_Integer
| CONSTANT_Float
| CONSTANT_Long
| CONSTANT_Double
| CONSTANT_NameAndType
| CONSTANT_Utf8
| CONSTANT_MethodHandle
| CONSTANT_MethodType
| CONSTANT_InvokeDynamic
| CONSTANT_ModuleId
type t
val equal : ConstantPool.t -> ConstantPool.t -> bool
val compare : ConstantPool.t -> ConstantPool.t -> int
val hash : ConstantPool.t -> int
type error =
Invalid_tag of Utils.u1
| Too_large of int
| Invalid_reference
| Reference_out_of_bounds of int * int
| Dummy_access of Utils.u2
| Malformed_Class_entry of Utils.u2
| Malformed_Fieldref_entry of Utils.u2 * Utils.u2
| Malformed_Methodref_entry of Utils.u2 * Utils.u2
| Malformed_InterfaceMethodRef_entry of Utils.u2 * Utils.u2
| Malformed_String_entry of Utils.u2
| Malformed_NameAndType_entry of Utils.u2 * Utils.u2
| Malformed_MethodHandle_entry of Reference.kind * Utils.u2
| Malformed_MethodType_entry of Utils.u2
| Malformed_InvokeDynamic_entry of Utils.u2 * Utils.u2
| Malformed_ModuleId_entry of Utils.u2 * Utils.u2
exception Exception of ConstantPool.error
val string_of_error : ConstantPool.error -> string
val read_element : InputStream.t -> ConstantPool.element
val read : InputStream.t -> Utils.u2 -> ConstantPool.t
val write_element : OutputStream.t -> ConstantPool.element -> unit
val write : OutputStream.t -> ConstantPool.t -> unit
val size : ConstantPool.t -> Utils.u2
val get_entry : ConstantPool.t -> Utils.u2 -> ConstantPool.element
val check : ConstantPool.t -> unit
val check_entry_for_kind :
ConstantPool.t -> Utils.u2 -> ConstantPool.tag -> bool
val version_bounds : ConstantPool.element -> Version.bounds
val check_version : Version.t -> ConstantPool.t -> unit
type extendable
val make_extendable : unit -> ConstantPool.extendable
val make_extendable_from_pool : ConstantPool.t -> ConstantPool.extendable
val make_extendable_from_array :
ConstantPool.element array -> ConstantPool.extendable
val get_extendable_entry :
ConstantPool.extendable -> Utils.u2 -> ConstantPool.element
val add_class : ConstantPool.extendable -> Name.for_class -> Utils.u2
val add_array_class :
ConstantPool.extendable -> Descriptor.array_type -> Utils.u2
val add_field :
ConstantPool.extendable ->
Name.for_class -> Name.for_field -> Descriptor.for_field -> Utils.u2
val add_method :
ConstantPool.extendable ->
Name.for_class -> Name.for_method -> Descriptor.for_method -> Utils.u2
val add_interface_method :
ConstantPool.extendable ->
Name.for_class -> Name.for_method -> Descriptor.for_method -> Utils.u2
val add_array_method :
ConstantPool.extendable ->
Descriptor.array_type ->
Name.for_method -> Descriptor.for_method -> Utils.u2
val add_string : ConstantPool.extendable -> Utils.UTF8.t -> Utils.u2
val add_integer : ConstantPool.extendable -> int32 -> Utils.u2
val add_float : ConstantPool.extendable -> float -> Utils.u2
val add_long : ConstantPool.extendable -> int64 -> Utils.u2
val add_double : ConstantPool.extendable -> float -> Utils.u2
val add_name_and_type :
ConstantPool.extendable -> Utils.UTF8.t -> Utils.UTF8.t -> Utils.u2
val add_utf8 : ConstantPool.extendable -> Utils.UTF8.t -> Utils.u2
val add_method_handle : ConstantPool.extendable -> Reference.t -> Utils.u2
val add_method_type :
ConstantPool.extendable -> Descriptor.for_method -> Utils.u2
val add_invoke_dynamic :
ConstantPool.extendable ->
Utils.u2 -> Name.for_method -> Descriptor.for_method -> Utils.u2
val add_moduleid :
ConstantPool.extendable -> Utils.UTF8.t -> Utils.UTF8.t -> Utils.u2
val to_pool : ConstantPool.extendable -> ConstantPool.t
end