List of usage examples for java.lang Runtime.RemoteObject getClass
@HotSpotIntrinsicCandidate public final native Class<?> getClass();
From source file:com.facebook.stetho.inspector.protocol.module.DOM.java
@ChromeDevtoolsMethod public ResolveNodeResponse resolveNode(JsonRpcPeer peer, JSONObject params) throws JsonRpcException { ResolveNodeRequest request = mObjectMapper.convertValue(params, ResolveNodeRequest.class); Object object = mObjectIdMapper.getObjectForId(request.nodeId); int mappedObjectId = Runtime.mapObject(peer, object); Runtime.RemoteObject remoteObject = new Runtime.RemoteObject(); remoteObject.type = Runtime.ObjectType.OBJECT; remoteObject.subtype = Runtime.ObjectSubType.NODE; remoteObject.className = remoteObject.getClass().getName(); remoteObject.value = null; // not a primitive remoteObject.description = null; // not sure what this does... remoteObject.objectId = String.valueOf(mappedObjectId); ResolveNodeResponse response = new ResolveNodeResponse(); response.object = remoteObject;/*from w ww . j a v a2s . c o m*/ return response; }