module Method: sig
.. end
Methods in both low- and high-level forms.
It also provides conversion functions between levels as well as i/o
functions for low-level.
type
info = {
}
Represents a method as defined in the class file format specification.
Exception
type
error =
| |
Invalid_name of Utils.UTF8.t |
| |
Invalid_name_value of Utils.u2 |
| |
Invalid_descriptor_value of Utils.u2 |
exception Exception of error
val string_of_error : error -> string
I/O functions
val read_info : InputStream.t -> info
read_info st
reads a method from st
.
Raises InputStream.Exception
if an i/o error occurs.
val write_info : OutputStream.t -> info -> unit
write_info st m
writes method m
onto st
.
Raises OutputStream.Exception
if an i/o error occurs.
type
regular = {
}
Represents a regular (possibly static) method.
type
constructor = {
}
Represents an instance constructor method.
type
class_initializer = {
}
Represents a class initializer method.
type
t =
Represents the different kinds of methods.
val equal_regular : regular -> regular -> bool
Equality over regular methods.
val compare_regular : regular -> regular -> int
Comparison over regular methods.
val hash_regular : regular -> int
Hash function over regular methods.
val equal_constructor : constructor -> constructor -> bool
Equality over constructors.
val compare_constructor : constructor -> constructor -> int
Comparison over constructors.
val hash_constructor : constructor -> int
Hash function over constructors.
val equal_class_initializer : class_initializer -> class_initializer -> bool
Equality over class initializers.
val compare_class_initializer : class_initializer -> class_initializer -> int
Comparison over class initializers.
val hash_class_initializer : class_initializer -> int
Hash function over class initializers.
val equal : t -> t -> bool
Equality over methods.
val compare : t -> t -> int
Comparison over methods.
val hash : t -> int
Hash function over methods.
val compare_according_to_visibility : t -> t -> int
Comparison over methods, to be used to compare for user-intended
output.
Conversion functions
val decode : bool -> Bootstrap.methods -> ConstantPool.t -> info -> t
Converts from a low-level into a high-level form according to passed
pool, and bootstrap method information. The first parameter indicates
whether the enclosing element is an interface or a class.
Raises Exception
if an error occurs during conversion.
val encode : Bootstrap.methods -> ConstantPool.extendable -> t -> info
Converts from a high-level into a low-level form, using passed
extendable pool, and bootstrap method information.
Raises Exception
if an error occurs during conversion.