Package ghidra.plugins.importer.batch
Class BatchGroup
- java.lang.Object
-
- ghidra.plugins.importer.batch.BatchGroup
-
public class BatchGroup extends java.lang.Object
A group ofLoadSpec
s (possibly from different user added sources) that have a commonBatchSegregatingCriteria
.All the Apps must have the same set of
LoadSpec
s to be included in the same BatchGroup.Each BatchGroup has a single selected (
BatchGroupLoadSpec
) that applies to all the Apps in the group.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
BatchGroup.BatchLoadConfig
-
Constructor Summary
Constructors Constructor Description BatchGroup(BatchSegregatingCriteria criteria)
Creates a newBatchGroup
keyed on the specifiedcriteria
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(ByteProvider provider, java.util.Collection<LoadSpec> loadSpecs, FSRL fsrl, UserAddedSourceInfo uasi)
AddsLoadSpec
s to this group.java.util.List<BatchGroup.BatchLoadConfig>
getBatchLoadConfig()
Returns the list of currentBatchGroup.BatchLoadConfig
in this group.BatchSegregatingCriteria
getCriteria()
Returns theBatchSegregatingCriteria
of this group.BatchGroupLoadSpec
getSelectedBatchGroupLoadSpec()
Returns the selectedBatchGroupLoadSpec
that applies to the entireBatchGroup
.boolean
isEmpty()
Returns true if there are no applications in this group.boolean
isEnabled()
Returns true if this group is 'enabled', which means that it has a selectedBatchGroupLoadSpec
and the user has chosen to mark this group as importable.void
removeDescendantsOf(FSRL fsrl)
Removes any applications that are inside the specified container file.void
setEnabled(boolean enabled)
Sets the enabled status of this group.void
setSelectedBatchGroupLoadSpec(BatchGroupLoadSpec selectedBatchGroupLoadSpec)
Sets the currentBatchGroupLoadSpec
for the entire group of applications.int
size()
Returns the number of applications in this group.java.lang.String
toString()
-
-
-
Constructor Detail
-
BatchGroup
public BatchGroup(BatchSegregatingCriteria criteria)
Creates a newBatchGroup
keyed on the specifiedcriteria
.- Parameters:
criteria
-BatchSegregatingCriteria
of thisBatchGroup
.
-
-
Method Detail
-
add
public void add(ByteProvider provider, java.util.Collection<LoadSpec> loadSpecs, FSRL fsrl, UserAddedSourceInfo uasi)
AddsLoadSpec
s to this group.- Parameters:
provider
- TheByteProvider
.loadSpecs
-LoadSpec
s to add to this group.fsrl
-FSRL
of the application's import source file.uasi
-UserAddedSourceInfo
-
getSelectedBatchGroupLoadSpec
public BatchGroupLoadSpec getSelectedBatchGroupLoadSpec()
Returns the selectedBatchGroupLoadSpec
that applies to the entireBatchGroup
.- Returns:
- selected
BatchGroupLoadSpec
that applies to the entireBatchGroup
.
-
setSelectedBatchGroupLoadSpec
public void setSelectedBatchGroupLoadSpec(BatchGroupLoadSpec selectedBatchGroupLoadSpec)
Sets the currentBatchGroupLoadSpec
for the entire group of applications.- Parameters:
selectedBatchGroupLoadSpec
-BatchGroupLoadSpec
to set
-
isEnabled
public boolean isEnabled()
Returns true if this group is 'enabled', which means that it has a selectedBatchGroupLoadSpec
and the user has chosen to mark this group as importable.- Returns:
- boolean enabled status.
-
setEnabled
public void setEnabled(boolean enabled)
Sets the enabled status of this group.- Parameters:
enabled
- boolean
-
getCriteria
public BatchSegregatingCriteria getCriteria()
Returns theBatchSegregatingCriteria
of this group.- Returns:
BatchSegregatingCriteria
of this group.
-
size
public int size()
Returns the number of applications in this group.- Returns:
- number of applications in this group.
-
isEmpty
public boolean isEmpty()
Returns true if there are no applications in this group.- Returns:
- boolean true if there are no applications in this group.
-
getBatchLoadConfig
public java.util.List<BatchGroup.BatchLoadConfig> getBatchLoadConfig()
Returns the list of currentBatchGroup.BatchLoadConfig
in this group.- Returns:
List
ofBatchGroup.BatchLoadConfig
BatchGroup.BatchLoadConfig
wrappers.
-
removeDescendantsOf
public void removeDescendantsOf(FSRL fsrl)
Removes any applications that are inside the specified container file.- Parameters:
fsrl
-FSRL
of a container.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-