Velocity
  1. Velocity
  2. VELOCITY-825

Automatically convert String method arguments to Enum when possible

    Details

    • Type: New Feature New Feature
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.7
    • Fix Version/s: None
    • Component/s: Engine
    • Labels:
      None

      Description

      Would be nice if

      $obj.someMethod('VALUE')

      would call

      obj.someMethod(SomeEnum.VALUE);

      when obj has #someMethod(SomeEnum). In other words, if no method is found for the provided arguments then see if some of the String arguments can be replaced with Enum constants.

        Activity

        Marius Dumitru Florea created issue -
        Marius Dumitru Florea made changes -
        Field Original Value New Value
        Description Would be nice if

        {noformat}
        $obj.someMethod('VALUE')
        {noformat}

        would call

        {noformat}
        obj.someMethod(SomeEnum.VALUE);
        {noformat}

        when {{obj}} has {{#someMethod(SomeEnum)}}. In other words, if no method is found for the provided arguments then see if some of the String arguments can be replaced with Enum constants.
        Would be nice if

        $obj.someMethod('VALUE')

        would call

        obj.someMethod(SomeEnum.VALUE);

        when obj has #someMethod(SomeEnum). In other words, if no method is found for the provided arguments then see if some of the String arguments can be replaced with Enum constants.

          People

          • Assignee:
            Unassigned
            Reporter:
            Marius Dumitru Florea
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development