An object mapping jetbrains plugin, it will automatically generate the get/set code between the two objects.

Overview

BeanMappingKey

GitHub Stars GitHub Forks GitHub Watchers

简体中文 | English

一键生成两个实体类之间的字段映射代码,用于代替 BeanUtil 与 MapStruct 等工具。


使用指南

在 Java 开发的过程中,经常会使用众多包装型的对象如:BO、VO、DTO,它们之间往往只有两三个字段的差异, 而对它们进行相互转换则是一项耗时耗力的体力活,所以 Java 生态中就衍生出了 BeanUtilMapStruct 这种工具, 然而 BeanUtil 无法查看对象转换细节,MapStruct 有时则会遇到对象转换不理想的情况,所以你仍需手动编写对象转换代码。


BeanMappingKey 就是为了解决此类需求而开发的,它(暂时)一共有三种用法:

  • 选中一个带有返回值和参数的方法,使用快捷键 Ctrl+M 或者右键点击 BeanMappingKey, 就能自动插入相关转换代码。
  • 选中一个变量,使用快捷键 Ctrl+M 或者右键点击 BeanMappingKey,就能自动生成转换代码到粘贴板。
  • 选中一个类,使用快捷键 Ctrl+M 或者右键点击 BeanMappingKey,就能自动生成转换代码到粘贴板。

以上生成逻辑中,若有 Builder 内部类则优先生成 Builder 代码,其次生成 set 型代码。


Issues 指南

如您在使用过程中,遇到了什么问题或者有良好的使用建议,可以通过提 issues 方式告知我, 提 issues 之前请先组织好您的语言,尽量详细,如果是问题类的 issues 则需要附上 IDEA 版本。

最后,欢迎 Star

You might also like...

Text Object Java Objects (TOJOs): an object representation of a multi-line structured text file like CSV

It's a simple manager of "records" in a text file of CSV, JSON, etc. format. It's something you would use when you don't want to run a full database,

Dec 27, 2022

Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included

Read full documentation at http://immutables.org // Define abstract value type using interface, abstract class or annotation @Value.Immutable public i

Dec 31, 2022

Adds value to towns, by giving each one a unique set of automatically-generated resources.

TownyResources TownyResources adds value to towns, by giving each one a unique set of automatically-produced resources which can be collected by playe

Dec 30, 2022

Let Fixture Monkey generate test instances including edge cases automatically

Let Fixture Monkey generate test instances including edge cases automatically

Fixture Monkey is designed to generate controllable arbitrary instances easily. It allows you to reuse same configurations of the instances in several tests.

Jan 9, 2023

dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

Nov 20, 2022

Intelligent object mapping

ModelMapper ModelMapper is an intelligent object mapping library that automatically maps objects to each other. It uses a convention based approach wh

Dec 28, 2022

A declarative mapping library to simplify testable object mappings.

ReMap - A declarative object mapper Table of Contents Long story short About ReMap Great News Mapping operations Validation Features Limitations The m

Dec 27, 2022

Governator is a library of extensions and utilities that enhance Google Guice to provide: classpath scanning and automatic binding, lifecycle management, configuration to field mapping, field validation and parallelized object warmup.

Governator DESCRIPTION Governator is a library of extensions and utilities that enhance Google Guice to provide injector lifecycle and well as support

Dec 28, 2022

Mars - Object Relational Mapping Framework for MongoDB (MongoDB ORM)

Mars   -  Object Relational Mapping  Framework for MongoDB  (MongoDB ORM)

Mars Object Relational Mapping Framework for MongoDB 致自己 造自己的轮子,让别人去说 ; What is Mars Mars is a unified driver platform product developed by Shanghai J

Nov 17, 2022

HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL

HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL

HasorDB is a Full-featured database access tool, Providing object mapping,Richer type handling than Mybatis, Dynamic SQL, stored procedures, more dialect 20+, nested transactions, multiple data sources, conditional constructors, INSERT strategies, multiple statements/multiple results. And compatible with Spring and MyBatis usage.

Oct 27, 2022

dOOv (Domain Object Oriented Validation) a fluent API for type-safe bean validation and mapping

dOOv (Domain Object Oriented Validation) dOOv is a fluent API for typesafe domain model validation and mapping. It uses annotations, code generation a

Nov 20, 2022

Reladomo is an enterprise grade object-relational mapping framework for Java.

Reladomo What is it? Reladomo is an object-relational mapping (ORM) framework for Java with the following enterprise features: Strongly typed compile-

Nov 2, 2022

Hibernate's core Object/Relational Mapping functionality

Hibernate ORM is a library providing Object/Relational Mapping (ORM) support to applications, libraries, and frameworks. It also provides an implement

Jan 9, 2023

This project is an Android Studio plugin version of BlackObfuscator, it supports obfuscating code automatically. More information about this project are in BlackObfuscator.

DEX控制流混淆插件版 · BlackObfuscator-ASPlugin English Version 本项目为 BlackObfuscator 的Android Studio插件版,支持打包自动化混淆。功能及介绍方面请查看 BlackObfuscator 源项目 注意事项 首要注意:Blac

