Interface IConstantPoolExtension
-
public interface IConstantPoolExtensionInterface 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 voidallConstantPoolsResolved(java.util.Map<java.lang.String,FastAccessNumberMap<java.lang.Object>> constantPools)Called when all constant pools are resolved.default java.lang.ObjectconstantRead(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.ObjectconstantReferenced(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.ObjectconstantResolved(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 voideventsLoaded()Called when all events are loaded (end of parsing)default java.lang.StringgetId()default IItemCollectiongetItemCollection()
-
-
-
Method Detail
-
getId
default java.lang.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 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
-
-