|
class | MemoryClassLoader |
|
class | MemoryJavaFileManager |
|
◆ getByDatabaseId()
static Vulnerability ppt4j.factory.DatabaseFactory.getByDatabaseId |
( |
int | id | ) |
|
|
static |
Retrieves a Vulnerability object by its database id. If the Vulnerability object is already cached, it is returned from the cache. If the object is not cached, it is read from a JSON file using the id and returned as a Vulnerability object.
- Parameters
-
- Returns
- A Vulnerability object with the specified id
- Exceptions
-
IllegalStateException | if the JSON file is not found or if an IOException occurs during processing |
◆ makeDataset() [1/2]
Creates a Vulnerability instance using the provided VulnerabilityInfo object, compiles and loads the instance, and adds it to the cached classes by Database ID and CVE ID. If a Vulnerability with the same Database ID or CVE ID already exists in the cache, an IllegalStateException is thrown.
- Parameters
-
- Returns
- the created Vulnerability instance
◆ makeDataset() [2/2]
static Vulnerability ppt4j.factory.DatabaseFactory.makeDataset |
( |
InputStream | jsonInput | ) |
throws IOException |
|
static |
Reads a JSON input stream and creates a Vulnerability object based on the information provided.
- Parameters
-
jsonInput | the input stream containing JSON data |
- Returns
- a Vulnerability object created from the JSON input
- Exceptions
-
IOException | if an I/O error occurs while reading the input stream |
The documentation for this class was generated from the following file: