BaseMapping<M> class abstract

Base class for all mapping configurations that share common mapper functionality.

This abstract class serves as the foundation for all mapper reference classes like GlobalResourceMapping, LocalResourceMapping, IriMapping, and LiteralMapping. It provides a unified approach to specify mapper selection strategies:

  1. By name: Use dependency injection to supply a mapper at runtime
  2. By type: Automatically instantiate a mapper from a given class type
  3. By instance: Use a pre-configured mapper instance directly
  4. By factory: Use a factory function to create mappers with optional configuration

This abstraction enables consistent constructor patterns across all mapping types while maintaining type safety with the generic parameter M defining the expected mapper interface.

This base class is not intended to be used directly, but rather serves as the foundation for specialized mapping classes.

Implementers

Constructors

BaseMapping({String? mapperName, Type? mapperType, M? mapperInstance, String? factoryName, Object? factoryConfigInstance})
Creates a base resource mapping with the specified class IRI and mapper configuration.
const
BaseMapping.mapper(Type mapperType)
Creates a reference to a mapper that will be instantiated from the given type.
const
BaseMapping.mapperInstance(M instance)
Creates a reference to a directly provided mapper instance.
const
BaseMapping.namedFactory(String name, [Object? configInstance])
Creates a reference to a named factory function for creating mappers.
const
BaseMapping.namedMapper(String name)
Creates a reference to a named mapper that will be injected at runtime.
const

Properties

hashCode int
The hash code for this object.
no setterinherited
mapper MapperRef<M>?
Provides a MapperRef if a custom mapper is specified.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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