All Projects → immutables → Immutables

immutables / Immutables

Licence: apache-2.0
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

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Immutables

Jsontokotlinclass
🚀 Plugin for Android Studio And IntelliJ Idea to generate Kotlin data class code from JSON text ( Json to Kotlin )
Stars: ✭ 2,438 (-19.56%)
Mutual labels:  jackson, gson
Kson
Gson TypeAdapter & Factory generator for Kotlin data classes
Stars: ✭ 90 (-97.03%)
Mutual labels:  annotation-processor, gson
Easyjson
Provides an unified JSON access API, you can adapter any JSON library to Gson, Jackson, FastJson with easyjson。 提供了一个JSON门面库,就像slf4j一样。easyjson本身不做json的操作,完全依赖于底层实现库。可以直接使用Easyjson的API,底层的JSON库随时可切换。也可以使用其中某个json的API,然后通过easyjson适配给其他的json库
Stars: ✭ 54 (-98.22%)
Mutual labels:  jackson, gson
Jsonschema2pojo
Generate Java types from JSON or JSON Schema and annotate those types for data-binding with Jackson, Gson, etc
Stars: ✭ 5,633 (+85.85%)
Mutual labels:  jackson, gson
methanol
⚗️ Lightweight HTTP extensions for Java
Stars: ✭ 172 (-94.33%)
Mutual labels:  gson, jackson
Kripton
A Java/Kotlin library for Android platform, to manage bean's persistence in SQLite, SharedPreferences, JSON, XML, Properties, Yaml, CBOR.
Stars: ✭ 110 (-96.37%)
Mutual labels:  annotation-processor, jackson
Gsonpath
A Java annotation processor library which generates gson type adapters using basic JsonPath style annotations
Stars: ✭ 54 (-98.22%)
Mutual labels:  annotation-processor, gson
jackson-dynamic-filter
An easy way to determine filters dynamically using Jackson
Stars: ✭ 35 (-98.85%)
Mutual labels:  gson, jackson
spring-rest-2-ts
spring rest 2 ts is typescript generator which produces data model and services in typescript based on Spring MVC annotations. It supports generation for Angular and React
Stars: ✭ 59 (-98.05%)
Mutual labels:  gson, jackson
Pojobuilder
A Java Code Generator for Pojo Builders
Stars: ✭ 326 (-89.24%)
Mutual labels:  builder, annotation-processor
flickr-android
A small sample app to showcase architecting app using Clean Architecture and MVVM
Stars: ✭ 25 (-99.18%)
Mutual labels:  gson, immutables
SerializedNameGen
Auto add or remove json annotation plugin, such as gson SerializedName, fastjson JSONField, jackson JsonProperty. It also support java and kotlin file.
Stars: ✭ 19 (-99.37%)
Mutual labels:  gson, jackson
constantie
A tiny JavaScript library for creation of fully immutable objects and arrays
Stars: ✭ 16 (-99.47%)
Mutual labels:  immutable-objects
BakingApp
🍛🍴 This app allows a user to select a recipe and see video-guided steps for how to complete it, showcasing MVVM, Retrofit, ExoPlayer with lifecycle components, Master/Detail Flow, Widgets.
Stars: ✭ 18 (-99.41%)
Mutual labels:  gson
database
Database SQL builder, written in Go, provides a convenient to creating and running database queries.
Stars: ✭ 26 (-99.14%)
Mutual labels:  builder
moonwlker
Jackson JSON without annotation.
Stars: ✭ 14 (-99.54%)
Mutual labels:  jackson
Jackson Dataformats Text
Uber-project for (some) standard Jackson textual format backends: csv, properties, yaml (xml to be added in future)
Stars: ✭ 258 (-91.49%)
Mutual labels:  jackson
ipapi-retrofit
Android Library for Calling IP-API using Retrofit
Stars: ✭ 47 (-98.45%)
Mutual labels:  gson
alpine-pypy
Docker-based builds for PyPy on Alpine Linux
Stars: ✭ 31 (-98.98%)
Mutual labels:  builder
SilentXMRMiner
A Silent (Hidden) Monero (XMR) Miner Builder
Stars: ✭ 417 (-86.24%)
Mutual labels:  builder

Read full documentation at http://immutables.org

CI

Modern usage style, aka "sandwich"

// Define abstract value type using interface, abstract class or annotation
@Value.Immutable
public interface ValueObject extends WithValueObject {
  // WithValueObject is not yet generated, We extend With* to inherit `with*` method signatures
  String getName();
  List<Integer> getCounts();
  Optional<String> getDescription();

  class Builder extends ImmutableValueObject.Builder {}
  // ImmutableValueObject.Builder will be generated and
  // our builder will inherit and reexport methods as it's own.
  // Static nested Builder will inherit all the public method
  // signatures of ImmutableValueObject.Builder
} 

// Use generated immutable implementation and builder
ValueObject v =
    new ValueObject.Builder()
        .name("Nameless")
        .description("present")
        .addCounts(1)
        .addCounts(2)
        .build();

v = v.withName("Doe");

//fetch values via standard getters
List<Integer> counts = v.getCounts();
Optional<String> description = v.getDescription();

ImmutableValueObject then would not be used outside of generated type. See about this and other generation styles here

License

   Copyright 2013-2021 Immutables Authors and Contributors

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.

See releases tab for release history. Archived changelog for earlier releases.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].