All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.openqa.selenium.devtools.v90.profiler.model.TypeProfileEntry Maven / Gradle / Ivy

Go to download

Selenium automates browsers. That's it! What you do with that power is entirely up to you.

There is a newer version: 4.0.0-beta-4
Show newest version
package org.openqa.selenium.devtools.v90.profiler.model;

import org.openqa.selenium.Beta;
import org.openqa.selenium.json.JsonInput;

/**
 * Source offset and types for a parameter or return value.
 */
@org.openqa.selenium.Beta()
public class TypeProfileEntry {

    private final java.lang.Integer offset;

    private final java.util.List types;

    public TypeProfileEntry(java.lang.Integer offset, java.util.List types) {
        this.offset = java.util.Objects.requireNonNull(offset, "offset is required");
        this.types = java.util.Objects.requireNonNull(types, "types is required");
    }

    /**
     * Source offset of the parameter or end of function for return values.
     */
    public java.lang.Integer getOffset() {
        return offset;
    }

    /**
     * The types for this parameter or return value.
     */
    public java.util.List getTypes() {
        return types;
    }

    private static TypeProfileEntry fromJson(JsonInput input) {
        java.lang.Integer offset = 0;
        java.util.List types = null;
        input.beginObject();
        while (input.hasNext()) {
            switch(input.nextName()) {
                case "offset":
                    offset = input.nextNumber().intValue();
                    break;
                case "types":
                    types = input.read(new com.google.common.reflect.TypeToken>() {
                    }.getType());
                    break;
                default:
                    input.skipValue();
                    break;
            }
        }
        input.endObject();
        return new TypeProfileEntry(offset, types);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy