Overview

ShapeShift – A lightweight, modular, performant and extensible object mapping library for Kotlin/Java.

ShapeShift is a Kotlin first object mapping library. We have built ShapeShift because we wanted a simple to use, minimal boiler plate mapping engine, that is also flexible and supports the most advanced use cases.

Built with Kotlin in mind, ShapeShift was designed around its ecosystem and best practices. The library APIs for mapping with Kotlin:

  • Annotations - Fully featured annotation based mapping, just add annotations to your objects and ShapeShift handles the rest. Including using custom field transformers, conditional mapping, advanced object decoration and much more.

  • Kotlin DSL - Allowing you to define the relations between objects. This allows you to map objects you can't change (or don't want to), like objects from 3rd party libraries. Additionally you can define inline transformations, conditions and decorations, enabling deep customization and very advanced mapping.

ShapeShift also has full Java support available with multiple APIs for mapping:

  • Annotations - Same API as Kotlin with full Java support.

  • Java Builder - The equivalent Java API for the Kotlin DSL. Allowing you to define the relations between objects without modifying their code, and map objects you can't change (or don't want to).

ShapeShift main features:

  • Auto mapping

  • Custom field transformers

  • Default transformers

  • Deep mapping

  • Multiple mapping targets

  • Conditional mapping

  • Mapping decorators

  • Seamless spring integration

  • Native Android support

Check out the quick start guide to learn how get started:

pageQuick Start

Last updated