Interface IConstantPoolExtension


  • public interface IConstantPoolExtension
    Interface for Flight Recorder constant pool extensions. Implementation are created by IParserExtension.createConstantPoolExtension() each time a recording is starting to be parsed Provides callbacks for constant pools reads, referencing, simple resolution, full resolution and parsing is finished
    • Method Summary

      All Methods Instance Methods Default Methods 
      Modifier and Type Method Description
      default void allConstantPoolsResolved​(java.util.Map<java.lang.String,​FastAccessNumberMap<java.lang.Object>> constantPools)
      Called when all constant pools are resolved.
      default java.lang.Object constantRead​(long constantIndex, java.lang.Object constant, java.lang.String eventTypeId)
      Called when a constant is read from the Metadata to put into the constant pool.
      default java.lang.Object constantReferenced​(java.lang.Object constant, java.lang.String poolName, java.lang.String eventTypeId)
      Called when a referenced constant is read from another constant pool or actual recording events.
      default java.lang.Object constantResolved​(java.lang.Object constant, java.lang.String poolName, java.lang.String eventTypeId)
      Called when a referenced constant is resolved from another pool or actual recording events.
      default void eventsLoaded()
      Called when all events are loaded (end of parsing)
      default java.lang.String getId()  
      default IItemCollection getItemCollection()  
    • Method Detail

      • constantRead

        default java.lang.Object constantRead​(long constantIndex,
                                              java.lang.Object constant,
                                              java.lang.String eventTypeId)
        Called when a constant is read from the Metadata to put into the constant pool.
        Parameters:
        constantIndex - index inside the metadata that is used to reference from other places inside the recording.
        constant - actual value of the constant.
        eventTypeId - type id of the constant pool.
        Returns:
        actual value of the constant. Could be a new value to be replaced by.
      • constantReferenced

        default java.lang.Object constantReferenced​(java.lang.Object constant,
                                                    java.lang.String poolName,
                                                    java.lang.String eventTypeId)
        Called when a referenced constant is read from another constant pool or actual recording events.
        Parameters:
        constant - actual constant value.
        poolName - name of the constant pool.
        eventTypeId - type id if the event referencing the constant.
        Returns:
        actual value of the constant. Could be a new value to be replaced by.
      • constantResolved

        default java.lang.Object constantResolved​(java.lang.Object constant,
                                                  java.lang.String poolName,
                                                  java.lang.String eventTypeId)
        Called when a referenced constant is resolved from another pool or actual recording events.
        Parameters:
        constant - actual constant value.
        poolName - name of the constant pool.
        eventTypeId - type id if the event referencing the constant.
        Returns:
        actual value of the constant. Could be a new value to be replaced by.
      • allConstantPoolsResolved

        default void allConstantPoolsResolved​(java.util.Map<java.lang.String,​FastAccessNumberMap<java.lang.Object>> constantPools)
        Called when all constant pools are resolved.
        Parameters:
        constantPools - map of all constant pools by name.
      • eventsLoaded

        default void eventsLoaded()
        Called when all events are loaded (end of parsing)
      • getItemCollection

        default IItemCollection getItemCollection()
        Returns:
        collection of items built by the extension