Class Helper$TypeProps


  • public class Helper$TypeProps
    extends java.lang.Object
    The contents of the JsonAST-Package are, in general, provided strictly for informational & reference purposes. If further research & investigation of Google's CDP API are necessary, one may deserialize the Browser-API and / or the JavaScript-API from the Java-HTML '.jar' file, and review the AST's programmatically. The AST Node Java-Classes have been meticulously documented exactly for that purpose.

    Generally, though, there really is very little need to review, understand, or programmatically analyze the CDP API. And the contents of this entire package, again, are largely here for reference only.



    This particular class falls under the Package "Sub-Category" of "Constructor Helpers". All that really means is that the methods inside this class are all invoked, solely, by the AST-Node's class constructors to build an instance of the node.

    The methods in this class are nothing more than "Json Data Extraction" utilities that are (mostly, sort-of) grouped by their use - primarily for the common purposes of "code-reuse", readability, and efficiency. These constructor helpers isolate a series of semi-complicated JSON extraction methods which read Google's CDP API from their respective '.json' definition files, and convert them into an in-memory Abstract Syntax Tree.

    Nothing too complicated is going on here. It, sort of, just helps to separate these procedures out into their own source files so, thereby hopefully making this whole thing easier to read & understand.
    Extracts the Json Property "type" from the JsonObject which defines an Entity instance, and converts that String into an instance of TypeProp. This class also extracts, if present, the "type" property from within an "items" JsonObject. These (the second) "type" are used if and only if the first "type" has a value of "array", and subsequently requires a definition for the Array's Base-Component Class.

    The only values which are ever assigned to the Json "type" property will directly correspond to one of the enum constants listed inside the TypeProp enum. It is of utmost important to remember, that if a PPR has a "Type" that is actually one of the specified types from the spec files (rather than something simple like 'integer' or 'string'), that PPR will not even use the Json "type" property.

    Instead, the "$ref" property will contain a "Reference as a String" (which will later require linkinig) that gives the name of the class / type of which the PPR is a reference.



    Stateless Class:
    This class neither contains any program-state, nor can it be instantiated. The @StaticFunctional Annotation may also be called 'The Spaghetti Report'. Static-Functional classes are, essentially, C-Styled Files, without any constructors or non-static member fields. It is a concept very similar to the Java-Bean's @Stateless Annotation.

    • 1 Constructor(s), 1 declared private, zero-argument constructor
    • 1 Method(s), 1 declared static
    • 1 Field(s), 1 declared static, 1 declared final


    • Method Summary

      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait