All Downloads are FREE. Search and download functionalities are using the official Maven repository.

arez.spy.ObserveStartEvent Maven / Gradle / Ivy

There is a newer version: 0.213
Show newest version
package arez.spy;

import java.util.Map;
import java.util.Objects;
import javax.annotation.Nonnull;

/**
 * Notification when Observer is about to call method being observed.
 */
public final class ObserveStartEvent
  implements SerializableEvent
{
  @Nonnull
  private final ObserverInfo _observer;

  public ObserveStartEvent( @Nonnull final ObserverInfo observer )
  {
    _observer = Objects.requireNonNull( observer );
  }

  @Nonnull
  public ObserverInfo getObserver()
  {
    return _observer;
  }

  @Override
  public void toMap( @Nonnull final Map map )
  {
    map.put( "type", "ObserveStart" );
    map.put( "name", getObserver().getName() );
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy