Package ghidra.plugin.importer
Class ProjectIndexService
java.lang.Object
ghidra.plugin.importer.ProjectIndexService
- All Implemented Interfaces:
DomainFolderChangeListener,AutoCloseable
public class ProjectIndexService
extends Object
implements DomainFolderChangeListener, AutoCloseable
An in-memory index of FSRL-to-domainfiles.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic interface -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclose()voiddomainFileAdded(DomainFile file) Notification that a file is added to parent folder.voiddomainFileRemoved(DomainFolder parent, String name, String fileID) Notification that a file was removedfindFirstByFSRL(FSRL fsrl) static ProjectIndexServicegetIndexFor(Project project) Returns an index for a Project.lookupFiles(ProjectIndexService.IndexType keyType, Object keyValue) static voidprojectClosed(Project project) Notify the index instance management that a Project has been closed.voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ghidra.framework.model.DomainFolderChangeListener
domainFileMoved, domainFileObjectClosed, domainFileObjectOpenedForUpdate, domainFileRenamed, domainFileStatusChanged, domainFolderAdded, domainFolderMoved, domainFolderRemoved, domainFolderRenamed, domainFolderSetActive
-
Field Details
-
DUMMY
-
-
Constructor Details
-
ProjectIndexService
-
-
Method Details
-
getIndexFor
Returns an index for a Project. Instances returned by this method should not beclosedby the caller.- Parameters:
project-Projectto get index for, ornullfor a DUMMY placeholder- Returns:
ProjectIndexServiceinstance, never null
-
projectClosed
Notify the index instance management that a Project has been closed. Users of this service need to do this because notification of Project closure is only available to GUI Plugin classes.- Parameters:
project-Projectthat was closed
-
close
public void close()- Specified by:
closein interfaceAutoCloseable
-
addIndexListener
-
removeIndexListener
-
domainFileAdded
Description copied from interface:DomainFolderChangeListenerNotification that a file is added to parent folder. You can get the parent from the file.- Specified by:
domainFileAddedin interfaceDomainFolderChangeListener- Parameters:
file- domain file which was just added.
-
domainFileRemoved
Description copied from interface:DomainFolderChangeListenerNotification that a file was removed- Specified by:
domainFileRemovedin interfaceDomainFolderChangeListener- Parameters:
parent- domain folder which contained the file that was just removed.name- the name of the file that was removed.fileID- file ID or null
-
lookupFiles
-
findFirstByFSRL
-