Class Linker


  • public class Linker
    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" known as "The Linker". Linking variables inside of an AST is an extremely simple concept, but has one issue of utmost importance to bear in mind. Converting Google's CDP API from a '.json' definition file (​ browser_protocol.json and js_protocol.json) into an Abstract Syntax Memory inside of Java Program Memory is really all about converting thousands upon thousands of String's into actual POJO References. The Process otherwise known as "Linking" is simply where one class has a "Type" (which in Java is called a "Class") specified by some String into an actual pointer or reference to its definition (another or second "Class") somewhere else on the Java Heap. The Linker merely takes fields defined by strings, and converts them into fields defined by references, no more, no less.

    The only issue to keep in mind, vis-à-vis "The Linker," is that one very common programming technique is to declare fields inside of a class with / using the Java reserved keyword final. However, since fields which need to be "linked" may only be assigned a value after all of the AST Nodes have been constructed, these fields cannot be assigned inside the constructor of an AST Node Class, itself. Therefore, and unfortunately, any field which requires linking cannot be declared final.

    Fields which can be modified (non-final fields), often (but not always), must also be declared private to protect their value from accidental user clobbering or modification. For these reasons, along with others not mentioned, it is much easier to isolate classes for "The Linker", externally into separate Java Class Files.
    After parsing both API Spec-Files, each and every Json Property namem "ref$" needs to have it's String converted into a genuine TCE instance; this process is called 'Linking' and it is identical to the linkng that the Java Compiler javac performs when converting variables & fields inside source files into class files.



    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
    • 5 Method(s), 5 declared static
    • 0 Field(s)


    • Method Summary

      • Methods inherited from class java.lang.Object

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