Interface IUnitDocumentPresentation

All Known Implementing Classes:
AbstractTransientUnitRepresentation, AbstractUnitRepresentation, UnitRepresentationAdapter

@Ser public interface IUnitDocumentPresentation
Presentation elements are used by clients for display of unit data. They provide one or more documents. Implementations of this interface may be document factories, holding multiple documents of the same presentation. It is important to call dispose() when the presentation is no longer needed.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Dispose this presentation.
    Get a document.
    long
    Get a unique identifier for the document across all documents generated by the unit formatter.
    Get the label for that document.
    boolean
    Determine if the document is the default representation for that unit.
  • Field Details

  • Method Details

    • getId

      long getId()
      Get a unique identifier for the document across all documents generated by the unit formatter.

      Note: 1 is the commonly-used id for disassembly documents.

      Returns:
      the optional identifier, 0 if none
    • getLabel

      String getLabel()
      Get the label for that document.
      Returns:
      the optional label
    • isDefaultRepresentation

      boolean isDefaultRepresentation()
      Determine if the document is the default representation for that unit.
      Returns:
      true if this presentation is the default, false otherwise.
    • getDocument

      IGenericDocument getDocument()
      Get a document. It is implementation-dependent whether the document is a freshly created or a singleton provided by the presentation.
      Returns:
      the document
    • dispose

      void dispose()
      Dispose this presentation. All created documents held in the presentation shall be destroyed. This method is a fail-safe, calling it is not good practice. Good practice is to let the code that created a document dispose of it.