Dec 31, 2022
Comments
  • 无法使用

    无法使用

    IntelliJ desc

    • IntelliJ platform :
    • Version :

    IntelliJ IDEA 2021.1 (Ultimate Edition) Build #IU-211.6693.111, built on April 6, 2021 Licensed to IntelliJ IDEA Evaluator Expiration date: July 8, 2022 Runtime version: 11.0.10+9-b1341.35 amd64 VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o. Windows 10 10.0 GC: G1 Young Generation, G1 Old Generation Memory: 2016M Cores: 8 Registry: debugger.watches.in.variables=false, compiler.automake.allow.when.app.running=true Non-Bundled Plugins: io.zhile.research.ide-eval-resetter (2.3.5), com.github.copilot (1.1.24.1610), com.github.wangji92.arthas.plugin (2.37), com.alibaba.p3c.smartfox (2.1.1), com.kyexpress.fmk.debug.ui (2.5.1), com.kyexpress.plugins.openapi-generator (1.1.0), org.rookie.plugins.BeanMappingKey (2.0), org.sonarlint.idea (6.7.0.45926), MavenRunHelper (4.13.203.000.0), org.jetbrains.plugins.vue (211.6693.111), org.jetbrains.kotlin (211-1.5.0-release-759-IJ6693.72), JRebelPlugin (2022.2.1), cn.yiiguxing.plugin.translate (3.3.1-203u212.patch.1), com.baomidou.plugin.idea.mybatisx (1.5.4) Kotlin: 211-1.5.0-release-759-IJ6693.72

    Describe the bug A clear and concise description of what the bug is.

    IMG20220608095252

    我在下述代码块里面,右键 ctrl+m 是灰色的,无法点击(如图所示)

    public class Convert {
        public FileNameUrlV2 convert(FileNameUrl fileNameUrl){
            FileNameUrlV2 fileNameUrlV2 = new FileNameUrlV2();
            
            return fileNameUrlV2;
        }
    }
    
    
    public class FileNameUrl {
        private String fileName;
        private String url;
    
        public String getFileName() {
            return fileName;
        }
    
        public void setFileName(String fileName) {
            this.fileName = fileName;
        }
    
        public String getUrl() {
            return url;
        }
    
        public void setUrl(String url) {
            this.url = url;
        }
    }
    
    public class FileNameUrlV2 {
        private String fileName;
        private String url;
    
        public String getFileName() {
            return fileName;
        }
    
        public void setFileName(String fileName) {
            this.fileName = fileName;
        }
    
        public String getUrl() {
            return url;
        }
    
        public void setUrl(String url) {
            this.url = url;
        }
    }
    
    
    bug 
    opened by WarriorFromLongAgo 5
  • Request support for Intellij IDEA 2022.3

    Request support for Intellij IDEA 2022.3

    IntelliJ desc

    • IntelliJ platform :
    • Version : 2022.3

    Describe the bug Plugin 'BeanMappingKey' (version '2.2') is not compatible with the current version of the IDE, because it requires build 223 or older but the current build is IU-223.7571.182

    bug 
    opened by mrmyn 3
Releases(2.5.0)
Owner
Rookie
Rookie
TypeQL plugin for JetBrains

JetBrains-Graql-Plugin Basic support for the Graql language (http://grakn.ai) Features Syntax highlighting/validation Find usages support Basic code c

TypeDB OSI 9 Feb 13, 2022
JetBrains Meta programming System

JetBrains MPS Learn Meta Programming with Us Design your own Domain Specific Language with full development environment. Get code editor with completi

JetBrains 1.4k Jan 5, 2023
A library for IDEs and Code Editors to compile java projects faster dynamically

A library for IDEs and Code Editors to compile java projects faster dynamically

omega ui 2 Feb 22, 2022
Vim emulation plugin for IDEs based on the IntelliJ Platform

IdeaVim IdeaVim is a Vim emulation plugin for IntelliJ Platform-based IDEs. Contact maintainers: Bug tracker @IdeaVim on Twitter Chat on gitter Unoffi

JetBrains 7.1k Jan 5, 2023
IntelliJ Platform plugin that shows the file name of the currently open file in the status bar.

IntelliJ Platform plugin that shows the file name of the currently open file in the status bar. Clicking shows a list of recent files.

Christoffer Hammarström 4 May 9, 2022
Tiger language plugin for IntelliJ-based IDEs (including CLion)

Tiger IDEA Tiger language plugin for IntelliJ-based IDEs (including CLion). From the marketplace Search "Tiger" in the Preferences => Plugins section

Adrien Navratil 7 Dec 15, 2022
This sample shows how to implement two-way text chat over Bluetooth between two Android devices, using all the fundamental Bluetooth API capabilities.

Zenitsu-Bluetooth Chat Application This sample shows how to implement two-way text chat over Bluetooth between two Android devices, using all the fund

Gururaj Koni 1 Jan 16, 2022
cglib - Byte Code Generation Library is high level API to generate and transform Java byte code. It is used by AOP, testing, data access frameworks to generate dynamic proxy objects and intercept field access.

cglib Byte Code Generation Library is high level API to generate and transform JAVA byte code. It is used by AOP, testing, data access frameworks to g

Code Generation Library 4.5k Jan 8, 2023
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

JetBrains 1k Dec 14, 2022
Transactional schema-less embedded database used by JetBrains YouTrack and JetBrains Hub.

JetBrains Xodus is a transactional schema-less embedded database that is written in Java and Kotlin. It was initially developed for JetBrains YouTrack

JetBrains 858 Mar 12, 2021