Using Ceylon from Java

61 views
Skip to first unread message

Evgeniy Martin

unread,
Dec 20, 2016, 10:56:11 AM12/20/16
to ceylon-users
Hi All,

I have some code in Ceylon lang:

top level method:

shared T deserialize
<T>(
   
String encoded,
   
SerializationType type
) given T satisfies Object { ...}

and abstract class with objects:

shared
abstract class SerializationType() of base64|json|xml|jsonReadOnly|xmlReadOnly| ceylonJson {}
shared
object xml extends SerializationType() {}
shared
object json extends SerializationType() {}
shared
object ceylonJson extends SerializationType() {}
shared
object jsonReadOnly extends SerializationType() {}
shared
object xmlReadOnly extends SerializationType() {}
shared
object base64 extends SerializationType() {}

how can I call this code in Java?

for example:

SerializationType
_xml = new xml();
SomeType x = deserialize_.deserialize(_xml, someEncodedText);

but I can not do so.


Evgeniy Martin

unread,
Dec 21, 2016, 6:05:54 AM12/21/16
to ceylon-users
so i use another class who delegete this Ceylon code and which i can use in java

вторник, 20 декабря 2016 г., 18:56:11 UTC+3 пользователь Evgeniy Martin написал:
Reply all
Reply to author
Forward
0 new messages