reflection_factory library

Library for reflection factory.

Classes

BasicFieldReflection<O, T>
A class field reflection.
ClassProxy
Informs that a class will be a proxy to a target class with className, without directly depending on the target class.
ClassProxyDelegateListener<T>
A ClassProxyListener that delegates to targetListener.
ClassProxyListener<T>
Interface that a proxy class (annotated with ClassProxy) should implement to list for proxy calls.
ClassReflection<O>
Base for Class reflection.
Completer<T>
A way to produce Future objects and to complete them later with a value or error.
ConstructorReflection<O>
ElementReflection<O>
Base for element reflection.
ElementResolver<T>
A simple element of type T resolver.
EnableReflection
Enables reflection for a class.
EnumReflection<O>
Base for Enum reflection.
EventSink<T>
A Sink that supports adding errors.
FieldReflection<O, T>
A class field reflection.
FunctionReflection<O, R>
Base class for methods.
Future<T>
The result of an asynchronous computation.
FutureOr<T>
A type representing values that are either Future<T> or T.
IgnoreClassProxyMethod
JsonAnnotation
JsonCodec
JSON codec integrated with ReflectionFactory.
JsonConstructor
Indicates the constructor to be used to instantiate an entity from JSON/Map.
JsonConverter<S, T>
JSON decoder integrated with ReflectionFactory.
JsonDecoder
A JSON decoder.
JsonEncoder
A JSON encoder.
JsonEntityCache
A JSON entity encoding/decoding cache.
JsonEntityCacheSimple
Simple implementation of JsonEntityCache.
JsonField
Informs that a class field can be hidden JsonField.hidden or visible JsonField.visible
JsonFieldAlias
Defines the JSON field name.
MethodInvocation<T>
Represents a method invocation parameters.
MethodReflection<O, R>
A class method reflection.
MultiStreamController<T>
An enhanced stream controller provided by Stream.multi.
ParameterReflection
A parameter reflection, used method arguments or class fields.
Reflection<O>
Base for reflection.
ReflectionBridge
Indicates that a class is a reflection bridge of Types in classesTypes List.
ReflectionFactory
Class with all registered reflections (ClassReflection).
StaticFieldReflection<O, T>
A class static-field reflection. Extends FieldReflection.
StaticFunctionReflection<O, R>
Base class for static methods and constructors.
StaticMethodReflection<O, R>
A class static-method reflection.
Stream<T>
A source of asynchronous data events.
StreamConsumer<S>
Abstract interface for a "sink" accepting multiple entire streams.
StreamController<T>
A controller with the stream it controls.
StreamIterator<T>
An Iterator-like interface for the values of a Stream.
StreamSink<S>
A object that accepts stream events both synchronously and asynchronously.
StreamSubscription<T>
A subscription on events from a Stream.
StreamTransformer<S, T>
Transforms a Stream.
StreamTransformerBase<S, T>
Base class for implementing StreamTransformer.
StreamView<T>
Stream wrapper that only exposes the Stream interface.
SynchronousStreamController<T>
A stream controller that delivers its events synchronously.
Timer
A countdown timer that can be configured to fire once or repeatedly.
TypeEquality
TypeEquivalency
TypeInfo<T>
Represents a Type and its arguments.
TypeInfoEquality
TypeInfoEquivalency
TypeInfoListEquality
TypeInfoListEquivalency
TypeListEquality
TypeParser
Lenient parsers for basic Dart types.
TypeReflection<T>
Dart Type reflection.
Version
A parsed semantic version number.
VersionConstraint
A VersionConstraint is a predicate that can determine whether a given version is valid or not.
VersionRange
Constrains versions to a fall within a given range.
VersionUnion
A version constraint representing a union of multiple disjoint version ranges.
Zone
A zone represents an environment that remains stable across asynchronous calls.
ZoneDelegate
An adapted view of the parent zone.
ZoneSpecification
A parameter object with custom zone function handlers for Zone.fork.

