Skip to content

Add builder-style annotation creation method #4

@thecodewarrior

Description

@thecodewarrior

Currently the two annotation creation methods accessible from java take pairs and a map as parameters. A much more convenient version could be done with a builder style:

Contract contractAnnotation = Mirror.newAnnotation(Contract.class,
    new Pair<>("value", "_, null -> null"),
    new Pair<>("pure", true)
);
// vs
Contract contractAnnotation = Mirror.newAnnotation(Contract.class)
    .set("value", "_, null -> null")
    .set("pure", true)
    .build();

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions