Module Absint.MethodMatcher

type t = IR.Tenv.t -> IR.Procname.t -> HilExp.t list -> bool

pattern matcher for Java/C++ methods NB matching is modulo template arguments in C++ classes and functions

type record = {
  1. search_superclasses : bool;
  2. method_prefix : bool;
  3. actuals_pred : HilExp.t list -> bool;
  4. classname : string;
  5. methods : string list;
}
val default : record

record encapsulating the default arguments of call_matches. classname="" and methods=[]. Useful for with expressions

val of_record : record -> t

make a matcher out of a record; optional values use defaults

val of_json : Yojson.Safe.t -> t

Parse a JSon object into a matcher. The Json object must be a list of records, each corresponding to a single matcher. Each record must have a "classname" field with a string value, and a "methods" field with a list of strings. The record may also have boolean fields "search_superclasses" and "method_prefix". If absent, the defaults are used. The resulting matcher matches if one of the matchers in the list does.

val of_list : t list -> t

Or combinator

val of_records : record list -> t

shorthand for of_list (List.map ~f:of_record r)