Interface ExecutionEventNodeFactory


public interface ExecutionEventNodeFactory
Event node factories are factories of event nodes for a program location. The factory might be invoked multiple times for one and the same source location but the location does never change for a particular returned event node.

For example it makes sense to register a performance counter on create(EventContext) and increment the counter in the ExecutionEventNode implementation. The counter can be stored as a compilation final, so no peak performance overhead persists for looking up the counter on the fast path.

Since:
0.12
  • Method Details

    • create

      Returns a new instance of ExecutionEventNode for this particular source location. This method might be invoked multiple times for one particular source location context. The implementation must ensure that this is handled accordingly.
      Parameters:
      context - the current context where this event node should get created.
      Returns:
      a new event node instance, or null for no event node at the location
      Since:
      0.12