Interface JSConvertable
- All Known Implementing Classes:
JSCollection,JSFunction,JSObject,JSPrimitive
public interface JSConvertable
The JSConvertable interface defines a method for converting an object to its JavaScript representation.
Classes implementing this interface must provide an implementation for the
toJS() method.- Author:
- Alexey Glazyrin
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final JSConvertableA predefined instance of JSConvertable representing the JavaScript `null` value.static final JSConvertableA predefined instance of JSConvertable representing the JavaScript `undefined` value. -
Method Summary
-
Field Details
-
UNDEFINED
A predefined instance of JSConvertable representing the JavaScript `undefined` value. -
NULL
A predefined instance of JSConvertable representing the JavaScript `null` value.
-
-
Method Details
-
toJS
String toJS()Converts the object to a JavaScript string representation.- Returns:
- the JavaScript representation of the object
-