Skip to content

Add @Factory to enable static factory methods as alternate to constructors #12

@dblevins

Description

@dblevins

Factory methods must be public static.

        @Factory
        public static Address makeone(@Param("street") @Nullable final String street,
                                      @Param("city") @Nullable final String city,
                                      @Param("state") @Nullable final State state,
                                      @Param("zipcode") @Nullable final int zipcode,
                                      @Param("country") @Default("USA") final String country) {
            return new Address(street, city, state, zipcode, country);
        }

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