java.lang.Object
com.pnfsoftware.jeb.core.output.text.impl.TextItem
All Implemented Interfaces:
IActionableItem, IItem, IVisualItem, IActionableTextItem, ITextItem, IVisualTextItem
Direct Known Subclasses:
AssemblyItem

@Ser public class TextItem extends Object implements IActionableTextItem
A simple implementation for an actionable text item within a line.
  • Constructor Details

    • TextItem

      public TextItem(int offset, int length)
    • TextItem

      public TextItem(int offset, int length, ItemClassIdentifiers classId)
    • TextItem

      public TextItem(int offset, int length, ItemClassIdentifiers classId, long itemId, int flags)
  • Method Details

    • getOffset

      public int getOffset()
      Description copied from interface: ITextItem
      Get the item offset within a line.
      Specified by:
      getOffset in interface ITextItem
      Returns:
      the item offset
    • setOffset

      public void setOffset(int offset)
    • getLength

      public int getLength()
      Description copied from interface: ITextItem
      Get item length within a line.
      Specified by:
      getLength in interface ITextItem
      Returns:
      the item character count
    • setLength

      public void setLength(int length)
    • getOffsetEnd

      public int getOffsetEnd()
      Description copied from interface: ITextItem
      Get the item end offset (exclusive) within a line.
      Specified by:
      getOffsetEnd in interface ITextItem
      Returns:
    • getClassId

      public ItemClassIdentifiers getClassId()
      Description copied from interface: IVisualItem
      Retrieve the item class id, if any.
      Specified by:
      getClassId in interface IVisualItem
      Returns:
      the class id, null if none
    • setClassId

      public void setClassId(ItemClassIdentifiers classId)
    • getItemId

      public long getItemId()
      Description copied from interface: IActionableItem
      Retrieve the item id.
      Specified by:
      getItemId in interface IActionableItem
      Returns:
      the item id, 0 if none
    • setItemId

      public void setItemId(long itemId)
    • getItemFlags

      public int getItemFlags()
      Description copied from interface: IActionableItem
      Retrieve the item flags. Currently, allowed flags are:
      - IActionableItem.ROLE_MASTER
      - IActionableItem.HAS_RELATED_ITEMS

      For code nodes, this is not to be confused with the generic flags.

      Specified by:
      getItemFlags in interface IActionableItem
      Returns:
      the items flags
    • setItemFlags

      public void setItemFlags(int flags)
    • getLine

      public ILine getLine()
      Description copied from interface: ITextItem
      Get the line that contains this item.
      Specified by:
      getLine in interface ITextItem
      Returns:
      the line, or null if the item does not belong to any line
    • setLine

      public void setLine(ILine line)
    • getText

      public String getText()
      Description copied from interface: ITextItem
      Get the text of the item.
      Specified by:
      getText in interface ITextItem
      Returns:
    • toString

      public String toString()
      Overrides:
      toString in class Object