◆ get() [1/2]
static ExtractorFactory ppt4j.factory.ExtractorFactory.get |
( |
String | prepatchPath, |
|
|
String | postpatchPath, |
|
|
String | classPath, |
|
|
String... | thirdPartySrcPath ) |
|
static |
Returns an instance of ExtractorFactory initialized with the provided prepatchPath, postpatchPath, classPath, and thirdPartySrcPath.
- Parameters
-
prepatchPath | the path to the pre-patch files |
postpatchPath | the path to the post-patch files |
classPath | the class path for the ExtractorFactory |
thirdPartySrcPath | additional source paths (optional) |
- Returns
- an instance of ExtractorFactory
◆ get() [2/2]
◆ getBytecodeClass()
BytecodeExtractor ppt4j.factory.ExtractorFactory.getBytecodeClass |
( |
String | className | ) |
throws IOException |
Retrieves the bytecode of a class specified by the given class name. If the bytecode for the class is already cached, it returns the cached instance. If the class is contained within a JAR file, it extracts the bytecode from the JAR file. If the class is not found in the JAR file, it logs a debug message and returns a nil BytecodeExtractor. If the class is not within a JAR file, it extracts the bytecode from the classpath directory. It parses the extracted bytecode, adds any inner classes found within the same directory or JAR file, caches the extracted bytecode, and returns the BytecodeExtractor instance.
- Parameters
-
className | the name of the class for which bytecode needs to be extracted |
- Returns
- the BytecodeExtractor instance containing the bytecode of the specified class
- Exceptions
-
IOException | if an I/O error occurs while attempting to extract bytecode |
◆ getPost2Class()
CrossMatcher ppt4j.factory.ExtractorFactory.getPost2Class |
( |
String | className | ) |
throws IOException |
Retrieves a CrossMatcher object associated with a given class name. If the CrossMatcher object is already cached, it is returned directly. Otherwise, a new CrossMatcher object is created using the class name to retrieve the corresponding Java class and bytecode class. The new CrossMatcher object is then cached for future use.
- Parameters
-
className | the name of the class to retrieve the CrossMatcher object for |
- Returns
- the CrossMatcher object associated with the provided class name
- Exceptions
-
IOException | if an I/O error occurs during the retrieval process |
◆ getPostJavaClass()
JavaExtractor ppt4j.factory.ExtractorFactory.getPostJavaClass |
( |
String | className | ) |
|
Returns a JavaExtractor object for the specified class name from the cachedPostExtractors map. If the JavaExtractor object does not exist in the map, a new JavaExtractor object is created using the specified class name and added to the map before returning.
- Parameters
-
className | the name of the Java class to extract |
- Returns
- the JavaExtractor object for the specified class name
◆ getPre2Class()
CrossMatcher ppt4j.factory.ExtractorFactory.getPre2Class |
( |
String | className | ) |
throws IOException |
Retrieves a CrossMatcher object for the given class name. If the CrossMatcher object for the class name is already cached, it is returned. Otherwise, a new CrossMatcher object is created using the pre-java class and bytecode class of the given class name, and then cached for future use.
- Parameters
-
className | the name of the class |
- Returns
- the CrossMatcher object for the given class name
- Exceptions
-
IOException | if an I/O error occurs |
◆ getPreJavaClass()
JavaExtractor ppt4j.factory.ExtractorFactory.getPreJavaClass |
( |
String | className | ) |
|
Retrieves a pre-patch Java class extractor for the specified class name.
- Parameters
-
className | the name of the Java class to extract |
- Returns
- a JavaExtractor object for the specified class name from the pre-patch database
The documentation for this class was generated from the following file: