-
Notifications
You must be signed in to change notification settings - Fork 0
LibrariesManager
LibrariesManager
is a class designed to load and manage the list of known library packages within an Android application. It extends the FileLoader
abstract class to load the list from a file and applies the Singleton pattern.
LibrariesManager
ensures that library packages are properly identified and distinguished within an Android application. It utilizes the Soot framework and leverages the Singleton design pattern.
Returns the singleton instance of LibrariesManager.
Returns the libraries file path.
Checks whether a given SootClass
belongs to a library.
-
Parameters:
sc
- the SootClass to check. -
Return Value:
true
if the SootClass belongs to a library,false
otherwise.
LibrariesManager manager = LibrariesManager.v();
SootClass sootClass = // Retrieve a SootClass instance
boolean isLibrary = manager.isLibrary(sootClass);
if (isLibrary) {
System.out.println("The class is a library.");
} else {
System.out.println("The class is not a library.");
}
These examples demonstrate how to use LibrariesManager
to manage and identify libraries within an Android application. By leveraging Soot, it provides a concise way to handle library packages and load them from a specified file at startup.