Skip to content
This repository was archived by the owner on Aug 26, 2021. It is now read-only.
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

@anthonycr

Description

@anthonycr

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions