Skip to content

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

License

jangalinski/immutables

 
 

Repository files navigation

// Define abstract value type using interface, abstract class or annotation
@Value.Immutable
public interface ValueObject {
  String getName();
  List<Integer> getCounts();
  Optional<String> getDescription();
}
// Use generated immutable implementation and builder
ValueObject valueObject =
    ImmutableValueObject.builder()
        .name("Nameless")
        .description("present")
        .addCounts(1)
        .addCounts(2)
        .build();

Read full documentation at http://immutables.org

Changelog

Build Status

About

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

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%