001 package edu.rice.cs.cunit.record.syncPoints.object;
002
003 import edu.rice.cs.cunit.record.graph.LockInfo;
004 import edu.rice.cs.cunit.record.graph.ThreadInfo;
005 import edu.rice.cs.cunit.record.syncPoints.ISyncPointVisitor;
006 import edu.rice.cs.cunit.instrumentors.DoNotInstrument;
007
008 /**
009 * Synchronization point corresponding to an Object.notify call.
010 *
011 * @author Mathias Ricken
012 */
013 @DoNotInstrument
014 public class ObjectNotifySyncPoint extends AObjectSyncPoint {
015 /**
016 * Constructor for this synchronization point.
017 * @param object object whose notify method was called.
018 * @param thread current thread
019 */
020 public ObjectNotifySyncPoint(Object object, Thread thread) {
021 super(object, thread);
022 }
023
024 /**
025 * Class for translated versions on the monitor side.
026 */
027 public static class Translated extends AObjectSyncPoint.Translated {
028 /**
029 * Constructor for translated version on the monitor side.
030 * @param object info about the object
031 * @param thread info about the current thread
032 */
033 public Translated(LockInfo object, ThreadInfo thread) {
034 super(object, thread);
035 }
036
037 /**
038 * Executes a visitor.
039 *
040 * @param visitor visitor to execute
041 * @param param visitor-specific parameter
042 *
043 * @return visitor-specific return value
044 */
045 public <R,P> R execute(ISyncPointVisitor<R, P> visitor, P param) {
046 return visitor.objectNotifyCase(this, param);
047 }
048 }
049 }