|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfacets.util.Tracer
facets.core.superficial.TargeterCore
public class TargeterCore
Implements STargeter
.
TargeterCore
is a public implementation of STargeter
to provide for extension in other packages; instances are generally
created by an implementation of TargetCore.newTargeter()
.
Nested Class Summary | |
---|---|
static interface |
TargeterCore.TargetType
Marks the effective type of a dynamically constructed targeter tree. |
Nested classes/interfaces inherited from interface facets.core.superficial.Notifying |
---|
Notifying.Impact |
Field Summary | |
---|---|
static int |
targeters
|
java.lang.Class |
targetType
|
Constructor Summary | |
---|---|
TargeterCore(TargeterCore.TargetType target)
Construct a TargeterCore to match target . |
Method Summary | |
---|---|
void |
attachFacet(SFacet facet)
Adds facet to a list of facets to be updated during retargetFacets . |
protected boolean |
blockNotification()
Enables notification to be restricted to this member of the tree. |
STargeter[] |
elements()
Dynamically-defined children. |
java.lang.Object |
identity()
Return an object that is as far as possible unique for the implementation. |
Notifying.Impact |
impact()
Allows this Notifying to specify a default Notifying.Impact . |
Notifiable |
monitor()
The current Notifiable in the notification tree,
as set with setMonitor . |
protected TypedNode[] |
newDebugChildren()
Create a TypedNode[] representation of this Notifying
for debug purposes. |
protected static TypedNode |
newDebugContentNode(java.lang.String title,
java.lang.Object source)
|
protected static TypedNode |
newDebugContentNode(java.lang.String title,
java.lang.Object[] source)
|
protected static TypedNode |
newDebugMonitorNode(Notifiable monitor)
|
TypedNode |
newGraphNode()
Returns a descriptive node for use in debug object graph. |
static STargeter |
newRetargeted(TargetCore target,
boolean live)
|
void |
notify(Notice notice)
Respond to the Notice passed. |
void |
notifyMonitor(Notifying.Impact impact)
Call notify on the parent monitor in the notification tree,
typically with itself as parameter to the Notice passed. |
void |
retarget(STarget target,
Notifying.Impact impact)
Sets the target of the STargeter
and those of any elements or other STargeter members. |
void |
retargetFacets(Notifying.Impact impact)
Updates all facets attached with STargeter.attachFacet(SFacet) and those of any child
STargeter.elements() . |
void |
setMonitor(Notifiable monitor)
Attach the Notifying to a Notifiable parent
in the notification tree. |
STarget |
target()
The current target in the application. |
java.lang.String |
title()
Return human-readable identifying text. |
java.lang.String |
toString()
|
static STargeter[] |
treeItems(STargeter root)
|
Methods inherited from class facets.util.Tracer |
---|
trace, trace, trace, trace, trace, traceDebug, traceDebug, traceObjectText, traceOutput, traceOutputWithClass |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface facets.core.superficial.Notifying |
---|
impact, monitor, notifyMonitor, setMonitor |
Methods inherited from interface facets.core.superficial.Notifiable |
---|
notify |
Field Detail |
---|
public static int targeters
public final java.lang.Class targetType
Constructor Detail |
---|
public TargeterCore(TargeterCore.TargetType target)
TargeterCore
to match target
.
The target is usually a STarget
, but may be any
implementor of TargeterCore.TargetType
.
target
- provides the class set as targetType
.Method Detail |
---|
public void retargetFacets(Notifying.Impact impact)
STargeter
STargeter.attachFacet(SFacet)
and those of any child
STargeter.elements()
.
Application code need never call this method directly; it is called on the surface root targeter after retargeting following notification, and then recursively through the targeter tree.
retargetFacets
in interface Facetable
retargetFacets
in interface STargeter
public final void attachFacet(SFacet facet)
STargeter
facet
to a list of facets to be updated during retargetFacets
.
attachFacet
in interface Facetable
attachFacet
in interface STargeter
facet
- will be applied during each retargeting sequencepublic void retarget(STarget target, Notifying.Impact impact)
STargeter
target
of the STargeter
and those of any elements
or other STargeter
members.
Also sets the STargeter
as notification monitor of
its STargeter
members and of its target.
retarget
in interface SRetargetable
retarget
in interface STargeter
Notifying
public final STargeter[] elements()
STargeter
Return any children created dynamically during initial retargeting to
correspond with the child elements
of target
.
elements
in interface STargeter
public final STarget target()
SRetargetable
This will be the last STarget
set with retarget
.
target
in interface SRetargetable
public final java.lang.String title()
Titled
title
in interface Titled
null
, non-empty string with no structural whitespacepublic java.lang.String toString()
protected TypedNode[] newDebugChildren()
TypedNode[]
representation of this Notifying
for debug purposes.
public static STargeter[] treeItems(STargeter root)
public static STargeter newRetargeted(TargetCore target, boolean live)
protected static final TypedNode newDebugContentNode(java.lang.String title, java.lang.Object source)
protected static final TypedNode newDebugContentNode(java.lang.String title, java.lang.Object[] source)
protected static final TypedNode newDebugMonitorNode(Notifiable monitor)
public final TypedNode newGraphNode()
public Notifying.Impact impact()
Notifying
Notifying
to specify a default Notifying.Impact
.
impact
in interface Notifying
Notifying.Impact.DEFAULT
public java.lang.Object identity()
Identified
This will usually be a class instance counter.
identity
in interface Identified
public final Notifiable monitor()
Notifiable
in the notification tree,
as set with setMonitor
.
Complains if no parent has been set.
monitor
in interface Notifying
public void notify(Notice notice)
Notifiable
Notice
passed.
When this method is called, the Notifiable
should
respond based on
Notice
passed.
notify
in interface Notifiable
public final void notifyMonitor(Notifying.Impact impact)
Notifying
notify
on the parent monitor in the notification tree,
typically with itself as parameter to the Notice
passed.
Has no effect if no monitor has been set.
This is the usual means to trigger a surface retargeting, being called
by an exposing SFacet
on its target.
notifyMonitor
in interface Notifying
impact
- suggests the level of retargeting requiredprotected boolean blockNotification()
Checked by notify(Notice)
; default returns false
.
public final void setMonitor(Notifiable monitor)
Notifying
Notifying
to a Notifiable
parent
in the notification tree.
setMonitor
in interface Notifying
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |