|
13 | 13 |
|
14 | 14 | #include <json/json_parser.h>
|
15 | 15 |
|
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. If the string |
| 17 | +/// starts with an `@` it is treated as a path to a JSON file. Otherwise, it is |
| 18 | +/// treated as a regex. |
| 19 | +/// |
| 20 | +/// The regex case describes which class files should be loaded in the form of a |
| 21 | +/// regular expression used with `regex_match`. |
| 22 | +/// |
| 23 | +/// The match set is a list of files to load in JSON format, the argument is the |
| 24 | +/// name of the JSON file, prefixed with `@`. The file contains one section to |
| 25 | +/// list the .jar files to load and one section to list the .class files to load |
| 26 | +/// from the .jar. |
| 27 | +/// |
| 28 | +/// for example a file called `load.json` with the following content: |
| 29 | +/// { |
| 30 | +/// "jar": |
| 31 | +/// [ |
| 32 | +/// "A.jar", |
| 33 | +/// "B.jar" |
| 34 | +/// ], |
| 35 | +/// "classFiles": |
| 36 | +/// [ |
| 37 | +/// "jarfile3$A.class", |
| 38 | +/// "jarfile3.class" |
| 39 | +/// ] |
| 40 | +/// } |
| 41 | +/// would be specified via `--java-cp-include-files @load.json` and would |
| 42 | +/// instruct the driver to load `A.jar` and `B.jar` and the two .class files |
| 43 | +/// `jarfile3$A.class` and `jarfile3.class`. All the rest of the .jar files is |
| 44 | +/// ignored. |
| 45 | +/// |
| 46 | +/// \param java_cp_include_files: parameter from `java-cp-include-files` in the |
| 47 | +/// format as described above |
18 | 48 | void java_class_loader_limitt::setup_class_load_limit(
|
19 | 49 | const std::string &java_cp_include_files)
|
20 | 50 | {
|
@@ -51,7 +81,9 @@ void java_class_loader_limitt::setup_class_load_limit(
|
51 | 81 | }
|
52 | 82 | }
|
53 | 83 |
|
54 |
| -/// \par parameters: class file name |
| 84 | +/// Use the class load limiter to decide whether a class file should be loaded |
| 85 | +/// or not. |
| 86 | +/// \param file_name: the name of the class file to load |
55 | 87 | /// \return true if file should be loaded, else false
|
56 | 88 | bool java_class_loader_limitt::load_class_file(const std::string &file_name)
|
57 | 89 | {
|
|
0 commit comments