Package ghidra.app.util.viewer.field

# Class Annotation

java.lang.Object
ghidra.app.util.viewer.field.Annotation

public class Annotation extends Object

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `ESCAPABLE_CHARS`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Annotation(String annotationText, AttributedString prototypeString, Program program)`
  Constructor Note: This constructor assumes that the string starts with "{

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static List<AnnotatedStringHandler>`
  `getAnnotatedStringHandlers()`
  `String`
  `getAnnotationText()`
  `AttributedString`
  `getDisplayString()`
  `boolean`
  `handleMouseClick(Navigatable sourceNavigatable, ServiceProvider serviceProvider)`
  Called when a mouse click occurs on a FieldElement containing this Annotation.
  `String`
  `toString()`

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

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

- ## Field Details

  - ### ESCAPABLE_CHARS

    public static final String ESCAPABLE_CHARS
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### Annotation

    public Annotation(String annotationText, AttributedString prototypeString, Program program)
    Constructor Note: This constructor assumes that the string starts with "{

        @

    " and ends with '}'
    Parameters:
      `annotationText` - The complete annotation text.
      `prototypeString` - An AttributedString that provides the attributes for the display text this Annotation can create
      `program` - the program

- ## Method Details

  - ### getAnnotatedStringHandlers

    public static List<AnnotatedStringHandler> getAnnotatedStringHandlers()

  - ### getDisplayString

    public AttributedString getDisplayString()

  - ### handleMouseClick

    public boolean handleMouseClick(Navigatable sourceNavigatable, ServiceProvider serviceProvider)
    Called when a mouse click occurs on a FieldElement containing this Annotation.
    Parameters:
      `sourceNavigatable` - The source navigatable associated with the mouse click.
      `serviceProvider` - The service provider to be used when creating `AnnotatedStringHandler` instances.
    Returns:
      true if the handler desires to handle the mouse click.

  - ### getAnnotationText

    public String getAnnotationText()

  - ### toString

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