Extensions

FutureExtensions on Future<T>
Convenience methods on futures.
FutureIterable on Iterable<Future<T>>
FutureRecord2 on (Future<T1>, Future<T2>)
Parallel operations on a record of futures.
FutureRecord3 on (Future<T1>, Future<T2>, Future<T3>)
Parallel operations on a record of futures.
FutureRecord4 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>)
Parallel operations on a record of futures.
FutureRecord5 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>)
Parallel operations on a record of futures.
FutureRecord6 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>)
Parallel operations on a record of futures.
FutureRecord7 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>)
Parallel operations on a record of futures.
FutureRecord8 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>)
Parallel operations on a record of futures.
FutureRecord9 on (Future<T1>, Future<T2>, Future<T3>, Future<T4>, Future<T5>, Future<T6>, Future<T7>, Future<T8>, Future<T9>)
Parallel operations on a record of futures.
GenericObjectExtension on Object?
Extension for Object nullable.
IterableFieldReflectionExtension on Iterable<BasicFieldReflection<O, T>>
FieldReflection extension.
IterableJsonFieldAliasExtension on Iterable<JsonFieldAlias>
IterableJsonFieldExtension on Iterable<JsonField>
IterableMethodReflectionExtension on Iterable<FunctionReflection<O, R>>
MethodReflection extension.
IterableParameterReflectionExtension on Iterable<ParameterReflection>
FieldReflection extension.
IterableTypeReflectionExtension on Iterable<TypeReflection>
TypeReflection extension.
MimeTypeResolverExtension on MimeTypeResolver
ReflectionDurationExtension on Duration
TypeExtension on Type
Extension for Type.

Properties

jsonMimeTypeResolver → MimeTypeResolver
final

Functions

castListType<T>(List list, Type type) List
castMapType<K, V>(Map map, Type keyType, Type valueType) Map
runZoned<R>(R body(), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification, Function? onError}) → R
Runs body in its own zone.
runZonedGuarded<R>(R body(), void onError(Object error, StackTrace stack), {Map<Object?, Object?>? zoneValues, ZoneSpecification? zoneSpecification}) → R?
Runs body in its own error zone.
scheduleMicrotask(void callback()) → void
Runs a function asynchronously.
tryParseDuration(String? v, [Duration? def]) Duration?
unawaited(Future<void>? future) → void
Explicitly ignores a future.

Typedefs

