Giter Club home page Giter Club logo

director's Introduction

Director Library

The Director library is an annotation-based code generation tool that helps developers automatically generate mapping functions for their Kotlin classes.

Features

  • Annotation-based: Simply annotate your data classes and let the library do the rest.
  • Automatic generation: No need to manually write mapping functions.
  • Editable mapper support: Easily define which fields are editable and which are not.
  • Clear and concise mapping: Generated functions are readable and easy to understand.

Installation

[Installation Instructions Placeholder - Typically this would be how to add the library to Gradle/Maven]

How to Use

  1. Annotate your classes

    Use the @Mapper and @EditableMapper annotations to specify your source and target classes.

    @Mapper(target = TargetClass::class)
    data class SourceClass(val prop1: Type1, val prop2: Type2)
  2. Use Generated Mappers:

    After building your project, Director will generate extension functions that you can use for mapping:

    val source = SourceClass(...)
    val target = source.toTargetClass()
  3. Editable Fields:

    Use the @EditableMapper to specify fields that are editable:

    @EditableMapper(target = TargetClass::class, editableFields = ["field1", "field2"])
    data class SourceClass(...)

director's People

Contributors

kl3jvi avatar kl3jvii avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.