after searching, I couldn't find how to get the type of parameters in an erlang module. For more clear, this is what I'm trying to do:
- 1/ show all loaded erlang modules by:
erlang:loaded()-> this returns a list of atoms which are modules names - 2/ show all exported functions for a module by this:
Module:module_info(exports)-> this returns a list of tuples which are likely this: {function_name, number_of_parameters) - 3/ show parameter types in the above founded function -> I got stuck at this ...
An example:
- Input:
application:load("1", 2, "3", {123, "2\"{[1234", 123}, ad, <<"asa]}\">>\", 2, 300:16>>). Output:
- Module_Name: application
- Function_Name: load
- Number of params: 6
Param lists:
"1" ---> type: string2 ---> type: integer"3" ---> type: string{123, "2\"{[1234", 123}---> type: tuple`ad ---> type: atom<<"asa]}\">>\", 2, 300:16>> ---> type: binary
Solved
my problem was solved at this: erlang parse string to data types using regex