public interface ExecutionEventNodeFactory
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 ExecutionEventNodeFactory.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.
Modifier and Type | Method and Description |
---|---|
ExecutionEventNode |
create(EventContext context)
Returns a new instance of
ExecutionEventNode for this particular source location. |
ExecutionEventNode create(EventContext context)
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.context
- the current context where this event node should get created.null
for no event node at the location