Safe Haskell | None |
---|---|
Language | Haskell2010 |
Internal functions to invoke JNI methods
The functions in this module avoid using
Coercible
so they can be reused in interfaces which
use other ways to convert between Haskell and Java values.
Synopsis
- newJ :: forall sym ty. (ty ~ 'Class sym, SingI ty) => [SomeSing JType] -> [JValue] -> IO (J ty)
- callToJValue :: forall ty1 k. (IsReferenceType ty1, SingI ty1) => Sing (k :: JType) -> J ty1 -> String -> [SomeSing JType] -> [JValue] -> IO JValue
- callStaticToJValue :: Sing (k :: JType) -> String -> String -> [SomeSing JType] -> [JValue] -> IO JValue
- getStaticFieldAsJValue :: Sing (ty :: JType) -> String -> String -> IO JValue
- getClass :: IsReferenceType ty => Sing (ty :: JType) -> IO JClass
- setGetClassFunction :: (forall ty. IsReferenceType ty => Sing (ty :: JType) -> IO JClass) -> IO ()
Documentation
:: forall sym ty. (ty ~ 'Class sym, SingI ty) | |
=> [SomeSing JType] | Singletons of argument types |
-> [JValue] | |
-> IO (J ty) |
:: forall ty1 k. (IsReferenceType ty1, SingI ty1) | |
=> Sing (k :: JType) | |
-> J ty1 | Any object |
-> String | Method name |
-> [SomeSing JType] | Singletons of argument types |
-> [JValue] | Arguments |
-> IO JValue |
:: Sing (k :: JType) | |
-> String | Class name |
-> String | Method name |
-> [SomeSing JType] | Singletons of argument types |
-> [JValue] | Arguments |
-> IO JValue |
getStaticFieldAsJValue Source #
:: Sing (ty :: JType) | |
-> String | Class name |
-> String | Static field name |
-> IO JValue |
getClass :: IsReferenceType ty => Sing (ty :: JType) -> IO JClass Source #
Yields a class referece. It behaves as findClass
unless
setGetClassFunction
is used.
setGetClassFunction :: (forall ty. IsReferenceType ty => Sing (ty :: JType) -> IO JClass) -> IO () Source #
Sets the function to use for loading classes.
findClass
is used by default.