Skip to content

[FEATURE] More @Value options #3999

@Marco-Sulla

Description

@Marco-Sulla

I really love the @Value annotation. But sometimes I need to not use @ToString and @EqualsAndHashCode for recursion problems. It's tedious to deactivate fields that cause recursion; so, since 99% of times I don't need them, I'm forced to not use @Value. It's more simple.

Furthermore, I don't want the class to be final at all. I prefer to have and let the freedom to use the class as a parent class.

Usually I use this annotations for DTOs. And I need other DTOs that are identical to a base class but a bunch of fields to be able to extend the base DTO. I feel tedious to write anytime @Getter @AllArgsConstructor @FieldDefaults(makeFinal = true, level = AccessLevel.PRIVATE).

Maybe it could be something like:

@Value(toString=false, eqHash=false, isFinal=false)

PS: since all fields are final, is there any difference between using @AllArgsConstructor and RequiredArgsConstructor?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions