sig
type class_name
type method_signature
type method_descriptor
type field_signature
type class_field_signature
type class_method_signature
type other_num = [ `Double | `Float | `Long ]
type jvm_basic_type = [ `Double | `Float | `Int2Bool | `Long ]
type jvm_type = [ `Double | `Float | `Int2Bool | `Long | `Object ]
type jvm_array_type =
[ `ByteBool
| `Char
| `Double
| `Float
| `Int
| `Long
| `Object
| `Short ]
type jvm_return_type =
[ `Double | `Float | `Int2Bool | `Long | `Object | `Void ]
type java_basic_type =
[ `Bool | `Byte | `Char | `Double | `Float | `Int | `Long | `Short ]
type object_type =
TClass of JBasics.class_name
| TArray of JBasics.value_type
and value_type =
TBasic of JBasics.java_basic_type
| TObject of JBasics.object_type
type jstr
type version = { major : int; minor : int; }
val java_lang_object : JBasics.class_name
val default_native_throwable : JBasics.class_name list
val make_cn : string -> JBasics.class_name
val cn_hash : JBasics.class_name -> int
val cn_name : JBasics.class_name -> string
val cn_simple_name : JBasics.class_name -> string
val cn_package : JBasics.class_name -> string list
val cn_compare : JBasics.class_name -> JBasics.class_name -> int
val cn_equal : JBasics.class_name -> JBasics.class_name -> bool
val clinit_signature : JBasics.method_signature
val make_ms :
string ->
JBasics.value_type list ->
JBasics.value_type option -> JBasics.method_signature
val ms_hash : JBasics.method_signature -> int
val ms_name : JBasics.method_signature -> string
val ms_args : JBasics.method_signature -> JBasics.value_type list
val ms_rtype : JBasics.method_signature -> JBasics.value_type option
val ms_compare :
JBasics.method_signature -> JBasics.method_signature -> int
val ms_equal : JBasics.method_signature -> JBasics.method_signature -> bool
val make_md :
JBasics.value_type list * JBasics.value_type option ->
JBasics.method_descriptor
val md_split :
JBasics.method_descriptor ->
JBasics.value_type list * JBasics.value_type option
val md_args : JBasics.method_descriptor -> JBasics.value_type list
val md_rtype : JBasics.method_descriptor -> JBasics.value_type option
val make_fs : string -> JBasics.value_type -> JBasics.field_signature
val fs_hash : JBasics.field_signature -> int
val fs_name : JBasics.field_signature -> string
val fs_type : JBasics.field_signature -> JBasics.value_type
val fs_compare : JBasics.field_signature -> JBasics.field_signature -> int
val fs_equal : JBasics.field_signature -> JBasics.field_signature -> bool
val make_cfs :
JBasics.class_name ->
JBasics.field_signature -> JBasics.class_field_signature
val cfs_split :
JBasics.class_field_signature ->
JBasics.class_name * JBasics.field_signature
val cfs_compare :
JBasics.class_field_signature -> JBasics.class_field_signature -> int
val cfs_equal :
JBasics.class_field_signature -> JBasics.class_field_signature -> bool
val cfs_hash : JBasics.class_field_signature -> int
val make_cms :
JBasics.class_name ->
JBasics.method_signature -> JBasics.class_method_signature
val cms_split :
JBasics.class_method_signature ->
JBasics.class_name * JBasics.method_signature
val cms_compare :
JBasics.class_method_signature -> JBasics.class_method_signature -> int
val cms_equal :
JBasics.class_method_signature -> JBasics.class_method_signature -> bool
val make_jstr : string -> JBasics.jstr
val jstr_pp : JBasics.jstr -> string
val jstr_raw : JBasics.jstr -> string
type jmethod_or_interface =
[ `InterfaceMethod of JBasics.class_name * JBasics.method_signature
| `Method of JBasics.class_name * JBasics.method_signature ]
type method_handle =
[ `GetField of JBasics.class_name * JBasics.field_signature
| `GetStatic of JBasics.class_name * JBasics.field_signature
| `InvokeInterface of JBasics.class_name * JBasics.method_signature
| `InvokeSpecial of JBasics.jmethod_or_interface
| `InvokeStatic of JBasics.jmethod_or_interface
| `InvokeVirtual of JBasics.object_type * JBasics.method_signature
| `NewInvokeSpecial of JBasics.class_name * JBasics.method_signature
| `PutField of JBasics.class_name * JBasics.field_signature
| `PutStatic of JBasics.class_name * JBasics.field_signature ]
type bootstrap_argument =
[ `Class of JBasics.object_type
| `Double of float
| `Float of float
| `Int of int32
| `Long of int64
| `MethodHandle of JBasics.method_handle
| `MethodType of JBasics.method_descriptor
| `String of JBasics.jstr ]
type bootstrap_method = {
bm_ref : JBasics.method_handle;
bm_args : JBasics.bootstrap_argument list;
}
type bootstrap_method_index = int
type descriptor =
SValue of JBasics.value_type
| SMethod of JBasics.method_descriptor
type constant =
ConstString of JBasics.jstr
| ConstInt of int32
| ConstFloat of float
| ConstLong of int64
| ConstDouble of float
| ConstClass of JBasics.object_type
| ConstField of (JBasics.class_name * JBasics.field_signature)
| ConstMethod of (JBasics.object_type * JBasics.method_signature)
| ConstInterfaceMethod of (JBasics.class_name * JBasics.method_signature)
| ConstMethodType of JBasics.method_descriptor
| ConstMethodHandle of JBasics.method_handle
| ConstInvokeDynamic of JBasics.bootstrap_method_index *
JBasics.method_signature
| ConstNameAndType of string * JBasics.descriptor
| ConstStringUTF8 of string
| ConstModule of string
| ConstPackage of string
| ConstUnusable
type verification_type =
VTop
| VInteger
| VFloat
| VDouble
| VLong
| VNull
| VUninitializedThis
| VObject of JBasics.object_type
| VUninitialized of int
type stackmap_frame =
SameFrame of int
| SameLocals of int * JBasics.verification_type
| SameLocalsExtended of int * int * JBasics.verification_type
| ChopFrame of int * int
| SameFrameExtended of int * int
| AppendFrame of int * int * JBasics.verification_type list
| FullFrame of int * int * JBasics.verification_type list *
JBasics.verification_type list
exception No_class_found of string
exception Class_structure_error of string
type element_value =
EVCstByte of int
| EVCstChar of int
| EVCstInt of int32
| EVCstShort of int
| EVCstBoolean of int
| EVCstDouble of float
| EVCstFloat of float
| EVCstLong of int64
| EVCstString of string
| EVEnum of (JBasics.class_name * string)
| EVClass of JBasics.value_type option
| EVAnnotation of JBasics.annotation
| EVArray of JBasics.element_value list
and annotation = {
kind : JBasics.class_name;
element_value_pairs : (string * JBasics.element_value) list;
}
module ClassMap :
sig
type key = class_name
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val modify : key -> ('a option -> 'a) -> 'a t -> 'a t
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val choose_and_remove : 'a t -> key * 'a * 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filteri : (key -> 'a -> bool) -> 'a t -> 'a t
val key_elements : 'a t -> key list
val value_elements : 'a t -> 'a list
val elements : 'a t -> (key * 'a) list
val subset : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
module MethodMap :
sig
type key = method_signature
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val modify : key -> ('a option -> 'a) -> 'a t -> 'a t
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val choose_and_remove : 'a t -> key * 'a * 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filteri : (key -> 'a -> bool) -> 'a t -> 'a t
val key_elements : 'a t -> key list
val value_elements : 'a t -> 'a list
val elements : 'a t -> (key * 'a) list
val subset : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
module FieldMap :
sig
type key = field_signature
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val modify : key -> ('a option -> 'a) -> 'a t -> 'a t
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val choose_and_remove : 'a t -> key * 'a * 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filteri : (key -> 'a -> bool) -> 'a t -> 'a t
val key_elements : 'a t -> key list
val value_elements : 'a t -> 'a list
val elements : 'a t -> (key * 'a) list
val subset : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
module ClassFieldMap :
sig
type key = class_field_signature
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val modify : key -> ('a option -> 'a) -> 'a t -> 'a t
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val choose_and_remove : 'a t -> key * 'a * 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filteri : (key -> 'a -> bool) -> 'a t -> 'a t
val key_elements : 'a t -> key list
val value_elements : 'a t -> 'a list
val elements : 'a t -> (key * 'a) list
val subset : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
module ClassMethodMap :
sig
type key = class_method_signature
type 'a t
val empty : 'a t
val is_empty : 'a t -> bool
val add : key -> 'a -> 'a t -> 'a t
val cardinal : 'a t -> int
val modify : key -> ('a option -> 'a) -> 'a t -> 'a t
val find : key -> 'a t -> 'a
val remove : key -> 'a t -> 'a t
val mem : key -> 'a t -> bool
val iter : (key -> 'a -> unit) -> 'a t -> unit
val map : ('a -> 'b) -> 'a t -> 'b t
val mapi : (key -> 'a -> 'b) -> 'a t -> 'b t
val fold : (key -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val compare : ('a -> 'a -> int) -> 'a t -> 'a t -> int
val equal : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
val merge : ('a -> 'a -> 'a) -> 'a t -> 'a t -> 'a t
val choose_and_remove : 'a t -> key * 'a * 'a t
val filter : ('a -> bool) -> 'a t -> 'a t
val filteri : (key -> 'a -> bool) -> 'a t -> 'a t
val key_elements : 'a t -> key list
val value_elements : 'a t -> 'a list
val elements : 'a t -> (key * 'a) list
val subset : ('a -> 'a -> bool) -> 'a t -> 'a t -> bool
end
module ClassSet :
sig
type t
type elt = class_name
val empty : t
val is_empty : t -> bool
val singleton : elt -> t
val mem : elt -> t -> bool
val add : elt -> t -> t
val remove : elt -> t -> t
val union : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val elements : t -> elt list
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'b -> 'b) -> t -> 'b -> 'b
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val inter : t -> t -> t
val of_list : elt list -> t
val of_array : elt array -> t
val subset : t -> t -> bool
end
module MethodSet :
sig
type t
type elt = method_signature
val empty : t
val is_empty : t -> bool
val singleton : elt -> t
val mem : elt -> t -> bool
val add : elt -> t -> t
val remove : elt -> t -> t
val union : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val elements : t -> elt list
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'b -> 'b) -> t -> 'b -> 'b
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val inter : t -> t -> t
val of_list : elt list -> t
val of_array : elt array -> t
val subset : t -> t -> bool
end
module FieldSet :
sig
type t
type elt = field_signature
val empty : t
val is_empty : t -> bool
val singleton : elt -> t
val mem : elt -> t -> bool
val add : elt -> t -> t
val remove : elt -> t -> t
val union : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val elements : t -> elt list
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'b -> 'b) -> t -> 'b -> 'b
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val inter : t -> t -> t
val of_list : elt list -> t
val of_array : elt array -> t
val subset : t -> t -> bool
end
module ClassFieldSet :
sig
type t
type elt = class_field_signature
val empty : t
val is_empty : t -> bool
val singleton : elt -> t
val mem : elt -> t -> bool
val add : elt -> t -> t
val remove : elt -> t -> t
val union : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val elements : t -> elt list
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'b -> 'b) -> t -> 'b -> 'b
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val inter : t -> t -> t
val of_list : elt list -> t
val of_array : elt array -> t
val subset : t -> t -> bool
end
module ClassMethodSet :
sig
type t
type elt = class_method_signature
val empty : t
val is_empty : t -> bool
val singleton : elt -> t
val mem : elt -> t -> bool
val add : elt -> t -> t
val remove : elt -> t -> t
val union : t -> t -> t
val diff : t -> t -> t
val equal : t -> t -> bool
val elements : t -> elt list
val cardinal : t -> int
val iter : (elt -> unit) -> t -> unit
val fold : (elt -> 'b -> 'b) -> t -> 'b -> 'b
val exists : (elt -> bool) -> t -> bool
val filter : (elt -> bool) -> t -> t
val inter : t -> t -> t
val of_list : elt list -> t
val of_array : elt array -> t
val subset : t -> t -> bool
end
module ClassMethodMaptoSet :
sig
val to_set : 'a JBasics.ClassMethodMap.t -> JBasics.ClassMethodSet.t
end
val set_permissive : bool -> unit
val get_permissive : unit -> bool
end