RecursiveObjectReader class
Helper class to perform property introspection and dynamic reading.
It is similar to ObjectReader but reads properties recursively through the entire object graph. Nested property names are defined using dot notation as "object.subobject.property"
See PropertyReflector See ObjectReader
Constructors
Properties
- hashCode → int
-
The hash code for this object. [...]
read-only, inherited
- runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed. [...]
inherited
-
toString(
) → String -
Returns a string representation of this object.
inherited
Operators
-
operator ==(
dynamic other) → bool -
The equality operator. [...]
inherited
Static Methods
-
getProperties(
dynamic obj) → Map< String, dynamic> -
- Get values of all properties in specified object and its subobjects and returns them as a map.
- The object can be a user defined object, map or array.
- Returned properties correspondently are object properties,
- map key-pairs or array elements with their indexes.
obj
an object to get properties from.
- Returns a map, containing the names of the object's properties and their values.
-
getProperty(
dynamic obj, String name) → dynamic - Recursively gets value of object or its subobjects property specified by its name. [...]
-
getPropertyNames(
dynamic obj) → List< String> - Recursively gets names of all properties implemented in specified object and its subobjects. [...]
-
hasProperty(
dynamic obj, String name) → bool -
- Checks recursively if object or its subobjects has a property with specified name.
- The object can be a user defined object, map or array.
- The property name correspondently must be object property,
- map key or array index.
-
obj
an object to introspect.
-
name
a name of the property to check.
- Returns true if the object has the property and false if it doesn't.
-
- Checks recursively if object or its subobjects has a property with specified name.