Package Torello.Browser.JsonAST
Enum TypeProp
- java.lang.Object
-
- java.lang.Enum<TypeProp>
-
- Torello.Browser.JsonAST.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.
Hi-Lited Source-Code:- View Here: Torello/Browser/JsonAST/TypeProp.java
- Open New Browser-Tab: Torello/Browser/JsonAST/TypeProp.java
File Size: 5,023 Bytes Line Count: 117 '\n' Characters Found
-
-
Enum Constant Summary
'type' Property Value: This JsonObject is Declaring a Simple Type Enum Constant Description BOOLEANDenotes a protocol value that binds to a Javaboolean.INTEGERDenotes a protocol value that binds to a Javaint-based numeric type.NUMBERDenotes a protocol value that binds to a Javadouble-based numeric type.STRINGDenotes a protocol value that binds to a JavaString.'type' Property Value: This JsonObject is Defining a Java-API Array or Object Enum Constant Description ARRAYDenotes a protocol value that binds to a sequential JavaList-like array.OBJECTDenotes a protocol value that binds to a structured JavaObject.'type' Property Value: JsonObject Will Be Converted to a Raw & Un-processed JsonObject Return Enum Constant Description ANYAPI values described as"Any"are returned to the user as rawJsonObject.
-
Field Summary
Fields Modifier and Type Field Description Class<?>arrayCTASThe "Computed Type as a String" when the CDP API has specified that an "array of" a certain type shall be used.Class<?>boxedCTASThe "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<?>primCTASThe "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 TypePropvalueOf(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.
-
-
-
Enum Constant Detail
-
OBJECT
public static final TypeProp OBJECT
Denotes a protocol value that binds to a structured JavaObject. When a CDPTypeis declared to beOBJECT, aJsonArraywhose 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 JavaList-like array. Whenever a CDPTypeor anEventis 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).
-
STRING
-
INTEGER
-
NUMBER
-
BOOLEAN
-
ANY
public static final TypeProp ANY
API values described as"Any"are returned to the user as rawJsonObject. Whenever aPPR(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 typeJsonValue.
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 namejava.lang.NullPointerException- if the argument is null
-
-