Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Licensed to the Software Freedom Conservancy (SFC) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The SFC licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.openqa.selenium.bidi.script;
import static java.util.Collections.unmodifiableMap;
import java.io.StringReader;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.TreeMap;
import org.openqa.selenium.json.Json;
import org.openqa.selenium.json.JsonInput;
import org.openqa.selenium.json.TypeToken;
public class RemoteValue {
private enum Type {
UNDEFINED("undefined"),
NULL("null"),
STRING("string"),
NUMBER("number"),
SPECIAL_NUMBER("number"),
BOOLEAN("boolean"),
BIGINT("bigint"),
ARRAY("array"),
DATE("date"),
MAP("map"),
OBJECT("object"),
REGULAR_EXPRESSION("regexp"),
SET("set"),
SYMBOL("symbol"),
FUNCTION("function"),
WEAK_MAP("weakmap"),
WEAK_SET("weakset"),
ITERATOR("iterator"),
GENERATOR("generator"),
ERROR("error"),
PROXY("proxy"),
PROMISE("promise"),
TYPED_ARRAY("typedarray"),
ARRAY_BUFFER("arraybuffer"),
NODE_LIST("nodelist"),
HTML_COLLECTION("htmlcollection"),
NODE("node"),
WINDOW("window");
private final String type;
Type(String type) {
this.type = type;
}
@Override
public String toString() {
return type;
}
public static Type findByName(String name) {
Type result = null;
for (Type type : values()) {
if (type.toString().equalsIgnoreCase(name)) {
result = type;
break;
}
}
return result;
}
}
private static final Json JSON = new Json();
private final Type type;
private final Optional handle;
private final Optional internalId;
private final Optional