Package ghidra.app.services

# Class AbstractAnalyzer

java.lang.Object
ghidra.app.services.AbstractAnalyzer

All Implemented Interfaces:
  `Analyzer`, `ExtensionPoint`

Direct Known Subclasses:
  `AbstractBinaryFormatAnalyzer`, `AggressiveInstructionFinderAnalyzer`, `AnalyzerAdapter`, `ArmAggressiveInstructionFinderAnalyzer`, `CondenseFillerBytesAnalyzer`, `GccExceptionAnalyzer`

public abstract class AbstractAnalyzer extends Object implements Analyzer

- ## Constructor Summary

  Constructors
  Modifier
  Constructor
  Description
  `protected`
  `AbstractAnalyzer(String name, String description, AnalyzerType type)`

- ## Method Summary

  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.
  `final AnalyzerType`
  `getAnalysisType()`
  Get the type of analysis this analyzer performs
  `boolean`
  `getDefaultEnablement(Program program)`
  Returns true if this analyzer should be enabled by default.
  `final String`
  `getDescription()`
  Get a longer description of what this analyzer does.
  `final String`
  `getName()`
  Get the name of this analyzer
  `final AnalysisPriority`
  `getPriority()`
  Get the priority that this analyzer should run at.
  `final 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)`
  Analyzers should register their options with associated default value, help content and description
  `boolean`
  `removed(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)`
  Called when the requested information type has been removed, for example, when a function is removed.
  `protected void`
  `setDefaultEnablement(boolean b)`
  `protected void`
  `setPriority(AnalysisPriority priority)`
  `protected void`
  `setPrototype()`
  `protected void`
  `setSupportsOneTimeAnalysis()`
  `protected void`
  `setSupportsOneTimeAnalysis(boolean supportsOneTimeAnalysis)`
  `final boolean`
  `supportsOneTimeAnalysis()`
  Returns true if it makes sense for this analyzer to directly invoked on an address or addressSet.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface ghidra.app.services.Analyzer

  `added, getOptionsUpdater`

- ## Constructor Details

  - ### AbstractAnalyzer

    protected AbstractAnalyzer(String name, String description, AnalyzerType type)

- ## Method Details

  - ### 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 String getName()
    Description copied from interface: `Analyzer`
    Get the name of this analyzer
    Specified by:
      `getName` in interface `Analyzer`
    Returns:
      analyzer name

  - ### getAnalysisType

    public final AnalyzerType getAnalysisType()
    Description copied from interface: `Analyzer`
    Get the type of analysis this analyzer performs
    Specified by:
      `getAnalysisType` in interface `Analyzer`
    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 interface `Analyzer`
    Parameters:
      `program` - the program
    Returns:
      true if enabled by default

  - ### 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 interface `Analyzer`
    Returns:
      true if supports one-time analysis

  - ### getDescription

    public final String getDescription()
    Description copied from interface: `Analyzer`
    Get a longer description of what this analyzer does.
    Specified by:
      `getDescription` in interface `Analyzer`
    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 interface `Analyzer`
    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, for example, when a function is removed.
    Specified by:
      `removed` in interface `Analyzer`
    Parameters:
      `program` - program to analyze
      `set` - AddressSet of locations that have been added
      `monitor` - monitor that indicates progress and indicates whether the user canceled the analysis
      `log` - a message log to record analysis information
    Returns:
      true if the analysis succeeded
    Throws:
      `CancelledException` - if the analysis is cancelled

  - ### canAnalyze

    public boolean canAnalyze(Program program)
    Description copied from interface: `Analyzer`
    Can this analyzer work on this program.
    Specified by:
      `canAnalyze` in interface `Analyzer`
    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 interface `Analyzer`
    Parameters:
      `options` - the program options/property list that contains the options
      `program` - 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 interface `Analyzer`
    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 interface `Analyzer`
    Returns:
      true if this analyzer is a prototype

  - ### registerOptions

    public void registerOptions(Options options, Program program)
    Description copied from interface: `Analyzer`
    Analyzers should register their options with associated default value, help content and description
    Specified by:
      `registerOptions` in interface `Analyzer`
    Parameters:
      `options` - the program options/property list that contains the options
      `program` - program to be analyzed