public class OSXAdapter
extends java.lang.Object
implements java.lang.reflect.InvocationHandler
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
proxySignature |
protected java.lang.reflect.Method |
targetMethod |
protected java.lang.Object |
targetObject |
Modifier | Constructor and Description |
---|---|
protected |
OSXAdapter(java.lang.String proxySignature,
java.lang.Object target,
java.lang.reflect.Method handler) |
Modifier and Type | Method and Description |
---|---|
boolean |
callTarget(java.lang.Object appleEvent) |
java.lang.Object |
invoke(java.lang.Object proxy,
java.lang.reflect.Method method,
java.lang.Object[] args) |
protected boolean |
isCorrectMethod(java.lang.reflect.Method method,
java.lang.Object[] args) |
static void |
setAboutHandler(java.lang.Object target,
java.lang.reflect.Method aboutHandler) |
protected void |
setApplicationEventHandled(java.lang.Object event,
boolean handled) |
static void |
setFileHandler(java.lang.Object target,
java.lang.reflect.Method fileHandler) |
static void |
setHandler(OSXAdapter adapter) |
static void |
setPreferencesHandler(java.lang.Object target,
java.lang.reflect.Method prefsHandler) |
static void |
setQuitHandler(java.lang.Object target,
java.lang.reflect.Method quitHandler) |
protected java.lang.String proxySignature
protected java.lang.reflect.Method targetMethod
protected java.lang.Object targetObject
protected OSXAdapter(java.lang.String proxySignature, java.lang.Object target, java.lang.reflect.Method handler)
public boolean callTarget(java.lang.Object appleEvent) throws java.lang.reflect.InvocationTargetException, java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
java.lang.IllegalAccessException
public java.lang.Object invoke(java.lang.Object proxy, java.lang.reflect.Method method, java.lang.Object[] args) throws java.lang.Throwable
invoke
in interface java.lang.reflect.InvocationHandler
java.lang.Throwable
protected boolean isCorrectMethod(java.lang.reflect.Method method, java.lang.Object[] args)
public static void setAboutHandler(java.lang.Object target, java.lang.reflect.Method aboutHandler)
protected void setApplicationEventHandled(java.lang.Object event, boolean handled)
public static void setFileHandler(java.lang.Object target, java.lang.reflect.Method fileHandler)
public static void setHandler(OSXAdapter adapter)
public static void setPreferencesHandler(java.lang.Object target, java.lang.reflect.Method prefsHandler)
public static void setQuitHandler(java.lang.Object target, java.lang.reflect.Method quitHandler)