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 Detail

      • constantRead

        default Object constantRead​(long constantIndex,
                                    Object constant,
                                    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 Object constantReferenced​(Object constant,
                                          String poolName,
                                          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 Object constantResolved​(Object constant,
                                        String poolName,
                                        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​(Map<String,​FastAccessNumberMap<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