-"Deserializes a value from a byte array."
-deserialize :: Serializable a => ByteArray -> a
-deserialize ba = deserialize_ (serializerOf binding) ba
-
-// ByteArray
-
-importJava "java.util.Arrays" where
- @private
- @JavaName toString
- byteArrayToString :: ByteArray -> String
-
-instance Show ByteArray where
- show = byteArrayToString
-
-importJava "org.simantics.databoard.binding.mutable.Variant" where
- // data Variant (in Builtins)
- @JavaName getValue
- rawVariantValue :: Variant -> a
- @JavaName ofInstance
- variantOf :: a -> Variant\r
- @JavaName "<init>"
- variantOfWithBinding :: Binding a -> a -> Variant\r
- @JavaName getValue
- variantValue_ :: Variant -> Binding a -> a
- @JavaName toString
- showVariant :: Variant -> String
-
- @JavaName getComponent
- variantComponent :: Variant -> ChildReference -> Variant
-
-variantValue :: Serializable a => Variant -> a
-variantValue v = variantValue_ v binding
-
-instance Show Variant where
- show = showVariant
-
-variantElement :: Serializable a => Variant -> Integer -> a
-variantElement v i = variantValue (variantComponent v (indexReference i))
-
-importJava "org.simantics.databoard.accessor.reference.ChildReference" where
- data ChildReference
-
- @JavaName compile
- compileReference :: [ChildReference] -> ChildReference
-
-importJava "org.simantics.databoard.accessor.reference.IndexReference" where
- @JavaName "<init>"
- indexReference :: Integer -> ChildReference
-
-importJava "org.simantics.databoard.accessor.reference.KeyReference" where
- @JavaName "<init>"
- keyReference :: Variant -> ChildReference
-
-importJava "org.simantics.databoard.accessor.reference.NameReference" where
- @JavaName "<init>"
- nameReference :: String -> ChildReference
-
-importJava "org.simantics.databoard.accessor.reference.LabelReference" where
- @JavaName "<init>"
- labelReference :: String -> ChildReference
-