@@ -13,8 +13,35 @@ Author: Daniel Kroening, kroening@kroening.com
1313
1414#include < json/json_parser.h>
1515
16- // / initializes class with either regex matcher or match set
17- // / \par parameters: parameter from `java-cp-include-files`
16+ // / Initializes class with either regex matcher or match set. The regex match
17+ // / described which class files should be loaded in the form of a regular
18+ // / expression used with `regex_match`.
19+ // /
20+ // / The match set is a list of files to load in JSON format, the argument is the
21+ // / name of the JSON file, prefixed with `@`. The file contains one section to
22+ // / list the .jar files to load and one section to list the .class files to load
23+ // / from the .jar.
24+ // /
25+ // / for example a file called `load.json` with the following content:
26+ // / {
27+ // / "jar":
28+ // / [
29+ // / "A.jar",
30+ // / "B.jar"
31+ // / ],
32+ // / "classFiles":
33+ // / [
34+ // / "jarfile3$A.class",
35+ // / "jarfile3.class"
36+ // / ]
37+ // / }
38+ // / would be specified via `--java-cp-include-files @load.json` and would
39+ // / instruct the driver to load `A.jar` and `B.jar` and the two .class files
40+ // / `jarfile3$A.class` and `jarfile3.class`. All the rest of the .jar files is
41+ // / ignored.
42+ // /
43+ // / \param java_cp_include_files: parameter from `java-cp-include-files` in the
44+ // / format as described above
1845void java_class_loader_limitt::setup_class_load_limit (
1946 const std::string &java_cp_include_files)
2047{
@@ -51,7 +78,9 @@ void java_class_loader_limitt::setup_class_load_limit(
5178 }
5279}
5380
54- // / \par parameters: class file name
81+ // / Use the class load limiter to decide whether a class file should be loaded
82+ // / or not.
83+ // / \param file_name: the name of the class file to load
5584// / \return true if file should be loaded, else false
5685bool java_class_loader_limitt::load_class_file (const std::string &file_name)
5786{
0 commit comments