Module Nullsafe__ThirdPartyAnnotationInfo
type signature_info
=
{
filename : string;
File where the particular signature is stored
line_number : int;
Line number with this signature
signature : Nullsafe.ThirdPartyMethod.t;
}
type unique_repr
=
{
class_name : Nullsafe.ThirdPartyMethod.fully_qualified_type;
method_name : Nullsafe.ThirdPartyMethod.method_name;
param_types : Nullsafe.ThirdPartyMethod.fully_qualified_type list;
}
The minimum information that is needed to _uniquely_ identify the method. That why we don't
- include e.g. return type, access quilifiers, or whether the method is static (because Java
- overload resolution rules ignore these things). In contrast, parameter types are essential,
- because Java allows several methods with different types.
val pp_unique_repr : Stdlib.Format.formatter -> unique_repr -> unit
val unique_repr_of_java_proc_name : IR.Procname.Java.t -> unique_repr
val create_storage : unit -> storage
type file_parsing_error
=
{
line_number : int;
unparsable_method : string;
parsing_error : Nullsafe.ThirdPartyMethod.parsing_error;
}
val pp_parsing_error : Stdlib.Format.formatter -> file_parsing_error -> unit
val add_from_signature_file : storage -> filename:string -> lines:string list -> (storage, file_parsing_error) IStdlib.IStd.result
Parse the information from the signature file, and add it to the storage
val find_nullability_info : storage -> unique_repr -> signature_info option
The main method. Do we have an information about the third-party method? If we do not, or it is not a third-party method, returns None. Otherwise returns the nullability information.
If the package is third-party, return the relevant .sig file to add signatures for this package.
If the function is third-party (based on its package), return relevant .sig file
val is_third_party_proc : storage -> IR.Procname.Java.t -> bool
Checks whether a required procname comes from third-party code based on available .sig files and config flags. NOTE: considering config flags is done for compatibility with the legacy behaviour and will be removed in the future
val is_third_party_class_name : storage -> IR.JavaClassName.t -> bool
See
is_third_party_proc
.