ReflectionFactory class

Class with all registered reflections (ClassReflection).

Available extensions

Constructors

ReflectionFactory()
Returns the singleton instance of ReflectionFactory.
factory

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

createFromMap<O>(Map<String, dynamic> map, {Type? classType, EntityProvider? entityProvider, EntityCache? entityCache, EntityResolutionRules? resolutionRules}) → FutureOr<O?>

Available on ReflectionFactory, provided by the ReflectionFactoryExtension extension

Creates an instance O from map for classType (or O).
getRegisterClassReflection<O>([Type? classType]) → ClassReflection<O>?
Returns the registered ClassReflection for classType.
getRegisterClassReflectionByName<O>(String className) → ClassReflection<O>?
Returns the registered ClassReflection that matches className.
getRegisterEntityHandler<O>([Type? classType]) → ClassReflectionEntityHandler<O>?

Available on ReflectionFactory, provided by the ReflectionFactoryExtension extension

Returns the registered ClassReflectionEntityHandler for classType.
getRegisterEnumReflection<O>([Type? enumType]) → EnumReflection<O>?
Returns the registered EnumReflection for enumType.
getRegisterEnumReflectionByName<O>(String enumName) → EnumReflection<O>?
Returns the registered EnumReflection that matches enumName.
hasRegisterClassReflection<O>([Type? classType]) → bool
Returns true if a ClassReflection is registered for classType.
hasRegisterEnumReflection<O>([Type? enumType]) → bool
Returns true if a EnumReflection is registered for enumType.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
registerClassReflection<O>(ClassReflection<O> classReflection) → void
Called by ClassReflection when instantiated for the 1st time.
registerEnumReflection<O>(EnumReflection<O> enumReflection) → void
Called by EnumReflection when instantiated for the 1st time.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

toJsonEncodable(dynamic object, {Object? toEncodable(dynamic object)?}) → Object?
A JSON encodable transformer, that resolves the registered ClassReflection of the passed object, and calls ClassReflection.toJson.

Constants

VERSION → const String