RdfLocalResource.mapper constructor
const
RdfLocalResource.mapper(
- Type mapperType, {
- MapperDirection direction = MapperDirection.both,
Creates a reference to a mapper that will be instantiated from the given type.
The generator will create an instance of mapperType to handle mapping
for this class. The type must implement LocalResourceMapper<T> where T
is the annotated class and it must have a no-argument default constructor.
Example:
@RdfLocalResource.mapper(CustomChapterMapper)
class Chapter {
// ...
}
// The mapper implementation must be accessible to the generator:
class CustomChapterMapper implements LocalResourceMapper<Chapter> {
// Implementation details...
}
Implementation
const RdfLocalResource.mapper(Type mapperType, {super.direction})
: classIri = null,
super.mapper(mapperType);