Package apple.dts.samplecode.osxadapter

# Class OSXAdapter

java.lang.Object
apple.dts.samplecode.osxadapter.OSXAdapter

All Implemented Interfaces:
  `InvocationHandler`

public class OSXAdapter extends Object implements InvocationHandler

## Field Summary

Fields
Modifier and Type
Field
Description
`protected String`
`proxySignature`
`protected Method`
`targetMethod`
`protected Object`
`targetObject`

## Constructor Summary

Constructors
Modifier
Constructor
Description
`protected`
`OSXAdapter(String proxySignature, Object target, Method handler)`

## Method Summary

Modifier and Type
Method
Description
`boolean`
`callTarget(Object appleEvent)`
`Object`
`invoke(Object proxy, Method method, Object[] args)`
`protected boolean`
`isCorrectMethod(Method method, Object[] args)`
`static void`
`setAboutHandler(Object target, Method aboutHandler)`
`protected void`
`setApplicationEventHandled(Object event, boolean handled)`
`static void`
`setFileHandler(Object target, Method fileHandler)`
`static void`
`setHandler(OSXAdapter adapter)`
`static void`
`setPreferencesHandler(Object target, Method prefsHandler)`
`static void`
`setQuitHandler(Object target, Method quitHandler)`

### Methods inherited from class java.lang.Object

`clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### targetObject

protected Object targetObject

### targetMethod

protected Method targetMethod

### proxySignature

protected String proxySignature

## Constructor Details

### OSXAdapter

protected OSXAdapter(String proxySignature, Object target, Method handler)

## Method Details

### setQuitHandler

public static void setQuitHandler(Object target, Method quitHandler)

### setAboutHandler

public static void setAboutHandler(Object target, Method aboutHandler)

### setPreferencesHandler

public static void setPreferencesHandler(Object target, Method prefsHandler)

### setFileHandler

public static void setFileHandler(Object target, Method fileHandler)

### setHandler

public static void setHandler(OSXAdapter adapter)

### callTarget

public boolean callTarget(Object appleEvent) throws InvocationTargetException, IllegalAccessException

Throws:
  `InvocationTargetException`
  `IllegalAccessException`

### invoke

public Object invoke(Object proxy, Method method, Object[] args) throws Throwable

Specified by:
  `invoke` in interface `InvocationHandler`
Throws:
  `Throwable`

### isCorrectMethod

protected boolean isCorrectMethod(Method method, Object[] args)

### setApplicationEventHandled

protected void setApplicationEventHandled(Object event, boolean handled)