Package Torello.Browser
Class RunTime.PropertyDescriptor
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.RunTime.PropertyDescriptor
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- RunTime
public static class RunTime.PropertyDescriptor extends BaseType implements java.io.Serializable
Object property descriptor.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/RunTime.java
- Open New Browser-Tab: Torello/Browser/RunTime.java
File Size: 7,795 Bytes Line Count: 194 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field boolean
configurable
True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.boolean
enumerable
True if this property shows up during enumeration of the properties on the corresponding object.RunTime.RemoteObject
get
A function which serves as a getter for the property, orundefined
if there is no getter (accessor descriptors only).Boolean
isOwn
True if the property is owned for the object.String
name
Property name or symbol description.RunTime.RemoteObject
set
A function which serves as a setter for the property, orundefined
if there is no setter (accessor descriptors only).RunTime.RemoteObject
symbol
Property symbol object, if the property is of thesymbol
type.RunTime.RemoteObject
value
The value associated with the property.Boolean
wasThrown
True if the result was thrown during the evaluation.Boolean
writable
True if the value associated with the property may be changed (data descriptors only).
-
Constructor Summary
Constructors Constructor Description PropertyDescriptor(String name, RunTime.RemoteObject value, Boolean writable, RunTime.RemoteObject get, RunTime.RemoteObject set, boolean configurable, boolean enumerable, Boolean wasThrown, Boolean isOwn, RunTime.RemoteObject symbol)
ConstructorPropertyDescriptor(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
name
public final java.lang.String name
Property name or symbol description.
-
value
public final RunTime.RemoteObject value
The value associated with the property.
OPTIONAL
-
writable
public final java.lang.Boolean writable
True if the value associated with the property may be changed (data descriptors only).
OPTIONAL
-
get
public final RunTime.RemoteObject get
A function which serves as a getter for the property, orundefined
if there is no getter (accessor descriptors only).
OPTIONAL
-
set
public final RunTime.RemoteObject set
A function which serves as a setter for the property, orundefined
if there is no setter (accessor descriptors only).
OPTIONAL
-
configurable
public final boolean configurable
True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.
-
enumerable
public final boolean enumerable
True if this property shows up during enumeration of the properties on the corresponding object.
-
wasThrown
public final java.lang.Boolean wasThrown
True if the result was thrown during the evaluation.
OPTIONAL
-
isOwn
public final java.lang.Boolean isOwn
True if the property is owned for the object.
OPTIONAL
-
symbol
public final RunTime.RemoteObject symbol
Property symbol object, if the property is of thesymbol
type.
OPTIONAL
-
-
Constructor Detail
-
PropertyDescriptor
public PropertyDescriptor(java.lang.String name, RunTime.RemoteObject value, java.lang.Boolean writable, RunTime.RemoteObject get, RunTime.RemoteObject set, boolean configurable, boolean enumerable, java.lang.Boolean wasThrown, java.lang.Boolean isOwn, RunTime.RemoteObject symbol)
Constructor- Parameters:
name
- Property name or symbol description.value
- The value associated with the property.
OPTIONALwritable
- True if the value associated with the property may be changed (data descriptors only).
OPTIONALget
- A function which serves as a getter for the property, orundefined
if there is no getter (accessor descriptors only).
OPTIONALset
- A function which serves as a setter for the property, orundefined
if there is no setter (accessor descriptors only).
OPTIONALconfigurable
- True if the type of this property descriptor may be changed and if the property may be deleted from the corresponding object.enumerable
- True if this property shows up during enumeration of the properties on the corresponding object.wasThrown
- True if the result was thrown during the evaluation.
OPTIONALisOwn
- True if the property is owned for the object.
OPTIONALsymbol
- Property symbol object, if the property is of thesymbol
type.
OPTIONAL
-
PropertyDescriptor
public PropertyDescriptor(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'PropertyDescriptor'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; PropertyDescriptor o = (PropertyDescriptor) other; return Objects.equals(this.name, o.name) && Objects.equals(this.value, o.value) && Objects.equals(this.writable, o.writable) && Objects.equals(this.get, o.get) && Objects.equals(this.set, o.set) && (this.configurable == o.configurable) && (this.enumerable == o.enumerable) && Objects.equals(this.wasThrown, o.wasThrown) && Objects.equals(this.isOwn, o.isOwn) && Objects.equals(this.symbol, o.symbol);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.name) + this.value.hashCode() + Objects.hashCode(this.writable) + this.get.hashCode() + this.set.hashCode() + (this.configurable ? 1 : 0) + (this.enumerable ? 1 : 0) + Objects.hashCode(this.wasThrown) + Objects.hashCode(this.isOwn) + this.symbol.hashCode();
-
-