Uploaded image for project: 'WINDUP - Red Hat Application Migration Toolkit'
  1. WINDUP - Red Hat Application Migration Toolkit
  2. WINDUP-184

Unify the way to define Models' property name constants.

XMLWordPrintable

    • Icon: Task Task
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0.0.Beta3
    • None
    • None
    • None
    • None

      Based on Lincoln's comments in https://github.com/windup/windup/pull/147 .

      We should standardize the way how to declare the names of Models' properties.

      I suggest adding an enum or public inner interface Props.

           public interface {
                  public static final String FOO;  // or "foo"? Would match the actual value.
           }
      

      or

           public enum Props {
                 ... (constructor - disadvantage)
                 CLASS("class");
           }
      

      Probably rather interface, we could share some common properties across otherwise unrelated models.

      This

      1) will keep the constants in one place,

      2) will keep it clear that they are all property names,

      3) will prevent verbosity, since users can just type CLASS and the ide will "import static" it.

      On the other hand, this is not important at all, just a weekend thought

              Unassigned Unassigned
              ozizka_jira Ondrej Zizka (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: