Giter VIP home page Giter VIP logo

bulletproof's People

Contributors

tvinke avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

koaben

bulletproof's Issues

Feature idea: annotation to add setters to ValueObject that return new immutable object

Just read your post on Java Code Geeks.

In my own code, I designed an immutable class not using the @Immutable annotation because I didn't think it allowed one to add setters to an immutable object:

public class Person {
   String name;
   int age;

   // setter
   Person setName(String newName) {
      new Person(newName, age)
   }

Would you be interested in adding these "immutable setters" (not sure what else to call them) or some Groovy counterpart to @ValueObject? Or perhaps adding another annotation that combines ValueObject with this idea? I would roll my own annotation, but I haven't yet learned how to do that myself.

Rename @Value to @ValueObject

I got a comment from @daviddawson on the Groovy Slack channel that

purely from an from an API usage point of view, @Value seems like a generic term, I wouldn't know what it meant if I came across that in code.

May be @Value should be renamed to @ValueObject, inspite of being inspired by Lombok similarly-named annotation, to clearly indicate it's role.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.