Interface Probe.ProbeListener
- All Known Implementing Classes:
LineToProbesMap,LineToSourceSectionMap
- Enclosing class:
- Probe
public static interface Probe.ProbeListener
An observer of events related to
Probes: creating and tagging.-
Method Summary
Modifier and TypeMethodDescriptionvoidendASTProbing(Source source) Notifies that the application of all registeredASTProbers to a newly constructed AST has completed.voidnewProbeInserted(Probe probe) Notifies that aProbehas been newly attached to an AST viaProbeNode.Instrumentable.probe().voidprobeTaggedAs(Probe probe, SyntaxTag tag, Object tagValue) Notifies that aSyntaxTaghas been newly added to the set of tags associated with aProbeviaProbe.tagAs(SyntaxTag, Object).voidstartASTProbing(Source source) Notifies that all registeredASTProbers are about to be applied to a newly constructed AST.
-
Method Details
-
startASTProbing
Notifies that all registeredASTProbers are about to be applied to a newly constructed AST.- Parameters:
source- source code from which the AST was constructed
-
newProbeInserted
Notifies that aProbehas been newly attached to an AST viaProbeNode.Instrumentable.probe().There can be no more than one
Probeat 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 aSyntaxTaghas been newly added to the set of tags associated with aProbeviaProbe.tagAs(SyntaxTag, Object).The tags at a
Probeare 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 registeredASTProbers to a newly constructed AST has completed.- Parameters:
source- source code from which the AST was constructed
-