ConstructorReflectionAccessor = Function Function()
ControllerCallback = void Function()
Type of a stream controller's onListen, onPause and onResume callbacks.
ControllerCancelCallback = FutureOr<void> Function()
Type of stream controller onCancel callbacks.
CreatePeriodicTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration period, void f(Timer timer))
The type of a custom Zone.createPeriodicTimer implementation function.
CreateTimerHandler = Timer Function(Zone self, ZoneDelegate parent, Zone zone, Duration duration, void f())
The type of a custom Zone.createTimer implementation function.
ErrorCallbackHandler = AsyncError? Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace? stackTrace)
The type of a custom Zone.errorCallback implementation function.
FieldGetter<T> = T Function()
FieldNameResolver = String? Function(String field, Map<String, Object?> map)
FieldReflectionGetterAccessor<O, T> = FieldGetter<T> Function(O? obj)
FieldReflectionSetterAccessor<O, T> = FieldSetter<T> Function(O? obj)
FieldSetter<T> = void Function(T v)
FieldValueResolver = Object? Function(String field, Object? value, TypeReflection type)
ForkHandler = Zone Function(Zone self, ZoneDelegate parent, Zone zone, ZoneSpecification? specification, Map<Object?, Object?>? zoneValues)
The type of a custom Zone.fork implementation function.
HandleUncaughtErrorHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, Object error, StackTrace stackTrace)
The type of a custom Zone.handleUncaughtError implementation function.
IterableCaster = Object? Function(Iterable value, TypeReflection type, JsonDecoder jsonDecoder)
JsomMapDecoder<O> = O? Function(Map<String, Object?> map, JsonDecoder jsonDecoder)
JsomMapDecoderAsync<O> = FutureOr<O?> Function(Map<String, Object?> map, JsonDecoder jsonDecoder)
JsomMapDecoderAsyncProvider = JsomMapDecoderAsync? Function(Type type, Map<String, Object?> map, JsonDecoder jsonDecoder)
JsomMapDecoderProvider = JsomMapDecoder? Function(Type type, Map<String, Object?> map, JsonDecoder jsonDecoder)
JsonFieldMatcher = bool Function(String key)
JsonTypeDecoder<T> = T? Function(Object? json, JsonDecoder? jsonDecoder, TypeInfo typeInfo)
JsonTypeToEncodable<T> = Object? Function(T object)
JsonValueDecoder<O> = O? Function(Object? o, Type type, JsonDecoder jsonDecoder)
JsonValueDecoderProvider<O> = JsonValueDecoder<O>? Function(Type type, Object? value, JsonDecoder jsonDecoder)
MapCaster = Object? Function(Map value, TypeReflection type, JsonDecoder jsonDecoder)
MethodReflectionAccessor<O> = Function Function(O? obj)
OnConstructorInvocationError = void Function(ConstructorReflection constructor, MethodInvocation methodInvocation, Map<String, dynamic> map, Object? error)
ParameterProvider = Object? Function(ParameterReflection parameter, int? parameterIndex)
PrintHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, String line)
The type of a custom Zone.print implementation function.
RegisterBinaryCallbackHandler = ZoneBinaryCallback<R, T1, T2> Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2))
The type of a custom Zone.registerBinaryCallback implementation function.
RegisterCallbackHandler = ZoneCallback<R> Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.registerCallback implementation function.
RegisterUnaryCallbackHandler = ZoneUnaryCallback<R, T> Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg))
The type of a custom Zone.registerUnaryCallback implementation function.
RunBinaryHandler = R Function<R, T1, T2>(Zone self, ZoneDelegate parent, Zone zone, R f(T1 arg1, T2 arg2), T1 arg1, T2 arg2)
The type of a custom Zone.runBinary implementation function.
RunHandler = R Function<R>(Zone self, ZoneDelegate parent, Zone zone, R f())
The type of a custom Zone.run implementation function.
RunUnaryHandler = R Function<R, T>(Zone self, ZoneDelegate parent, Zone zone, R f(T arg), T arg)
The type of a custom Zone.runUnary implementation function.
ScheduleMicrotaskHandler = void Function(Zone self, ZoneDelegate parent, Zone zone, void f())
The type of a custom Zone.scheduleMicrotask implementation function.
StaticFieldReflectionGetterAccessor<T> = FieldGetter<T> Function()
StaticFieldReflectionSetterAccessor<T> = FieldSetter<T> Function()
StaticMethodReflectionAccessor = Function Function()
ToEncodableJson = Object? Function(Object? object, JsonEncoder jsonEncoder)
ToEncodableJsonProvider = ToEncodableJson? Function(Object object)
TypeElementParser<T> = T? Function(Object? o)
ZoneBinaryCallback<R, T1, T2> = R Function(T1, T2)
ZoneCallback<R> = R Function()
ZoneUnaryCallback<R, T> = R Function(T)

Exceptions / Errors

AsyncError
An error and a stack trace.
ClassProxyCallError
A ClassProxy call error.
DeferredLoadException
Thrown when a deferred library fails to load.
ParallelWaitError<V, E>
Error thrown when waiting for multiple futures, when some have errors.
TimeoutException
Thrown when a scheduled timeout happens while waiting for an async result.
UnresolvedParameterError
Error thrown when MethodInvocation can't be defined due to an unresolved parameter value.