sears.tools.eawt
Class ApplicationListenerHandler

java.lang.Object
  extended by sears.tools.eawt.ApplicationListenerHandler
All Implemented Interfaces:
java.lang.reflect.InvocationHandler

public class ApplicationListenerHandler
extends java.lang.Object
implements java.lang.reflect.InvocationHandler

Handler for communicate with com.apple.eawt.ApplicationListener class


Constructor Summary
ApplicationListenerHandler(ApplicationListener listener)
          Construct a new handler
 
Method Summary
 java.lang.Class getApplicationListenerInterface()
          return the class object which represents com.apple.eawt.ApplicationListener class
static java.util.EventListener getWrappedApplicationListenerInstance(ApplicationListener listener)
          this method returns an instance of com.apple.eawt.ApplicationListener interface,
wrapped by EventListener interface...
 java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ApplicationListenerHandler

public ApplicationListenerHandler(ApplicationListener listener)
Construct a new handler

Parameters:
listener - an instance of ApplicationListener subclass
Method Detail

getApplicationListenerInterface

public java.lang.Class getApplicationListenerInterface()
return the class object which represents com.apple.eawt.ApplicationListener class

Returns:
com.apple.eawt.ApplicationListener 'Class object'

invoke

public java.lang.Object invoke(java.lang.Object proxy,
                               java.lang.reflect.Method method,
                               java.lang.Object[] args)
                        throws java.lang.Throwable
Specified by:
invoke in interface java.lang.reflect.InvocationHandler
Throws:
java.lang.Throwable

getWrappedApplicationListenerInstance

public static java.util.EventListener getWrappedApplicationListenerInstance(ApplicationListener listener)
this method returns an instance of com.apple.eawt.ApplicationListener interface,
wrapped by EventListener interface...

Parameters:
listener - will be an instance of the Application listener implementation class
Returns:
an instance of com.apple.eawt.ApplicationListener, null if...