Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Java annotation processor to create immutable objects and builders. Sweeps boilerplate code under the rug since 2013!

License

NotificationsYou must be signed in to change notification settings

immutables/immutables

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Read full documentation athttp://immutables.org

CI

Modern usage style, aka "sandwich"

// Define abstract value type using interface, abstract class or annotation@Value.ImmutablepublicinterfaceValueObjectextendsWithValueObject {// WithValueObject is not yet generated, We extend With* to inherit `with*` method signaturesStringname();List<Integer>counts();Optional<String>description();classBuilderextendsImmutableValueObject.Builder {}// ImmutableValueObject.Builder will be generated and// our builder will inherit and reexport methods as its own.// Static nested Builder will inherit all the public method// signatures of ImmutableValueObject.Builder}// Use generated immutable implementation and builderValueObjectv =newValueObject.Builder()        .name("Nameless")        .description("present")        .addCounts(1)        .addCounts(2)        .build();v =v.withName("Doe");//fetch values via accessorsList<Integer>counts =v.counts();Optional<String>description =v.description();

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

Seereleases tab for release history. Archivedchangelog for earlier releases.

About

Java annotation processor to create immutable objects and builders. Sweeps boilerplate code under the rug since 2013!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors80

Languages


[8]ページ先頭

©2009-2025 Movatter.jp