Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.

Stag should not require compiler argument for hungarian notation #107

Open
anthonycr opened this issue May 30, 2017 · 0 comments
Open

Stag should not require compiler argument for hungarian notation #107

anthonycr opened this issue May 30, 2017 · 0 comments
Assignees

Comments

@anthonycr
Copy link
Contributor

Issue Summary

Currently, it is required to pass an argument to the annotation processor if you wish to use hungarian notation when naming your java getters an setters.

Reproduction Steps

Create the following model

@UseStag
class Test {
    private String mField;

    public void setField(String field) { ... }
    public String getField() { ... }
}

and do NOT pass the hungarian naming parameter to the annotation processor.

Expected Behavior

Ideally, you should be able to name your setters as above

Actual Behavior

You are warned that setters and getters are not found and compilation fails.

Potential solutions

  • Check for hungarian and non hungarian named methods
    • downside: namespace collisions
    • downside: potential non-determinism when both hungarian and non-hungarian names exist
    • upside: consumer doesn't have to provide compiler argument
  • Option in class level @UseStag annotation
    • downside: verbose, consumer has to provide option in every class using the naming scheme
    • upside: localized, easier to consume than compiler argument
    • upside: very deterministic

cc @kvenn

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant