Package Torello.Browser
Class NestedDescriptor<DOMAIN_NESTED extends BaseType<DOMAIN_NESTED>>
- java.lang.Object
-
- Torello.Browser.AbstractDescriptor
-
- Torello.Browser.NestedDescriptor<DOMAIN_NESTED>
-
- Type Parameters:
DOMAIN_NESTED- The concrete nested CDP type described by this descriptor.
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<AbstractDescriptor>
public class NestedDescriptor<DOMAIN_NESTED extends BaseType<DOMAIN_NESTED>> extends AbstractDescriptor implements java.io.Serializable
Reflected information / data which has been extracted from one of the nested CDP types declared inside a generated domain class.
A "Nested Type" is any CDP data-class, event-class, or command-return class that is generated as an inner class of one of the primary browser domain classes. For example:
Animation.AnimationEffect
is a nested type declared inside theAnimationdomain class. Its correspondingNestedDescriptorsingleton is created and stored inside that type's generated helper class:
Animation$$AnimationEffect$$
The descriptor stores the field names, CDP type constants, optional-field flags, experimental-field flags, and the concrete JavaClassrepresented by the nested type. This metadata is used by reflection-based tools such asTypeBuilder, JSON parsers, and generated helper classes.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/NestedDescriptor.java
- Open New Browser-Tab: Torello/Browser/NestedDescriptor.java
File Size: 6,065 Bytes Line Count: 147 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field Description protected static longserialVersionUIDjava.lang.Class for the CDP Type / Class being Built by this Builder Modifier and Type Field Description Class<DOMAIN_NESTED>baseTypeClassThis just keeps a pointer / reference back to the actualClasswhich is described by this "Nested Descriptor."
In the JDK, it is sometimes stated that "reifying generic types" could conceivably have a value to the end user.-
Fields inherited from class Torello.Browser.AbstractDescriptor
domain, experimentals, name, names, optionals, size, types
-
-
Constructor Summary
Constructors Constructor Description NestedDescriptor(Domains domain, String name, ReadOnlyList<String> names, ReadOnlyList<Byte> types, ReadOnlyList<Boolean> optionals, ReadOnlyList<Boolean> experimentals, Class<DOMAIN_NESTED> baseTypeClass)This is a public constructor, but it's primarily intended for internal use.
-
Method Summary
Methods: class java.lang.Object Modifier and Type Method Description StringtoString()Generates a reasonableStringrepresentation of'this'instance.-
Methods inherited from class Torello.Browser.AbstractDescriptor
compareTo, equals, hashCode, nameToIndex
-
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- See Also:
- Constant Field Values
- Code:
- Exact Field Declaration Expression:
protected static final long serialVersionUID = 1L;
-
baseTypeClass
public final java.lang.Class<DOMAIN_NESTED extends BaseType<DOMAIN_NESTED>> baseTypeClass
This just keeps a pointer / reference back to the actualjava.lang.Classwhich is described by this "Nested Descriptor."In the JDK, it is sometimes stated that "reifying generic types" could conceivably have a value to the end user. The only purpose of this field is to do just that, "reify" the Type Parameter represented by'DOMAIN_NESTED'.- Code:
- Exact Field Declaration Expression:
public final Class<DOMAIN_NESTED> baseTypeClass;
-
-
Constructor Detail
-
NestedDescriptor
public NestedDescriptor(Domains domain, java.lang.String name, ReadOnlyList<java.lang.String> names, ReadOnlyList<java.lang.Byte> types, ReadOnlyList<java.lang.Boolean> optionals, ReadOnlyList<java.lang.Boolean> experimentals, java.lang.Class<DOMAIN_NESTED> baseTypeClass)
This is a public constructor, but it's primarily intended for internal use.- Parameters:
name- The name of the CDP type described by this descriptor.domain- The Browser Domain containing the described CDP type.names- Parallel list of CDP property names.types- Parallel list ofCDP Type Constants.optionals- Parallel list indicating which properties areoptional.experimentals- Parallel list indicating which properties areexperimental.baseTypeClass- The concrete JavaClassrepresented by this descriptor.
-
-
Method Detail
-
toString
public java.lang.String toString()
Generates a reasonableStringrepresentation of'this'instance.- Overrides:
toStringin classAbstractDescriptor- Returns:
- A Java
String - See Also:
toString(),CommandDescriptor.toString()- Code:
- Exact Method Body:
return "NestedDescriptor:\n" + "{\n" + super.toString() + '\n' + I4 + "baseTypeClass: " + this.baseTypeClass.getCanonicalName() + '\n' + "}\n";
-
-