Enum TypeProp

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<TypeProp>

    public enum TypeProp
    extends java.lang.Enum<TypeProp>
    Enumerates the limited set of values that the Chrome DevTools Protocol may assign to the "type" property of its schema definitions. While the protocol data itself is exchanged as JSON over WebSockets, these values are automatically bound into their corresponding Java types by this library, allowing end-users to work with ordinary Java objects rather than raw JSON.


    • Enum Constant Summary

       
      'type' Property Value: This JsonObject is Declaring a Simple Type
      Enum Constant Description
      BOOLEAN
      Denotes a protocol value that binds to a Java boolean.
      INTEGER
      Denotes a protocol value that binds to a Java int-based numeric type.
      NUMBER
      Denotes a protocol value that binds to a Java double-based numeric type.
      STRING
      Denotes a protocol value that binds to a Java String.
       
      'type' Property Value: This JsonObject is Defining a Java-API Array or Object
      Enum Constant Description
      ARRAY
      Denotes a protocol value that binds to a sequential Java List-like array.
      OBJECT
      Denotes a protocol value that binds to a structured Java Object.
       
      'type' Property Value: JsonObject Will Be Converted to a Raw & Un-processed JsonObject Return
      Enum Constant Description
      ANY
      API values described as "Any" are returned to the user as raw JsonObject.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Class<?> arrayCTAS
      The "Computed Type as a String" when the CDP API has specified that an "array of" a certain type shall be used.
      Class<?> boxedCTAS
      The "Computed Type as a String" which is required whenever the CDP API specifies that a method-parameter, class-field or return-value is "optional." This allows a 'null' to be assigned to such a field, parameter or return-value when the browser has left such information off.
      Class<?> primCTAS
      The "Computed Type, as a String" that is used whenever a property, parameter or return-value is NOT declared OPTIONAL.
    • Method Summary

       
      Convert String to Enum Constant
      Modifier and Type Method Description
      static TypeProp valueOf​(String name)
      Returns the enum constant of this type with the specified name.
       
      List all Enum Constants
      Modifier and Type Method Description
      static TypeProp[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • OBJECT

        🡇     🗕  🗗  🗖
        public static final TypeProp OBJECT
        Denotes a protocol value that binds to a structured Java Object. When a CDP Type is declared to be OBJECT, a JsonArray whose property name is 'properties' will be included that lists the type's various fields.
      • ARRAY

        🡅  🡇     🗕  🗗  🗖
        public static final TypeProp ARRAY
        Denotes a protocol value that binds to a sequential Java List-like array. Whenever a CDP Type or an Event is declared as an array, there will be a corresponding 'items' property which declares the array's component type. (What the array's contents are going to be).
      • ANY

        🡅  🡇     🗕  🗗  🗖
        public static final TypeProp ANY
        API values described as "Any" are returned to the user as raw JsonObject. Whenever a PPR (property, parameter or return-value) is declared to be of type "Any", the corresponding method-parameter, class-field or return-value shall be declared to be of type JsonValue.

        In such cases, the actual raw JSON returned by the browser is passed on to the user.
    • Field Detail

      • primCTAS

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.Class<?> primCTAS
        The "Computed Type, as a String" that is used whenever a property, parameter or return-value is NOT declared OPTIONAL.

        Java's "Boxed Types" are used whenever the CDP API specifies that a method-parameter, class-field or return-value is "optional." In Java-HTML, in such cases, the the field, parameter or value is assigned null when Chrome or the Browser have elided or "left off" the value of a parameter, field or return-value.
        Code:
        Exact Field Declaration Expression:
         public final Class<?> primCTAS;
        
      • boxedCTAS

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.Class<?> boxedCTAS
        The "Computed Type as a String" which is required whenever the CDP API specifies that a method-parameter, class-field or return-value is "optional." This allows a 'null' to be assigned to such a field, parameter or return-value when the browser has left such information off.
        Code:
        Exact Field Declaration Expression:
         public final Class<?> boxedCTAS;
        
      • arrayCTAS

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.Class<?> arrayCTAS
        The "Computed Type as a String" when the CDP API has specified that an "array of" a certain type shall be used. Note that array's are already 'nullable', and as such, there is no need whatsoever to used a "Array of Boxed Types."

        It is the case that the Browser could "elide" (leave off) the entire array when returning a value, or specifying an Event-Type's field-values. In that case, the array would simply be assigned 'null.' There is no need to actually allow the individual array element's to accept Boxed-Type 'null' values.
        Code:
        Exact Field Declaration Expression:
         public final Class<?> arrayCTAS;
        
    • Method Detail

      • values

        🡅  🡇     🗕  🗗  🗖
        public static TypeProp[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (TypeProp c : TypeProp.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        🡅     🗕  🗗  🗖
        public static TypeProp valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null