Package ghidra.app.services
Class AbstractAnalyzer
- java.lang.Object
-
- ghidra.app.services.AbstractAnalyzer
-
- All Implemented Interfaces:
Analyzer
,ExtensionPoint
- Direct Known Subclasses:
AbstractBinaryFormatAnalyzer
,AnalyzerAdapter
,CondenseFillerBytesAnalyzer
,GhidraScriptAnalyzerAdapter
public abstract class AbstractAnalyzer extends java.lang.Object implements Analyzer
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractAnalyzer(java.lang.String name, java.lang.String description, AnalyzerType type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
analysisEnded(Program program)
Called when an auto-analysis session ends.boolean
canAnalyze(Program program)
Can this analyzer work on this program.AnalyzerType
getAnalysisType()
Get the type of analysis this analyzer performsboolean
getDefaultEnablement(Program program)
Returns true if this analyzer should be enabled by default.java.lang.String
getDescription()
Get a longer description of what this analyzer does.java.lang.String
getName()
Get the name of this analyzerAnalysisPriority
getPriority()
Get the priority that this analyzer should run at.boolean
isPrototype()
Returns true if this analyzer is a prototype.void
optionsChanged(Options options, Program program)
Analyzers should initialize their options from the values in the given Options, providing appropriate default values.void
registerOptions(Options options, Program program)
boolean
removed(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
Called when the requested information type has been removed.protected void
setDefaultEnablement(boolean b)
protected void
setPriority(AnalysisPriority priority)
protected void
setPrototype()
protected void
setSupportsOneTimeAnalysis()
protected void
setSupportsOneTimeAnalysis(boolean supportsOneTimeAnalysis)
boolean
supportsOneTimeAnalysis()
Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet.
-
-
-
Constructor Detail
-
AbstractAnalyzer
protected AbstractAnalyzer(java.lang.String name, java.lang.String description, AnalyzerType type)
-
-
Method Detail
-
setPriority
protected void setPriority(AnalysisPriority priority)
-
setDefaultEnablement
protected void setDefaultEnablement(boolean b)
-
setSupportsOneTimeAnalysis
protected void setSupportsOneTimeAnalysis()
-
setSupportsOneTimeAnalysis
protected void setSupportsOneTimeAnalysis(boolean supportsOneTimeAnalysis)
-
setPrototype
protected void setPrototype()
-
getName
public final java.lang.String getName()
Description copied from interface:Analyzer
Get the name of this analyzer
-
getAnalysisType
public final AnalyzerType getAnalysisType()
Description copied from interface:Analyzer
Get the type of analysis this analyzer performs- Specified by:
getAnalysisType
in interfaceAnalyzer
- Returns:
- analyze type
-
getDefaultEnablement
public boolean getDefaultEnablement(Program program)
Description copied from interface:Analyzer
Returns true if this analyzer should be enabled by default. Generally useful analyzers should return true. Specialized analyzers should return false;- Specified by:
getDefaultEnablement
in interfaceAnalyzer
-
supportsOneTimeAnalysis
public final boolean supportsOneTimeAnalysis()
Description copied from interface:Analyzer
Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet. The AutoAnalyzer plug-in will automatically create an action for each analyzer that returns true.- Specified by:
supportsOneTimeAnalysis
in interfaceAnalyzer
-
getDescription
public final java.lang.String getDescription()
Description copied from interface:Analyzer
Get a longer description of what this analyzer does.- Specified by:
getDescription
in interfaceAnalyzer
- Returns:
- analyzer description
-
getPriority
public final AnalysisPriority getPriority()
Description copied from interface:Analyzer
Get the priority that this analyzer should run at.- Specified by:
getPriority
in interfaceAnalyzer
- Returns:
- analyzer priority
-
removed
public boolean removed(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log) throws CancelledException
Description copied from interface:Analyzer
Called when the requested information type has been removed. (ie: function removed.)- Specified by:
removed
in interfaceAnalyzer
- Parameters:
program
- program to analyzeset
- AddressSet of locations that have been addedmonitor
- monitor that indicates progress and indicates whether the user canceled the analysislog
- a message log to record analysis information- Returns:
- true if the analysis succeeded
- Throws:
CancelledException
-
canAnalyze
public boolean canAnalyze(Program program)
Description copied from interface:Analyzer
Can this analyzer work on this program.- Specified by:
canAnalyze
in interfaceAnalyzer
- Parameters:
program
- program to be analyzed- Returns:
- true if this analyzer can analyze this program
-
optionsChanged
public void optionsChanged(Options options, Program program)
Description copied from interface:Analyzer
Analyzers should initialize their options from the values in the given Options, providing appropriate default values.- Specified by:
optionsChanged
in interfaceAnalyzer
- Parameters:
options
- the property list that contains the optionsprogram
- program to be analyzed
-
analysisEnded
public void analysisEnded(Program program)
Description copied from interface:Analyzer
Called when an auto-analysis session ends. This notifies the analyzer so it can clean up any resources that only needed to be maintained during a single auto-analysis session.- Specified by:
analysisEnded
in interfaceAnalyzer
- Parameters:
program
- the program that was just completed being analyzed
-
isPrototype
public final boolean isPrototype()
Description copied from interface:Analyzer
Returns true if this analyzer is a prototype.- Specified by:
isPrototype
in interfaceAnalyzer
- Returns:
- true if this analyzer is a prototype
-
registerOptions
public void registerOptions(Options options, Program program)
- Specified by:
registerOptions
in interfaceAnalyzer
-
-