public static interface Probe.ProbeListener
Probe
s: creating and tagging.Modifier and Type | Method and Description |
---|---|
void |
endASTProbing(Source source)
Notifies that the application of all registered
ASTProber s to a newly constructed
AST has completed. |
void |
newProbeInserted(Probe probe)
Notifies that a
Probe has been newly attached to an AST via
ProbeNode.Instrumentable.probe() . |
void |
probeTaggedAs(Probe probe,
SyntaxTag tag,
java.lang.Object tagValue)
Notifies that a
SyntaxTag has been newly added to the set of tags associated with
a Probe via Probe.tagAs(SyntaxTag, Object) . |
void |
startASTProbing(Source source)
Notifies that all registered
ASTProber s are about to be applied to a newly
constructed AST. |
void startASTProbing(Source source)
ASTProber
s are about to be applied to a newly
constructed AST.source
- source code from which the AST was constructedvoid newProbeInserted(Probe probe)
Probe
has been newly attached to an AST via
ProbeNode.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.
void probeTaggedAs(Probe probe, SyntaxTag tag, java.lang.Object tagValue)
SyntaxTag
has been newly added to the set of tags associated with
a Probe
via Probe.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
a Probe
.
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.
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.