zorphy
library
Classes
AlwaysMatch <TEntity >
A filter that always evaluates to true.
And <TEntity >
Logical AND combining multiple filters
BoundaryErr <T >
A failed boundary decode.
BoundaryOk <T >
A successful boundary decode carrying the value of type T.
Contains <TEntity , TValue >
Contains filter (e.g., for strings or lists)
Eq <TEntity , TValue >
Equality filter (e.g., field == value)
Field <TEntity , TValue >
Represents a field in a Zorphy entity TEntity with value type TValue.
Used for type-safe query construction and runtime evaluation.
FieldViolation
A single field-level decode failure at a trust boundary.
Filter <TEntity >
Base class for all filters
Gt <TEntity , TValue >
Greater than filter
Gte <TEntity , TValue >
Greater than or equal filter
Has <TEntity , TElement >
List-contains-element filter (e.g., List
Immutable
Annotation on an immutable class.
InList <TEntity , TValue >
In list filter
JsonConverter <T , S >
Implement this class to provide custom converters for a specific Type .
JsonEnum
Allows configuration of how enum elements are treated as JSON.
JsonKey
An annotation used to specify how a field is serialized.
JsonLiteral
An annotation used to generate a private field containing the contents of a
JSON file.
JsonSerializable
An annotation used to specify a class to generate code for.
JsonValue
An annotation used to specify how a enum value is serialized.
List_E <E >
Enhanced List type for Zorphy with additional functionality
ListAppend <E >
Appends one item.
ListEquality <T >
Compares two lists element-by-element (recursively for nested lists/maps).
ListPatchDelta <E >
An ordered sequence of ListPatchOp steps — the collection-delta half of
the patch algebra (ISSUE-008).
ListPatchOp <E >
One operation on a list field of a patch.
ListRemoveAt <E >
Removes the item at index .
ListReplaceAll <E >
Replaces the whole list. items is held as given — a const op cannot copy
it — so a caller that keeps mutating the list it passed in would see the
change.
ListUpdateAt <E >
Replaces the item at index .
Lt <TEntity , TValue >
Less than filter
Lte <TEntity , TValue >
Less than or equal filter
MapEquality <K , V >
Compares two maps entry-by-entry (recursively for nested lists/maps).
MapPatchDelta <K , V >
An ordered sequence of MapPatchOp steps — the key-keyed counterpart of
ListPatchDelta .
MapPatchOp <K , V >
One operation on a map field of a patch — the key-keyed counterpart of
ListPatchOp .
MapPut <K , V >
Sets one key.
MapRemove <K , V >
Removes one key.
MapReplaceAll <K , V >
Replaces the whole map. entries is held as given — a const op cannot
copy it — so a caller that keeps mutating the map it passed in would see the
change.
Neq <TEntity , TValue >
Not equal filter (e.g., field != value)
Nested <TEntity , TValue >
Nested object or collection filter
Not <TEntity >
Logical NOT negating a filter
Opt <T >
Optional type wrapper for Zorphy
Or <TEntity >
Logical OR combining multiple filters
Patch <T >
Patch interface for Zorphy code generation
PatchBase <TEntity , TEnum extends Enum >
The base every generated <Name>Patch extends (ISSUE-007).
PatchNested <Sub , SubPatch extends ZorphyPatch <Sub > >
A patch for one nested field of a parent patch: it carries the patch that
applies to the nested value instead of the nested value itself.
PatchSet <V >
The set PatchValue : the field takes value .
PatchUnchanged <V >
The unchanged PatchValue : the field is left as it is.
PatchValue <V >
A single field's contribution to a patch: either "leave it alone" or
"set it to this value".
PatchWireReplacement
A whole-value replacement for a nested field, as opposed to a
PatchNested -style edit of the existing value.
PatchWireSet
The unambiguous spelling of an explicit field set on the wire.
RecordUse
Annotation on a statically resolved member or class whose usages will be
recorded.
Required
Annotation on a required named parameter.
Sort <TEntity >
Represents a sort operation on a field
UseResult
Annotation on function or property whose value must not be ignored.
ZorphyBoundaryResult <T >
The outcome of decoding untrusted data against an expected type T.
ZorphyCollections
Shadow-proof static access to the collection equality/hash helpers.
ZorphyDomainBool
Field-level escape hatch from ZORPHY_LINT_NO_BOOL_FLAGS (ISSUE-005, #180).
ZorphyEntity
An aggregate/event root with its own identity.
ZorphyEntityBase <Id >
Base marker implemented by every polymorphic root/subtype in an
@ZorphyEntity hierarchy.
ZorphyEntityDescriptor <T extends ZorphyEntityBase >
A reflection-free, generic runtime seam over a generated @ZorphyEntity.
ZorphyIntent
A command/intent envelope whose payloads are replayed across a boundary.
ZorphyIntentBase
Base marker implemented by every class in a @ZorphyIntent hierarchy.
ZorphyLens <S , V >
A typed accessor for one value V inside a root S.
ZorphyMock
Field-level mock-data seed hint for mock-first generation.
ZorphyMockPresets
The reserved ZorphyMock.preset names understood by the generator.
ZorphyPatch <T >
A partial update of a value of type T — the v3 patch contract.
ZorphyPatchWire
The field-level decode primitives a generated patch fromWire calls.
ZorphyPolymorphicBase
Common super-marker shared by all five archetype families.
ZorphyState
A mutable/composed state node in a (possibly sealed) hierarchy.
ZorphyStateBase
Base marker implemented by every class in a @ZorphyState hierarchy.
ZorphyUnion
A closed discriminated union of sibling variants.
ZorphyUnionBase
Base marker implemented by every member of a @ZorphyUnion hierarchy.
ZorphyValue
An immutable value object with no identity of its own.
ZorphyValueBase
Base marker implemented by every class in a @ZorphyValue hierarchy.
Constants
alwaysThrows
→ const Object
Annotation marking a function as always throwing.
awaitNotRequired
→ const Object
Annotation on asynchronous function whose Future can be ignored.
checked
→ const Object
Annotation that no longer has any effect.
doNotStore
→ const Object
Annotation on function or property whose value must not be stored.
doNotSubmit
→ const Object
Annotation marking declaration that should be removed before publishing.
experimental
→ const Object
Annotation marking declaration as experimental and subject to change.
factory
→ const Object
Annotation on a function that creates new objects.
immutable
→ const Immutable
Annotation on an immutable class.
internal
→ const Object
Annotation on declaration that should not be used outside of its package.
isTest
→ const Object
Annotation on a test framework function that introduces a single test.
isTestGroup
→ const Object
Annotation on a test framework function that introduces a group of tests.
literal
→ const Object
Annotation on constructor that must be invoked with const if possible.
mustBeConst
→ const Object
Annotation on a parameter whose arguments must be constants.
mustBeOverridden
→ const Object
Annotation on instance members that must be overridden by subclasses.
mustCallSuper
→ const Object
Annotation on instance member that overriding members must call.
nonVirtual
→ const Object
Annotation on instance member that must not be overridden.
optionalTypeArgs
→ const Object
Annotation on type arguments that can safely be omitted.
protected
→ const Object
Annotation on instance member that should only be used by subclasses.
redeclare
→ const Object
Annotation on extension type members which redeclare superinterface members.
reopen
→ const Object
Annotation on declaration with less access restrictions than superinterface.
required
→ const Required
Annotation on named parameter that should always have an argument supplied.
sealed
→ const Object
Annotation on class that must not be subclassed outside of its package.
useResult
→ const UseResult
Annotation on function or property whose value must not be ignored.
virtual
→ const Object
Annotation which no longer has any effect.
visibleForOverriding
→ const Object
Annotation on declaration that should not be used outside of its package.
visibleForTesting
→ const Object
Annotation on a public declaration that should only be used in tests.
Functions
$checkedConvert <T > (Map map , String key , T castFunc (dynamic ), {Object ? readValue (Map , String )? })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkedCreate <T > (String className , Map map , T constructor (S <S >(String , S (Object ? ), {Object ? readValue (Map , String )? }) ), {Map <String , String > fieldKeyMap = const {} })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkedNew <T > (String className , Map map , T constructor (), {Map <String , String > ? fieldKeyMap })
→ T
Helper function used in generated code when
JsonSerializableGenerator.checked is true.
$checkKeys (Map map , {List <String > ? allowedKeys , List <String > ? requiredKeys , List <String > ? disallowNullValues })
→ void
Helper function used in generated fromJson code when
JsonSerializable.disallowUnrecognizedKeys is true for an annotated type or
JsonKey.required is true for any annotated fields.
$enumDecode <K extends Enum , V > (Map <K , V > enumValues , Object ? source , {K? unknownValue })
→ K
Returns the key associated with value source from enumValues, if one
exists.
$enumDecodeNullable <K extends Enum , V > (Map <K , V > enumValues , Object ? source , {Enum ? unknownValue })
→ K?
Returns the key associated with value source from enumValues, if one
exists.
zorphyCollectionEquals (Object ? a , Object ? b )
→ bool
Shallow content equality for snapshotted outer collections.
zorphyCollectionHash (Object ? value )
→ int
Hash compatible with zorphyCollectionEquals .
Exceptions / Errors
BadKeyException
A base class for exceptions thrown when decoding JSON.
CheckedFromJsonException
Exception thrown if there is a runtime exception in fromJson
code generated when JsonSerializableGenerator.checked is true
DisallowedNullValueException
Exception thrown if there are keys with disallowed null values in a JSON
map that was provided during deserialization.
MissingRequiredKeysException
Exception thrown if there are missing required keys in a JSON map that was
provided during deserialization.
UnrecognizedKeysException
Exception thrown if there are unrecognized keys in a JSON map that was
provided during deserialization.