Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

Source code: javax/ide/extension/spi/ListenerInfo.java


1   package javax.ide.extension.spi;
2   
3   import javax.ide.util.MetaClass;
4   
5   /**
6    * Records information defining the listener class to be instantiated 
7    * when an event on the target object occurs.
8    * The information used to initialize this class comes from an 
9    * extension manifest editor-hook section.
10   */
11  public final class ListenerInfo 
12  {
13    private MetaClass _listenerClass;
14    private String    _sourceID;
15  
16    /**
17     * Constructor.
18     */
19    public ListenerInfo() 
20    {
21    }
22  
23    /**
24     * Get the listener class. An instance of this class will be created 
25     * when the source object needs to notify listeners of current events.
26     *
27     * @return The listener class {@link MetaClass}
28     */
29    public MetaClass getListenerClass()
30    {
31      return _listenerClass;
32    }
33  
34    /**
35     * Set the listener class. An instance of this class will be created 
36     * when the source object needs to notify listeners of current events.
37     *
38     * @param listenerClass The listener class.
39     */
40    public void setListenerClass( MetaClass listenerClass )
41    {
42      _listenerClass = listenerClass;
43    }
44  
45    /**
46     * Get the ID of the event source. 
47     *
48     * @return The source unique identifier.
49     */
50    public String getSourceID()
51    {
52      return _sourceID;
53    }
54  
55    /**
56     * Get the ID of the event source. 
57     *
58     * @param id The source unique identifier.
59     */
60    public void setSourceID( String id )
61    {
62      _sourceID = id;
63    }
64  }