sig
type access = [ `Default | `Private | `Protected | `Public ]
type attributes = {
synthetic : bool;
deprecated : bool;
other : (string * string) list;
}
type visibility = RTVisible | RTInvisible
type field_kind = NotFinal | Final | Volatile
type constant_attribute =
[ `Double of float
| `Float of float
| `Int of int32
| `Long of int64
| `String of JBasics.jstr ]
type class_field = {
cf_signature : JBasics.field_signature;
cf_class_signature : JBasics.class_field_signature;
cf_generic_signature : JSignature.fieldTypeSignature option;
cf_access : Javalib.access;
cf_static : bool;
cf_synthetic : bool;
cf_enum : bool;
cf_kind : Javalib.field_kind;
cf_value : Javalib.constant_attribute option;
cf_transient : bool;
cf_annotations : (JBasics.annotation * Javalib.visibility) list;
cf_other_flags : int list;
cf_attributes : Javalib.attributes;
}
type interface_field = {
if_signature : JBasics.field_signature;
if_class_signature : JBasics.class_field_signature;
if_generic_signature : JSignature.fieldTypeSignature option;
if_synthetic : bool;
if_value : Javalib.constant_attribute option;
if_annotations : (JBasics.annotation * Javalib.visibility) list;
if_other_flags : int list;
if_attributes : Javalib.attributes;
}
type any_field =
InterfaceField of Javalib.interface_field
| ClassField of Javalib.class_field
val get_field_signature : Javalib.any_field -> JBasics.field_signature
val get_class_field_signature :
Javalib.any_field -> JBasics.class_field_signature
val get_field_visibility : Javalib.any_field -> Javalib.access
val is_static_field : Javalib.any_field -> bool
val is_final_field : Javalib.any_field -> bool
type 'a implementation = Native | Java of 'a Stdlib.Lazy.t
type method_annotations = {
ma_global : (JBasics.annotation * Javalib.visibility) list;
ma_parameters : (JBasics.annotation * Javalib.visibility) list list;
}
type method_parameter_attribute = {
mp_name : string option;
mp_final : bool;
mp_synthetic : bool;
mp_mandated : bool;
}
type 'a concrete_method = {
cm_signature : JBasics.method_signature;
cm_class_method_signature : JBasics.class_method_signature;
cm_static : bool;
cm_final : bool;
cm_synchronized : bool;
cm_strict : bool;
cm_access : Javalib.access;
cm_generic_signature : JSignature.methodTypeSignature option;
cm_bridge : bool;
cm_varargs : bool;
cm_synthetic : bool;
cm_other_flags : int list;
cm_exceptions : JBasics.class_name list;
cm_attributes : Javalib.attributes;
cm_parameters : Javalib.method_parameter_attribute list;
cm_annotations : Javalib.method_annotations;
cm_implementation : 'a Javalib.implementation;
}
type abstract_method = {
am_signature : JBasics.method_signature;
am_class_method_signature : JBasics.class_method_signature;
am_access : [ `Default | `Private | `Protected | `Public ];
am_generic_signature : JSignature.methodTypeSignature option;
am_bridge : bool;
am_varargs : bool;
am_synthetic : bool;
am_other_flags : int list;
am_exceptions : JBasics.class_name list;
am_attributes : Javalib.attributes;
am_parameters : Javalib.method_parameter_attribute list;
am_annotations : Javalib.method_annotations;
am_annotation_default : JBasics.element_value option;
}
type 'a jmethod =
AbstractMethod of Javalib.abstract_method
| ConcreteMethod of 'a Javalib.concrete_method
val get_method_signature : 'a Javalib.jmethod -> JBasics.method_signature
val get_class_method_signature :
'a Javalib.jmethod -> JBasics.class_method_signature
val get_method_visibility : 'a Javalib.jmethod -> Javalib.access
val is_static_method : 'a Javalib.jmethod -> bool
val is_final_method : 'a Javalib.jmethod -> bool
val is_synchronized_method : 'a Javalib.jmethod -> bool
type inner_class = {
ic_class_name : JBasics.class_name option;
ic_outer_class_name : JBasics.class_name option;
ic_source_name : string option;
ic_access : Javalib.access;
ic_static : bool;
ic_final : bool;
ic_synthetic : bool;
ic_annotation : bool;
ic_enum : bool;
ic_other_flags : int list;
ic_type : [ `Abstract | `ConcreteClass | `Interface ];
}
type 'a jclass = {
c_name : JBasics.class_name;
c_version : JBasics.version;
c_access : [ `Default | `Public ];
c_final : bool;
c_abstract : bool;
c_super_class : JBasics.class_name option;
c_generic_signature : JSignature.classSignature option;
c_fields : Javalib.class_field JBasics.FieldMap.t;
c_interfaces : JBasics.class_name list;
c_consts : JBasics.constant array;
c_sourcefile : string option;
c_deprecated : bool;
c_enclosing_method :
(JBasics.class_name * JBasics.method_signature option) option;
c_source_debug_extention : string option;
c_inner_classes : Javalib.inner_class list;
c_synthetic : bool;
c_enum : bool;
c_annotations : (JBasics.annotation * Javalib.visibility) list;
c_other_flags : int list;
c_other_attributes : (string * string) list;
c_methods : 'a Javalib.jmethod JBasics.MethodMap.t;
}
type 'a jinterface = {
i_name : JBasics.class_name;
i_version : JBasics.version;
i_access : [ `Default | `Public ];
i_interfaces : JBasics.class_name list;
i_generic_signature : JSignature.classSignature option;
i_consts : JBasics.constant array;
i_sourcefile : string option;
i_deprecated : bool;
i_source_debug_extention : string option;
i_inner_classes : Javalib.inner_class list;
i_annotation : bool;
i_annotations : (JBasics.annotation * Javalib.visibility) list;
i_other_attributes : (string * string) list;
i_other_flags : int list;
i_fields : Javalib.interface_field JBasics.FieldMap.t;
i_methods : 'a Javalib.jmethod JBasics.MethodMap.t;
}
type 'a interface_or_class =
JInterface of 'a Javalib.jinterface
| JClass of 'a Javalib.jclass
val get_name : 'a Javalib.interface_or_class -> JBasics.class_name
val get_consts : 'a Javalib.interface_or_class -> JBasics.constant array
val get_access : 'a Javalib.interface_or_class -> [ `Default | `Public ]
val get_sourcefile : 'a Javalib.interface_or_class -> string option
val is_deprecated : 'a Javalib.interface_or_class -> bool
val is_final : 'a Javalib.interface_or_class -> bool
val get_inner_classes :
'a Javalib.interface_or_class -> Javalib.inner_class list
val get_initializer :
'a Javalib.interface_or_class -> 'a Javalib.concrete_method option
val get_other_attributes :
'a Javalib.interface_or_class -> (string * string) list
val get_other_flags : 'a Javalib.interface_or_class -> int list
val defines_method :
'a Javalib.interface_or_class -> JBasics.method_signature -> bool
val get_method :
'a Javalib.interface_or_class ->
JBasics.method_signature -> 'a Javalib.jmethod
val get_concrete_method :
'a Javalib.interface_or_class ->
JBasics.method_signature -> 'a Javalib.concrete_method
val get_methods :
'a Javalib.interface_or_class -> 'a Javalib.jmethod JBasics.MethodMap.t
val get_concrete_methods :
'a Javalib.interface_or_class ->
'a Javalib.concrete_method JBasics.MethodMap.t
val defines_field :
'a Javalib.interface_or_class -> JBasics.field_signature -> bool
val get_field :
'a Javalib.interface_or_class ->
JBasics.field_signature -> Javalib.any_field
val get_fields :
'a Javalib.interface_or_class -> Javalib.any_field JBasics.FieldMap.t
val cf_iter :
(Javalib.class_field -> unit) -> 'a Javalib.interface_or_class -> unit
val if_iter :
(Javalib.interface_field -> unit) ->
'a Javalib.interface_or_class -> unit
val f_iter :
(Javalib.any_field -> unit) -> 'a Javalib.interface_or_class -> unit
val cf_fold :
(Javalib.class_field -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val if_fold :
(Javalib.interface_field -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val f_fold :
(Javalib.any_field -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val cm_iter :
('a Javalib.concrete_method -> unit) ->
'a Javalib.interface_or_class -> unit
val am_iter :
(Javalib.abstract_method -> unit) ->
'a Javalib.interface_or_class -> unit
val m_iter :
('a Javalib.jmethod -> unit) -> 'a Javalib.interface_or_class -> unit
val cm_fold :
('a Javalib.concrete_method -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val am_fold :
(Javalib.abstract_method -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val m_fold :
('a Javalib.jmethod -> 'b -> 'b) ->
'a Javalib.interface_or_class -> 'b -> 'b
val map_concrete_method :
?force:bool ->
('a -> 'b) -> 'a Javalib.concrete_method -> 'b Javalib.concrete_method
val map_interface_or_class :
?force:bool ->
('a -> 'b) ->
'a Javalib.interface_or_class -> 'b Javalib.interface_or_class
val map_interface_or_class_context :
?force:bool ->
('a Javalib.concrete_method -> 'a -> 'b) ->
'a Javalib.interface_or_class -> 'b Javalib.interface_or_class
val map_concrete_method_with_native :
('a Javalib.implementation -> 'b Javalib.implementation) ->
'a Javalib.concrete_method -> 'b Javalib.concrete_method
val map_interface_or_class_with_native :
('a Javalib.implementation -> 'b Javalib.implementation) ->
'a Javalib.interface_or_class -> 'b Javalib.interface_or_class
val map_interface_or_class_with_native_context :
('a Javalib.concrete_method ->
'a Javalib.implementation -> 'b Javalib.implementation) ->
'a Javalib.interface_or_class -> 'b Javalib.interface_or_class
val remove_invokedynamic :
JCode.jcode Javalib.interface_or_class ->
JBasics.method_signature ->
int ->
prefix:string ->
JCode.jcode Javalib.interface_or_class *
JCode.jcode Javalib.interface_or_class
val remove_invokedynamics_in_method :
JCode.jcode Javalib.interface_or_class ->
JBasics.method_signature ->
prefix:string ->
JCode.jcode Javalib.interface_or_class *
JCode.jcode Javalib.interface_or_class JBasics.ClassMap.t
val remove_invokedynamics :
JCode.jcode Javalib.interface_or_class ->
prefix:string ->
JCode.jcode Javalib.interface_or_class *
JCode.jcode Javalib.interface_or_class JBasics.ClassMap.t
type class_path
val class_path : string -> Javalib.class_path
val close_class_path : Javalib.class_path -> unit
val get_class :
Javalib.class_path ->
JBasics.class_name -> JCode.jcode Javalib.interface_or_class
val write_class : string -> JCode.jcode Javalib.interface_or_class -> unit
val extract_class_name_from_file : string -> JBasics.class_name * string
val iter :
?debug:bool ->
(JCode.jcode Javalib.interface_or_class -> unit) -> string -> unit
type directories
val make_directories : string -> Javalib.directories
val read :
Javalib.directories ->
('a -> JCode.jcode Javalib.interface_or_class -> 'a) ->
'a -> string list -> 'a
val transform :
Javalib.directories ->
string ->
(JCode.jcode Javalib.interface_or_class ->
JCode.jcode Javalib.interface_or_class) ->
string list -> unit
val unparse_class :
JCode.jcode Javalib.interface_or_class -> Stdlib.out_channel -> unit
module JPrint :
sig
val class_name : ?jvm:bool -> JBasics.class_name -> string
val cn_package : JBasics.class_name -> string
val cn_simple_name : JBasics.class_name -> string
val method_signature :
?jvm:bool ->
?callee:JBasics.object_type ->
?param_names:string list -> JBasics.method_signature -> string
val class_method_signature :
?jvm:bool ->
?param_names:string list -> JBasics.class_method_signature -> string
val field_signature :
?jvm:bool ->
?declared_in:JBasics.class_name -> JBasics.field_signature -> string
val class_field_signature :
?jvm:bool -> JBasics.class_field_signature -> string
val signature : ?jvm:bool -> string -> JBasics.descriptor -> string
val java_basic_type : ?jvm:bool -> JBasics.java_basic_type -> string
val object_type : ?jvm:bool -> JBasics.object_type -> string
val value_type : ?jvm:bool -> JBasics.value_type -> string
val return_type : ?jvm:bool -> JBasics.value_type option -> string
val value_type_list :
?jvm:bool -> ?names:string list -> JBasics.value_type list -> string
val field_descriptor : ?jvm:bool -> JBasics.value_type -> string
val method_descriptor :
?jvm:bool ->
JBasics.value_type list -> JBasics.value_type option -> string
val stack_map : JBasics.stackmap_frame -> string
val constant : JBasics.constant -> string
val constant_pool : JBasics.constant array -> string
val exception_handler : JCode.exception_handler -> string
val jopcode : ?jvm:bool -> JCode.jopcode -> string
val jcode : ?jvm:bool -> JCode.jcode -> string list
val print_method :
?jvm:bool ->
'a Javalib.jmethod ->
('a -> string list) -> Stdlib.out_channel -> unit
val print_method' :
?jvm:bool ->
'a Javalib.jmethod ->
('a -> Stdlib.Format.formatter -> unit) ->
Stdlib.Format.formatter -> unit
val print_class :
?jvm:bool ->
'a Javalib.interface_or_class ->
('a -> string list) -> Stdlib.out_channel -> unit
val print_class' :
?jvm:bool ->
'a Javalib.interface_or_class ->
('a -> Stdlib.Format.formatter -> unit) ->
Stdlib.Format.formatter -> unit
end
end