dogs_core
library
Classes
AnnotationMessage
A single message produced by a validator.
AnnotationResult
Container for validation results.
APISchemaObjectMetaVisitor
Visitor for APISchemaObject
instances.
Can be applied to structure annotations to additionally supply meta information.
CascadeItemType <T >
Defines the item type of the implementing class.
The getItemType method in lyell_gen will consider T
as the actual
item type and treat it as if it is the type argument of a List ,
Future or a similar generic core types.
ClassValidator
Class level validator for annotations of ClassValidator s.
CodecPrimitiveCoercion
Mechanism for coercing specific native types to other native types.
ComposableOperationModeFactory <T extends OperationMode >
A OperationModeFactory that composes multiple other factories.
ConverterSupplyingVisitor
Annotation to override the converter used for a field.
DateTimeConverter
DogConverter for DateTime instances which encodes the timestamp as a
Iso8601 string.
DefaultNativeCodec
Default implementation of DogNativeCodec .
Defines the following native types:
DefaultStructureConverter <T >
Default DogConverter base for DogStructure s.
Normally extended by generated converters.
DefaultTreeBaseFactories
Collection of default TreeBaseConverterFactory s.
DelegateQualifiedTypeTree <T , B >
DogBool
Graph node representing a boolean value.
DogConverter <T >
Base class for converters used by the DogEngine .
Contains structure information about the type being serialized and provides
an OperationMode mapping for all supported operation modes.
DogDouble
Graph node representing a double value.
DogEngine
Registry and interface for everything related to dogs.
DogGraphValue
Graph node of the serialized DOG graph.
DogInt
Graph node representing an integer value.
DogList
Graph node representing a list value.
DogMap
Graph node representing a map value.
DogNative
Wrapped native value.
DogNativeCodec
Defines the native object types for a DogEngine and
provides converters for them.
DogNull
Graph node representing a null value.
DogSchema
Provides the ability to generate openapi schema objects for all registered structures.
DogString
Graph node representing a string value.
DogStructure <T >
Defines the structure of class T
and provides methods for instance creation
and data lookups. Also contains runtime instances of RetainedAnnotation s
used in T
.
DogStructureConverterImpl <T >
Mock implementation for DefaultStructureConverter .
DogStructureField
The definition of a field in a DogStructure .
Holds all necessary information to validate and serialize and introspect
the field.
DogStructureProxy
Method proxy provider for DogStructure s.
A structure proxy must provided instantiation/"activation" for the object
and property accessor methods for all fields defined by the structure.
A get-all method for faster field value retrieval must also be provided.
DogVisitor <T >
Visitor for DogGraphValue s that maps a value to type T
.
DurationConverter
DogConverter for Duration instances which encode a duration as a
Iso8601 string.
ExpandedDogVisitor <T >
A visitor for DogGraphValue s that provides a visitor method for each type of value.
FieldValidator
Property level validator for annotations of DogStructureField s.
GeneratedEnumDogConverter <T extends Enum >
A DogConverter that allows for the conversion of enum values to and from strings.
ItemAssociatedTypeToken <SOURCE , ITEM >
Double type capture token for associated item types.
Mainly useful for serialization or type mapping.
IterableTreeNativeOperation
The native operation implementation for IterableTreeBaseConverterMixin .
LightweightMigration
LightweightMigration
is a class that extends SerializationHook
.
It provides a lightweight way to handle migrations by executing a list of migration functions before deserialization.
LinkSerializer
MapNTreeArgConverter <K , V >
NTreeArgConverter for Map s.
MemoryDogStructureProxy
Simple class-less implementation of DogStructureProxy , primarily for tests.
NativeRetentionConverter <T >
Converter that just keeps the value as is.
NativeSerializerMode <T >
Operation mode that converters a value to a native representation as
defined by the DogNativeCodec of the current DogEngine . For most
implementations, this means converting the value to a "primitive" dart type,
that could also be encoded using jsonEncode .
NoCodecPrimitiveCoercion
Default implementation of CodecPrimitiveCoercion that throws an error
when coercion is attempted.
NTreeArgConverter <BASE >
A converter interface for a generic type with a fixed number of type arguments.
Used together with TreeBaseConverterFactory.createNargsFactory to create
a DogConverter for generic types.
ObjectFactoryStructureProxy <T >
DogStructureProxy implementation for creating universal object factories.
OperationMode <T >
An operation mode exposed by a DogConverter .
OperationModeCacheEntry <T extends OperationMode >
A cache entry for OperationMode s.
Holds all resolved OperationMode s for the specified OperationModeCacheEntry.modeType .
OperationModeFactory <T extends OperationMode >
Factory for OperationMode s.
OperationModeRegistry
The registry for OperationMode s.
Serves as the central point for resolving OperationMode s for DogConverter s
and Type s. Also functions as a cache for the resolved OperationMode s.
Optional <T >
Port of Java's Optional (https://docs.oracle.com/javase/8/docs/api/java/util/Optional.html )
OptionalNTreeArgConverter <T >
NTreeArgConverter for Optional s.
Page <T >
Collection that represents a page of results.
PageMeta
Metadata about a page.
PageNTreeArgConverter <T >
A NTreeArgConverter for Page s.
Simple page and size based pagination request.
A DogConverter for PageRequest s.
PolymorphicConverter
DogConverter that supports polymorphic serialization and deserialization.
Supports a maximum of one level of polymorphism because of the lack of
runtime type introspection available in Dart.
PostRebuildHook <T >
Hook that runs after a structure T
has been rebuilt.
Projections
A collection of projection transformers.
PropertyName
Overrides the name that will be used by the GeneratedDogConverter
for this
specific property. By default, the field name will be used.
PropertySerializer
Overrides the serializer that will be used by the GeneratedDogConverter
for this specific property. By default, the field will be serialized using
the convert associated with its type.
QualifiedTerminal <T >
QualifiedTypeTree <T , B >
QualifiedTypeTreeN <T , B >
RegExpConverter
DogConverter for RegExp instances which encodes the regular expression
as a string.
RetainedAnnotation
Marker annotation to make an annotation accessible at runtime using
RetainedAnnotationHolder implementations.
RetainedAnnotationContainer
Standard implementation of const RetainedAnnotationHolder .
RetainedAnnotationHolder
Abstract container of RetainedAnnotation s.
RevisionMigration
RevisionMigration
is a class that extends SerializationHook
.
It provides a way to handle migrations by executing a list of migration functions before deserialization and after serialization.
Serializable
See @serializable .
SerializableLibrary
Marks a library import as dogs serializable.
SerializationHook
SerializationHook
is an abstract class that implements StructureMetadata
.
It provides two methods for handling serialization and deserialization events.
SimpleDogConverter <T >
Simple converter base that only requires a serialize and deserialize
method. Automatically adds NativeSerializerMode as well as a synthetic
DogStructure with the given SimpleDogConverter.serialName
.
SingletonConverterOperationModeFactory <T extends OperationMode >
A OperationModeFactory that returns a single OperationMode for a DogConverter of type
.
SingletonTypeOperationModeFactory <T extends OperationMode >
A OperationModeFactory that returns a singleton OperationMode for a specific type.
StructureHarbinger <T >
Utility class for resolving converters for a DogStructure .
StructureMetadata
Marks a annotation as a structure annotation and retainable.
StructureNativeSerialization <T >
A NativeSerializerMode that supplies native serialization for DogStructure s.
StructureNode
Superclass for all structure related subtypes.
StructureOperationModeFactory <MODE_TYPE extends OperationMode >
Static way to provide additional opmode factories to the default structure
converter.
StructureValidation <T >
A ValidationMode that provides validation for DogStructure s.
TokenTypeTrees
TreeBaseConverterFactory
A factory for DogConverter s that are derived from a TypeTree .
TypeCapture <T >
Abstract base class for using a generic type capture.
TypeContainer0
TypeContainer1 <A >
TypeContainer2 <A , B >
TypeContainer3 <A , B , C >
TypeContainer4 <A , B , C , D >
TypeContainer5 <A , B , C , D , E >
TypeContainer6 <A , B , C , D , E , F >
TypeContainer7 <A , B , C , D , E , F , G >
TypeContainers
TypeToken <T >
Default implementation for a TypeCapture of type T
.
TypeTree <BASE >
TypeTree0 <T >
TypeTree1 <BASE , ITEM >
TypeTree2 <BASE , ITEM0 , ITEM1 >
TypeTree3 <BASE , ITEM0 , ITEM1 , ITEM2 >
TypeTreeN <BASE >
Uint8ListConverter
DogConverter for Uint8List instances which encodes the binary data
as a base64 string using base64Encode .
UriConverter
DogConverter for Uri instances which encodes the uri into a string.
ValidationMode <T >
Operation mode that provides a way to validate objects and return
validation related error messages as annotations.
Constants
beanIgnore
→ const _BeanIgnore
Marks a property as ignored when using the bean conformity.
deepEquality
→ const DeepCollectionEquality
Static DeepCollectionEquality
instance used by the dog library.
linkSerializer
→ const LinkSerializer
Manually marks a custom dog converter implementation for linking.
The dogs_generator will then include an instance of this converter.
polymorphic
→ const _Polymorphic
Marks a property as polymorphic, meaning its value's type can vary.
serializable
→ const Serializable
Marks a class or enum as serializable.
The dogs_generator will then generate a DefaultStructureConverter which
also implements Copyable
and Validatable
. The generator will also
generate an implementation of Builder
for the given type with the suffix
'Builder' appended to the original class name.
Annotated types must match following conditions:
Functions
adjustIterable <T > (dynamic value , IterableKind kind )
→ dynamic
Converts a value
to the given IterableKind . If the value is a Iterable
implementation, it will converted to the desired IterableKind . Trying to
convert singular values to a iterable will result in an exception.
adjustWithCoercion (dynamic value , IterableKind kind , TypeCapture target , CodecPrimitiveCoercion coercion , String ? fieldName )
→ dynamic
Converts a value
to the given IterableKind . Tries to coerce the value to
the desired type using the coercion
if the value is not assignable to the
target
type.
compareTypeHashcodes (Type a , Type b )
→ int
Compares two types by their hashcodes.
isPolymorphicField (DogStructureField field )
→ bool
Checks if a field is marked as polymorphic.
mapifyValue (dynamic obj )
→ Map
Makes sure that the given obj
is a map by wrapping it in a map if necessary.
project <T > (Object value , [Object ? a , Object ? b , Object ? c ])
→ T
Creates a projection resulting in an instance of T
. All input fields are dynamic and contain following:
registerStructureOperationFactory (StructureOperationModeFactory <OperationMode > factory )
→ void
Register a StructureOperationModeFactory fallback for DogStructure s.
This method exists for legacy reasons and should not be used anymore, please
instead use DogEngine.registerModeFactory with normal
OperationModeFactory s.
stringKeyedMapFrom (Object ? value )
→ Object ?
Deeply converts a map with dynamic keys to a map with string keys.
substituteNullValues (Object ? value )
→ Object ?
Deeply converts a map with dynamic keys to a map with string keys.
unmapifyValue (Map obj )
→ dynamic
Undo the mapifyValue operation.
unsusbstituteNullValues (Object ? value )
→ Object ?
Undoes the conversion of substituteNullValues .