klyn.Object.toMap
method
public native toMap() as SortedMap<String, Object>
Description

Returns the object public state as a map.

The default implementation inspects the object reflection metadata to expose its registered public properties and fields.

Returns

A map view of the object state.

Example
class Point:
    public property x = 10
    public property y = 20

p = Point()
map = p.toMap()
print(map["x"])