Module IR.HackClassName

module F = Stdlib.Format
type t
include Ppx_compare_lib.Comparable.S with type t := t
val compare : t Base__Ppx_compare_lib.compare
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val yojson_of_t : t -> Ppx_yojson_conv_lib.Yojson.Safe.t
include Sexplib0.Sexpable.S with type t := t
val t_of_sexp : Sexplib0__.Sexp.t -> t
val sexp_of_t : t -> Sexplib0__.Sexp.t
include Ppx_hash_lib.Hashable.S with type t := t
val hash_fold_t : t Base__Ppx_hash_lib.hash_fold
val hash : t -> Base__Ppx_hash_lib.Std.Hash.hash_value
val hash_normalize : t -> t
val hash_normalize_opt : t option -> t option
val hash_normalize_list : t list -> t list
val make : ?namespace:string -> string -> t
val classname : t -> string
val components : t -> string list
val wildcard : t
val pp : F.formatter -> t -> unit
val to_string : t -> string
val static_companion : t -> t

return the class of the companion class object of this class eg: Foo -> Foo$static

val static_companion_origin : t -> t

return the origin class of a companion class object eg: Foo$static -> Foo. the result is not specified if is the name is not a valid static class name

val is_static_companion : t -> bool

tests if the name is a valid static class name (ie. ends with "$static")

val is_builtins : t -> bool

tests if the name of the class is $builtins where hhbc functions and models belong to

val is_generated_curry : t -> bool

tests if the name of the class if of the special form used by HackC for function references

val extract_curry_info : t -> (t * string) option

returns a pair (classname, short_method_name) from a generated curry type:

  • classname is the enclosing type of the corresponding function reference
  • short_method_name is the short name of the corresponding function reference