{"id":18600617,"url":"https://github.com/houbb/lombok-ex","last_synced_at":"2025-04-10T18:31:27.493Z","repository":{"id":37117112,"uuid":"212491303","full_name":"houbb/lombok-ex","owner":"houbb","description":"Java compile time annotation, lombok extension framework.（java 编译时注解框架，对 lombok 进行扩展）","archived":false,"fork":false,"pushed_at":"2022-06-17T03:20:52.000Z","size":97,"stargazers_count":43,"open_issues_count":5,"forks_count":27,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T02:51:25.443Z","etag":null,"topics":["annotation","aop","asm","ast","compile-time-annotation","ex","extra","jca","jvm-sandbox","lombok"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/houbb.png","metadata":{"files":{"readme":"README-ENGLISH.md","changelog":"CHANGE_LOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-03T03:39:51.000Z","updated_at":"2024-12-21T22:51:22.000Z","dependencies_parsed_at":"2022-08-19T11:11:12.657Z","dependency_job_id":null,"html_url":"https://github.com/houbb/lombok-ex","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Flombok-ex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Flombok-ex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Flombok-ex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/houbb%2Flombok-ex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/houbb","download_url":"https://codeload.github.com/houbb/lombok-ex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248271739,"owners_count":21075800,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["annotation","aop","asm","ast","compile-time-annotation","ex","extra","jca","jvm-sandbox","lombok"],"created_at":"2024-11-07T02:04:44.866Z","updated_at":"2025-04-10T18:31:26.892Z","avatar_url":"https://github.com/houbb.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# lombok-ex\n\n\u003e [中文文档](README.md)\n\n[lombok-ex](https://github.com/houbb/lombok-ex) is a compile-time annotation framework similar to lombok.\n\nMainly add some common tools that lombok does not implement, and you will use yourself.\n\nThere is no loss in annotation performance at compile time. One annotation does everything, no third-party dependencies.\n\n[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.houbb/lombok-ex/badge.svg)](http://mvnrepository.com/artifact/com.github.houbb/lombok-ex)\n[![Build Status](https://www.travis-ci.org/houbb/lombok-ex.svg?branch=master)](https://www.travis-ci.org/houbb/lombok-ex)\n[![Coverage Status](https://coveralls.io/repos/github/houbb/lombok-ex/badge.svg?branch=master)](https://coveralls.io/github/houbb/lombok-ex?branch=master)\n\n## Creative purpose\n\n-Added missing annotations of lombok to facilitate daily development and use.\n\n-The source code of lombok is basically unreadable, it should be encrypted.\n\n-Provide a basis for improving the performance of other annotation-related frameworks, and consider replacing them with compile-time annotations later.\n\n## Features\n\n- `@Serial`\n\n- `@Util`\n\n- `@ToString`\n\n- `@Sync`\n\n- `@Modifiers`\n\n## CHANGE LOG\n\n[CHANGE LOG](CHANGE_LOG.md)\n\n# Quick Start\n\n## Require\n\njdk1.7+\n\nmaven 3.x+\n\n- enable annotation process。\n\nIf you use editor，please checked【enable annotation process】\n\n## maven import\n\n```xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.houbb\u003c/groupId\u003e\n    \u003cartifactId\u003elombok-ex\u003c/artifactId\u003e\n    \u003cversion\u003e0.0.8\u003c/version\u003e\n    \u003cscope\u003eprovided\u003c/scope\u003e\n\u003c/dependency\u003e\n```\n\n- Gradle import\n\n```\ncompile group: 'com.github.houbb', name: 'lombok-ex', version: '0.0.8'\n```\n\n# @Serial annotation\n\n- User.java\n\nWe can use `@Serial` like this:\n\n```java\npackage com.github.houbb.lombok.test.model;\n\nimport com.github.houbb.lombok.ex.annotation.Serial;\n\n@Serial\npublic class User {\n\n    private String name;\n\n    public String getName() {\n        return name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n\n}\n```\n\n## compile\n\nuse maven command\n\n```\n$   mvn clean install\n```\n\n## result\n\nsee the User.class, content is as following：\n\n```java\npackage com.github.houbb.lombok.test.model;\n\nimport java.io.Serializable;\n\npublic class User implements Serializable {\n    private static final Long serialVersionUID = 1L;\n    private String name;\n\n    public User() {\n    }\n\n    public String getName() {\n        return this.name;\n    }\n\n    public void setName(String name) {\n        this.name = name;\n    }\n}\n```\n\n# @Util annotation\n\n## usage\n\n```java\n@Util\npublic class StringUtil {\n\n    public static boolean isEmpty(final String string) {\n        return null == string || \"\".equals(string);\n    }\n\n}\n```\n\n## result\n\n```java\npublic final class StringUtil {\n    private StringUtil() {\n    }\n\n    public static boolean isEmpty(String string) {\n        return null == string || \"\".equals(string);\n    }\n}\n```\n\n# @ToString annotation\n\n## usage\n\n```java\nimport com.github.houbb.lombok.ex.annotation.ToString;\n\n@ToString\npublic class ToStringTest {\n}\n```\n\n## result\n\nps: This is dependent on FastJson, you need import it by yourself.\n\n```java\nimport com.alibaba.fastjson.JSON;\n\npublic class ToStringTest {\n    public ToStringTest() {\n    }\n\n    public String toString() {\n        return JSON.toJSONString(this);\n    }\n}\n```\n\n## Config Type\n\n`@ToString` can also config the toString() generate type.\n\n### java code\n\n```java\n@ToString(ToStringType.CONCAT)\npublic class ToStringConcatTest {\n\n    private String name;\n\n    private int age;\n\n    private int[] ints;\n\n}\n```\n\n### class result\n\n```java\nimport java.util.Arrays;\n\npublic class ToStringConcatTest {\n    private String name;\n    private int age;\n    private int[] ints;\n\n    public ToStringConcatTest() {\n    }\n\n    public String toString() {\n        return \"ToStringConcatTest{name=\" + this.name + \", age=\" + this.age + \", ints=\" + Arrays.toString(this.ints) + \"}\";\n    }\n}\n```\n\n# @Sync\n\n## Usage\n\n```java\n@Sync\npublic void syncTest() {\n    System.out.println(\"sync\");\n}\n```\n\n## result\n\n```java\npublic synchronized void syncTest() {\n    System.out.println(\"sync\");\n}\n```\n\n# @Modifiers\n\n## Intro\n\nYou can modify the access level of classes, methods, and fields with `@Modifiers`.\n             \nThere may be no particularly good application scenarios for the time being, depending on the user's own use.\n             \nNote: Do not engage in something that is difficult to understand, as easy as possible for users to understand.\n\n## Usage\n\n`@Modifiers` has appendMode attr，default is true。\n\nIf set to false, you can directly change the modifier to the one specified by the user.\n\n```java\nimport com.github.houbb.lombok.ex.annotation.Modifiers;\nimport com.github.houbb.lombok.ex.constant.Flags;\n\n@Modifiers(Flags.FINAL)\npublic class ModifiersTest {\n\n    @Modifiers(Flags.VOLATILE)\n    private int value;\n\n    @Modifiers(Flags.SYNCHRONIZED)\n    public static void syncTest() {\n        System.out.println(\"sync\");\n    }\n\n}\n```\n\n## result\n\n```java\npublic final class ModifiersTest {\n    private volatile int value;\n\n    public ModifiersTest() {\n    }\n\n    public static synchronized void syncTest() {\n        System.out.println(\"sync\");\n    }\n}\n```\n\n# Road-map\n\n- [ ] Config and Optimize\n\n- [ ] `@AutoLog` implements\n\n- [ ] `@Equals` `@HashCode` `@EqualsAndHashCode` implements \n\n- [ ] `@NotNull` for argument check, like [valid](https://github.com/houbb/valid)\n\n- [ ] `@Async` async execute [async](https://github.com/houbb/async)\n\n- [ ] [bean-mapping](https://github.com/houbb/bean-mapping), [sensitive](https://github.com/houbb/sensitive)\n\n- [ ] AST basic framework\n\nIdea: parse the text directly through AST, and then rebuild the class file through AST combined with jdk utils.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Flombok-ex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoubb%2Flombok-ex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoubb%2Flombok-ex/lists"}