java-bridge-0.20130606.3: Bindings to the JNI and a high level interface generator.

Portabilitynon-portable (TypeFamilies)
Stabilityexperimental
Maintainerjulian.fleischer@fu-berlin.de
Safe HaskellNone

Foreign.Java.Bindings.Support

Description

This module provides type classes and instances for supporting the high level bindings. This module should not be imported directly.

Synopsis

Documentation

class JBoolean a whereSource

Methods

toBoolean :: a -> Java BoolSource

Instances

class JChar a whereSource

Methods

toChar :: a -> Java Word16Source

class JByte a whereSource

Methods

toByte :: a -> Java Int8Source

Instances

class JShort a whereSource

Methods

toShort :: a -> Java Int16Source

class JInt a whereSource

Methods

toInt :: a -> Java Int32Source

class JFloat a whereSource

Methods

toFloat :: a -> Java FloatSource

class JDouble a whereSource

Methods

toDouble :: a -> Java DoubleSource

class Array a whereSource

class BooleanResult m whereSource

The result of a function call that is of type boolean.

class CharResult m whereSource

The result of a function call that is of type char.

class ByteResult m whereSource

The result of a function call that is of type byte.

class ShortResult m whereSource

The result of a function call that is of type short.

class IntResult m whereSource

The result of a function call that is of type int.

class LongResult m whereSource

The result of a function call that is of type long.

class FloatResult m whereSource

The result of a function call that is of type float.

class DoubleResult m whereSource

The result of a function call that is of type double.

class VoidResult m whereSource

The result of a function call that is of type void.

class JavaArray (ArrayResultType m) (ArrayResultComponent m) => ArrayResult m whereSource

An array result of a function call.

Associated Types

type ArrayResultType m Source

The JVM machine type of the components of the array.

type ArrayResultComponent m Source

The type of the component of the array as returned by the low level JNI call.

Methods

toArrayResult :: Either JThrowable (Maybe (JArray (ArrayResultType m))) -> Java mSource

Convert the array to a sophisticated type.

class ObjectResult m whereSource

The result of a function call that is of type object.

class InstanceOf a whereSource

A convenient alternative to isInstanceOf.

Minimal complete definition: coerce or whenInstanceOf.

Associated Types

type CoercedType a Source

Methods

instanceOf :: JavaObject o => o -> a -> Java BoolSource

Check if the object of type a is an instance of the type represented by b.

whenInstanceOf :: JavaObject o => o -> a -> (CoercedType a -> Java d) -> Java (Maybe d)Source

Check if the object of type a is an instance of the type c, represented by b. If so, it will coerce the object of type a and pass it to the given action.

If a was an instance of c (where c is represented by b) this function will return Just d, where d is the result of the optional computation. If not, Nothing is returned.

coerce :: JavaObject o => o -> a -> Java (Maybe (CoercedType a))Source

Coerces the given object of type a to an object of c, where c is represented by a value of type b. Returns Nothing if this is not possible.

class UnsafeCast a whereSource

For INTERNAL use only. Is however not in a hidden module, so that other libraries can link against it.

Methods

unsafeFromJObject :: JObject -> Java aSource

For INTERNAL use only. Do not use yourself.

registerCallbacks :: JClass -> Java BoolSource

Yepp. Register callbacks. Do it.