Interface IConstantPoolExtension
-
public interface IConstantPoolExtension
Interface for Flight Recorder constant pool extensions. Implementation are created byIParserExtension.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(Map<String,FastAccessNumberMap<Object>> constantPools)
Called when all constant pools are resolved.default Object
constantRead(long constantIndex, Object constant, String eventTypeId)
Called when a constant is read from the Metadata to put into the constant pool.default Object
constantReferenced(Object constant, String poolName, String eventTypeId)
Called when a referenced constant is read from another constant pool or actual recording events.default Object
constantResolved(Object constant, String poolName, 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 String
getId()
default IItemCollection
getItemCollection()
-
-
-
Method Detail
-
getId
default String getId()
- Returns:
- id of the extension, by default the simple class name. This id will be exposed in the
Map returned by
IParserStats.getConstantPoolExtensions()
-
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
-
-