javalib

Javalib is a library written in OCaml with the aim to provide a high level representation of Java .class files
IN THIS PACKAGE
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 class_name
| TArray of value_type
and value_type =
| TBasic of java_basic_type
| TObject of object_type
type jstr
type version = {
major : int;
minor : int;
}
val java_lang_object : class_name
val default_native_throwable : class_name list
val make_cn : string -> class_name
val cn_hash : class_name -> int
val cn_name : class_name -> string
val cn_simple_name : class_name -> string
val cn_package : class_name -> string list
val cn_compare : class_name -> class_name -> int
val cn_equal : class_name -> class_name -> bool
val clinit_signature : method_signature
val make_ms : string -> value_type list -> value_type option -> method_signature
val ms_hash : method_signature -> int
val ms_name : method_signature -> string
val ms_args : method_signature -> value_type list
val ms_rtype : method_signature -> value_type option
val ms_compare : method_signature -> method_signature -> int
val ms_equal : method_signature -> method_signature -> bool
val make_md : (value_type list * value_type option) -> method_descriptor
val md_split : method_descriptor -> value_type list * value_type option
val md_args : method_descriptor -> value_type list
val md_rtype : method_descriptor -> value_type option
val make_fs : string -> value_type -> field_signature
val fs_hash : field_signature -> int
val fs_name : field_signature -> string
val fs_type : field_signature -> value_type
val fs_compare : field_signature -> field_signature -> int
val fs_equal : field_signature -> field_signature -> bool
val cfs_compare : class_field_signature -> class_field_signature -> int
val cfs_equal : class_field_signature -> class_field_signature -> bool
val cfs_hash : class_field_signature -> int
val make_jstr : string -> jstr
val jstr_pp : jstr -> string
val jstr_raw : jstr -> string
type jmethod_or_interface = [
| `InterfaceMethod of class_name * method_signature
| `Method of class_name * method_signature
]
type method_handle = [
| `GetField of class_name * field_signature
| `GetStatic of class_name * field_signature
| `InvokeInterface of class_name * method_signature
| `InvokeSpecial of jmethod_or_interface
| `InvokeStatic of jmethod_or_interface
| `InvokeVirtual of object_type * method_signature
| `NewInvokeSpecial of class_name * method_signature
| `PutField of class_name * field_signature
| `PutStatic of class_name * field_signature
]
type bootstrap_argument = [
| `Class of object_type
| `Double of float
| `Float of float
| `Int of int32
| `Long of int64
| `MethodHandle of method_handle
| `MethodType of method_descriptor
| `String of jstr
]
type bootstrap_method = {
bm_ref : method_handle;
bm_args : bootstrap_argument list;
}
type bootstrap_method_index = int
type descriptor =
| SValue of value_type
| SMethod of method_descriptor
type constant =
| ConstString of jstr
| ConstInt of int32
| ConstFloat of float
| ConstLong of int64
| ConstDouble of float
| ConstClass of object_type
| ConstField of class_name * field_signature
| ConstMethod of object_type * method_signature
| ConstInterfaceMethod of class_name * method_signature
| ConstMethodType of method_descriptor
| ConstMethodHandle of method_handle
| ConstInvokeDynamic of bootstrap_method_index * method_signature
| ConstNameAndType of string * descriptor
| ConstStringUTF8 of string
| ConstUnusable
type verification_type =
| VTop
| VInteger
| VFloat
| VDouble
| VLong
| VNull
| VUninitializedThis
| VObject of object_type
| VUninitialized of int
type stackmap = int * verification_type list * 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 class_name * string
| EVClass of value_type option
| EVAnnotation of annotation
| EVArray of element_value list
and annotation = {
kind : class_name;
element_value_pairs : (string * element_value) list;
}
module ClassMap : sig ... end
module MethodMap : sig ... end
module FieldMap : sig ... end
module ClassFieldMap : sig ... end
module ClassMethodMap : sig ... end
module ClassSet : sig ... end
module MethodSet : sig ... end
module FieldSet : sig ... end
module ClassFieldSet : sig ... end
module ClassMethodSet : sig ... end
module ClassMethodMaptoSet : sig ... end
val set_permissive : bool -> unit
val get_permissive : unit -> bool