Search in sources :

Example 1 with PropertyDescriptor

use of com.oracle.truffle.tools.chromeinspector.types.PropertyDescriptor in project graal by oracle.

the class TruffleRuntime method createPropertyJSON.

private JSONObject createPropertyJSON(DebugValue v, String defaultName) {
    PropertyDescriptor pd;
    RemoteObject rv = new RemoteObject(v, context.getErr());
    context.getRemoteObjectsHandler().register(rv);
    String name = v.getName();
    if (name == null && defaultName != null) {
        name = defaultName;
    }
    if (!v.isInternal()) {
        pd = new PropertyDescriptor(name, rv, v.isWritable(), null, null, true, true, null, true, null);
        return pd.toJSON();
    } else {
        InternalPropertyDescriptor ipd = new InternalPropertyDescriptor(name, rv);
        return ipd.toJSON();
    }
}
Also used : RemoteObject(com.oracle.truffle.tools.chromeinspector.types.RemoteObject) InternalPropertyDescriptor(com.oracle.truffle.tools.chromeinspector.types.InternalPropertyDescriptor) PropertyDescriptor(com.oracle.truffle.tools.chromeinspector.types.PropertyDescriptor) InternalPropertyDescriptor(com.oracle.truffle.tools.chromeinspector.types.InternalPropertyDescriptor)

Aggregations

InternalPropertyDescriptor (com.oracle.truffle.tools.chromeinspector.types.InternalPropertyDescriptor)1 PropertyDescriptor (com.oracle.truffle.tools.chromeinspector.types.PropertyDescriptor)1 RemoteObject (com.oracle.truffle.tools.chromeinspector.types.RemoteObject)1