Interface Probe.ProbeListener
- All Known Implementing Classes:
LineToProbesMap
,LineToSourceSectionMap
- Enclosing class:
- Probe
public static interface Probe.ProbeListener
An observer of events related to
Probe
s: creating and tagging.-
Method Summary
Modifier and TypeMethodDescriptionvoid
endASTProbing
(Source source) Notifies that the application of all registeredASTProber
s to a newly constructed AST has completed.void
newProbeInserted
(Probe probe) Notifies that aProbe
has been newly attached to an AST viaProbeNode.Instrumentable.probe()
.void
probeTaggedAs
(Probe probe, SyntaxTag tag, Object tagValue) Notifies that aSyntaxTag
has been newly added to the set of tags associated with aProbe
viaProbe.tagAs(SyntaxTag, Object)
.void
startASTProbing
(Source source) Notifies that all registeredASTProber
s are about to be applied to a newly constructed AST.
-
Method Details
-
startASTProbing
Notifies that all registeredASTProber
s are about to be applied to a newly constructed AST.- Parameters:
source
- source code from which the AST was constructed
-
newProbeInserted
Notifies that aProbe
has been newly attached to an AST viaProbeNode.Instrumentable.probe()
.There can be no more than one
Probe
at a node; this notification will only be delivered the first time probe() is called at a particular AST node. There will also be no notification when the AST to which the Probe is attached is cloned. -
probeTaggedAs
Notifies that aSyntaxTag
has been newly added to the set of tags associated with aProbe
viaProbe.tagAs(SyntaxTag, Object)
.The tags at a
Probe
are a set; this notification will only be delivered the first time a particular tag is added at aProbe
.An optional value supplied with tagAs(SyntaxTag, Object) is reported to all listeners, but not stored. As a consequence, the optional value will have no effect at all if the tag had already been added.
- Parameters:
probe
- where a tag has been addedtag
- the tag that has been newly added (subsequent additions of the tag are unreported).tagValue
- an optional value associated with the tag for the purposes of reporting.
-
endASTProbing
Notifies that the application of all registeredASTProber
s to a newly constructed AST has completed.- Parameters:
source
- source code from which the AST was constructed
-