DogStructure<T> class
Defines the structure of class T and provides methods for instance creation
and data lookups. Also contains runtime instances of RetainedAnnotations
used in T.
- Inheritance
-
- Object
- RetainedAnnotationHolder
- DogStructure
- Implemented types
- Mixed-in types
- Available extensions
Constructors
-
DogStructure(String serialName, StructureConformity conformity, List<
DogStructureField> fields, List<RetainedAnnotation> annotations, DogStructureProxy proxy) -
Creates a new DogStructure.
const
- DogStructure.synthetic(String name)
-
Creates a synthetic DogStructure. This means that the structure is not
automatically generated from a class and (most likely) does not have a
backing class and proxy.
factory
Properties
-
annotations
→ List<
RetainedAnnotation> -
final
- conformity → StructureConformity
-
Specifies the type of the structure.
final
-
copy
→ DogStructureCopyFrontend<
T> -
Create a copy of this structure with optional modifications.
no setter
- deriveFuture → Type
-
no setterinherited
- deriveFutureOr → Type
-
no setterinherited
- deriveIterable → Type
-
no setterinherited
- deriveList → Type
-
no setterinherited
- deriveSet → Type
-
no setterinherited
- deriveStream → Type
-
no setterinherited
-
fields
→ List<
DogStructureField> -
Collection of the structure's properties.
final
-
getters
→ List<
dynamic Function(dynamic)> -
Available on DogStructure, provided by the StructureExtensions extension
Returns all field getters for this structure.no setter - hashCode → int
-
The hash code for this object.
no setterinherited
- isNullable → bool
-
no setterinherited
- isSynthetic → bool
-
Returns true if this structure is synthetic.
no setter
- nullable → TypeCapture
-
no setterinherited
- proxy → DogStructureProxy
-
Proxy for accessing structure data.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- serialName → String
-
Serial name of the structure.
final
- typeArgument → Type
-
no setterinherited
Methods
-
annotationsOf<
T> () → Iterable< T> -
Returns all annotations assignable to type
T.inherited -
annotationsOfExact<
T> () → Iterable< T> -
Returns all annotations with the exact type of
T.inherited -
castIterable(
Iterable< T> iterable) → Iterable<T> -
inherited
-
castList(
List list) → List< T> -
inherited
-
castSet(
Set set) → Set< T> -
inherited
-
consumeType<
RETURN> (RETURN func< _>() ) → RETURN -
inherited
-
consumeTypeArg<
RETURN, ARG> (RETURN func< _>(ARG), ARG arg) → RETURN -
inherited
-
firstAnnotationOf<
T> () → T? -
Gets the first annotation of type
Tor returns null otherwise.inherited -
getClassValidator(
{DogEngine? engine, List< IsolatedFieldValidator> ? fieldValidators}) → IsolatedClassValidator -
Available on DogStructure, provided by the StructureExtensions extension
Returns an IsolatedClassValidator that can be used to evaluate the ClassValidators and FieldValidators of this structure. -
getFieldByName(
String name) → DogStructureField? -
Available on DogStructure, provided by the StructureExtensions extension
Returns the first field with the suppliednameor null if not found. -
getFieldMap(
dynamic obj) → Map< String, dynamic> -
Available on DogStructure, provided by the StructureExtensions extension
Returns all field values of the suppliedobjas a field name keyed map. If a field defines a custom serial name, that name is used instead. -
indexOfFieldName(
String name) → int? -
Available on DogStructure, provided by the StructureExtensions extension
Returns the index of the field with the suppliednameor null if not found. -
instantiateFromFieldMap(
Map< String, dynamic> map) → dynamic -
Available on DogStructure, provided by the StructureExtensions extension
Reconstructs a new instance ofTusing the suppliedmapas field values. For more details on the map format, see getFieldMap. Throws an exception if a required field is missing. -
isAssignable(
dynamic object) → bool -
inherited
-
metadataOf<
T> () → List< T> -
Available on DogStructure, provided by the StructureExtensions extension
Returns all annotations of typeTfor this structure. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toDebugString(
DogEngine? engine) → String -
Available on DogStructure, provided by the StructureExtensions extension
Returns a debug string representation of this structure. -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited