edu.umd.cs.piccolox.event
Class PNotificationCenter.NotificationTarget

java.lang.Object
  extended by java.lang.ref.Reference
      extended by java.lang.ref.WeakReference
          extended by edu.umd.cs.piccolox.event.PNotificationCenter.NotificationTarget
Enclosing class:
PNotificationCenter

protected static class PNotificationCenter.NotificationTarget
extends WeakReference

A NotificationTarget is a method on a particular object that can be invoked.


Field Summary
protected  int hashCode
          Cached hashcode value computed at construction time.
protected  Method method
          Method to be invoked on the object.
 
Constructor Summary
PNotificationCenter.NotificationTarget(Object object, Method method)
          Creates a notification target representing the method on the particular object provided.
 
Method Summary
 boolean equals(Object object)
          Returns true if this object is logically equivalent to the one passed in.
 Method getMethod()
          Returns the method that will be invoked on the listener object.
 int hashCode()
          Returns hash code for this notification target.
 String toString()
          Returns a string representation of this NotificationTarget for debugging purposes.
 
Methods inherited from class java.lang.ref.Reference
clear, enqueue, get, isEnqueued
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

hashCode

protected int hashCode
Cached hashcode value computed at construction time.


method

protected Method method
Method to be invoked on the object.

Constructor Detail

PNotificationCenter.NotificationTarget

public PNotificationCenter.NotificationTarget(Object object,
                                              Method method)
Creates a notification target representing the method on the particular object provided.

Parameters:
object - object on which method can be invoked
method - method to be invoked
Method Detail

getMethod

public Method getMethod()
Returns the method that will be invoked on the listener object.

Returns:
method to be invoked with notification is to be dispatched

hashCode

public int hashCode()
Returns hash code for this notification target.

Overrides:
hashCode in class Object
Returns:
hash code

equals

public boolean equals(Object object)
Returns true if this object is logically equivalent to the one passed in. For this to happen they must have the same method and object.

Overrides:
equals in class Object
Parameters:
object - object being tested for logical equivalency to this one
Returns:
true if logically equivalent

toString

public String toString()
Returns a string representation of this NotificationTarget for debugging purposes.

Overrides:
toString in class Object
Returns:
string representation


Copyright © 1995-2010 Piccolo2D. All Rights Reserved.