View Javadoc

1   package cz.cuni.amis.pogamut.base.communication.worldview.listener.annotation;
2   
3   import java.lang.annotation.ElementType;
4   import java.lang.annotation.Retention;
5   import java.lang.annotation.RetentionPolicy;
6   import java.lang.annotation.Target;
7   
8   import cz.cuni.amis.pogamut.base.communication.worldview.IWorldView;
9   import cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectEvent;
10  
11  /**
12   * Used by {@link AnnotationListenerRegistrator} to register level B listener 
13   * ({@link IWorldView#addObjectListener(Class, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectListener)} 
14   * for the annotated method. The annotated method must have 1 parameter of {@link IWorldObjectEvent}.
15   * <p><p>
16   * The listeners are created by calling {@link AnnotationListenerRegistrator#addListeners()} and removed by 
17   * calling {@link AnnotationListenerRegistrator#removeListeners()}.
18   * 
19   * @author Jimmy
20   */
21  @Target(value = { ElementType.METHOD })
22  @Retention(value = RetentionPolicy.RUNTIME)
23  public @interface ObjectClassListener {
24  	
25  	/**
26  	 * Object class you want to listen to. 
27  	 * @return
28  	 * @see IWorldView#addObjectListener(Class, cz.cuni.amis.pogamut.base.communication.worldview.object.IWorldObjectListener)
29  	 */
30  	Class<?> objectClass();
31  }