Package org.projog.core.event
Class SpyPoints
- java.lang.Object
-
- org.projog.core.event.SpyPoints
-
public final class SpyPoints extends java.lang.ObjectCollection of spy points.Spy points are useful in the debugging of Prolog programs. When a spy point is set on a predicate a
SpyPoints.SpyPointEventis generated every time the predicate is executed, fails or succeeds.Each
KnowledgeBasehas a single uniqueSpyPointsinstance.- See Also:
KnowledgeBase.getSpyPoints()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description classSpyPoints.SpyPointclassSpyPoints.SpyPointEventclassSpyPoints.SpyPointExitEvent
-
Field Summary
Fields Modifier and Type Field Description private KnowledgeBasekbprivate java.lang.Objectlockprivate ProjogListenersprojogListenersprivate java.util.Map<PredicateKey,SpyPoints.SpyPoint>spyPointsprivate TermFormattertermFormatterprivate booleantraceEnabled
-
Constructor Summary
Constructors Constructor Description SpyPoints(ProjogListeners observable, TermFormatter termFormatter)SpyPoints(KnowledgeBase kb)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private SpyPoints.SpyPointcreateNewSpyPoint(PredicateKey key)SpyPoints.SpyPointgetSpyPoint(PredicateKey key)java.util.Map<PredicateKey,SpyPoints.SpyPoint>getSpyPoints()voidsetSpyPoint(PredicateKey key, boolean set)voidsetTraceEnabled(boolean traceEnabled)
-
-
-
Field Detail
-
lock
private final java.lang.Object lock
-
spyPoints
private final java.util.Map<PredicateKey,SpyPoints.SpyPoint> spyPoints
-
kb
private final KnowledgeBase kb
-
projogListeners
private final ProjogListeners projogListeners
-
termFormatter
private final TermFormatter termFormatter
-
traceEnabled
private boolean traceEnabled
-
-
Constructor Detail
-
SpyPoints
public SpyPoints(KnowledgeBase kb)
-
SpyPoints
public SpyPoints(ProjogListeners observable, TermFormatter termFormatter)
-
-
Method Detail
-
setTraceEnabled
public void setTraceEnabled(boolean traceEnabled)
-
setSpyPoint
public void setSpyPoint(PredicateKey key, boolean set)
-
getSpyPoint
public SpyPoints.SpyPoint getSpyPoint(PredicateKey key)
-
createNewSpyPoint
private SpyPoints.SpyPoint createNewSpyPoint(PredicateKey key)
-
getSpyPoints
public java.util.Map<PredicateKey,SpyPoints.SpyPoint> getSpyPoints()
-
-