Annotation Interface FinalFieldsConstructor


@Target({TYPE,CONSTRUCTOR}) @GwtCompatible @Beta @Documented public @interface FinalFieldsConstructor

Creates a constructor that takes a parameter for each final field of a class.

Annotated on a class

Creates a constructor that takes all non-static, final fields of the class as an argument and assigns them to their corresponding fields. The order of arguments is the same as the order of the fields.

Annotated on a constructor

Turns that constructor into a final fields constructor as described above. This is useful for adding annotations to the constructor, e.g. for dependency injection frameworks.

Since:
2.7