Package ghidra.program.database.sourcemap

# Class SourceMapEntryDB

java.lang.Object
ghidra.program.database.sourcemap.SourceMapEntryDB

All Implemented Interfaces:
  `SourceMapEntry`, `Comparable<SourceMapEntry>`

public class SourceMapEntryDB extends Object implements SourceMapEntry
Database implementation of `SourceMapEntry` interface.

Note: clients should drop and reacquire all SourceMapEntryDB objects upon undo/redo, ProgramEvent.SOURCE_MAP_CHANGED, and ProgramEvent.SOURCE_FILE_REMOVED.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `int`
  `compareTo(SourceMapEntry o)`
  `boolean`
  `equals(Object o)`
  `Address`
  `getBaseAddress()`
  Returns the base address of the entry
  `long`
  `getLength()`
  Returns the length of the range (number of addresses)
  `int`
  `getLineNumber()`
  Returns the line number.
  `AddressRange`
  `getRange()`
  Returns the address range, or null for length 0 entries
  `SourceFile`
  `getSourceFile()`
  Returns the source file
  `int`
  `hashCode()`
  `String`
  `toString()`

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

  `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- ## Method Details

  - ### getLineNumber

    public int getLineNumber()
    Description copied from interface: `SourceMapEntry`
    Returns the line number.
    Specified by:
      `getLineNumber` in interface `SourceMapEntry`
    Returns:
      line number

  - ### getSourceFile

    public SourceFile getSourceFile()
    Description copied from interface: `SourceMapEntry`
    Returns the source file
    Specified by:
      `getSourceFile` in interface `SourceMapEntry`
    Returns:
      source file

  - ### getBaseAddress

    public Address getBaseAddress()
    Description copied from interface: `SourceMapEntry`
    Returns the base address of the entry
    Specified by:
      `getBaseAddress` in interface `SourceMapEntry`
    Returns:
      base address

  - ### getRange

    public AddressRange getRange()
    Description copied from interface: `SourceMapEntry`
    Returns the address range, or null for length 0 entries
    Specified by:
      `getRange` in interface `SourceMapEntry`
    Returns:
      address range or null

  - ### getLength

    public long getLength()
    Description copied from interface: `SourceMapEntry`
    Returns the length of the range (number of addresses)
    Specified by:
      `getLength` in interface `SourceMapEntry`
    Returns:
      length

  - ### toString

    public String toString()
    Overrides:
      `toString` in class `Object`

  - ### compareTo

    public int compareTo(SourceMapEntry o)
    Specified by:
      `compareTo` in interface `Comparable<SourceMapEntry>`

  - ### equals

    public boolean equals(Object o)
    Overrides:
      `equals` in class `Object`

  - ### hashCode

    public int hashCode()
    Overrides:
      `hashCode` in class `Object`