Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-2152

FactoryService (API): remove 'm' shortcut, add 'viewModel'

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.0.0
    • Component/s: None
    • Labels:
      None

      Description

      Opinionated: remove this shortcut for 'mixin', don't encourage bad code readablity, especially when the verbose variant 'mixin' is already short enough:

       

      <T> T m(Class<T> mixinClass, Object mixedIn);
      

      Add

       

       

      /**
       * Creates a new ViewModel instance, and initializes according to the given {@code mementoStr}
       * @param viewModelClass
       * @param mementoStr
       * @since 2.0
       */
      <T> T viewModel(Class<T> viewModelClass, @Nullable String mementoStr);
      

      However, I'm not entirely sure whether its a good idea to expose the mementoStr with the API that way.

       

       

        Attachments

          Activity

            People

            • Assignee:
              hobrom Andi Huber
              Reporter:
              hobrom Andi Huber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: