Uploaded image for project: 'Tamaya'
  1. Tamaya
  2. TAMAYA-74

Support for type narrowing

    XMLWordPrintableJSON

    Details

    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Implemented
    • Affects Version/s: 0.1-incubating
    • Fix Version/s: 0.1-incubating
    • Component/s: Core
    • Labels:
      None

      Description

      Tamays should support type narrowing. Currently a user of Tamaya can only specify the concrete target type when getting a property value as object value.

      I would like to see support for type narrowing in Tamaya to according to these rules:

      Given an interface or abstract class A and a class B implementing or inheriting from A. If a user requests a property of type A Tamaya should be able to determine that B is a valid return value for this request and return an instance of B.

      Given an interface or abstract class A and two classes B and C implementing or inheriting from A. If a user requests a property of type A Tamays should be able to determine that B and C are valid return values for this request and return an instance of B or C.

        Attachments

          Activity

            People

            • Assignee:
              anatole Anatole Tresch
              Reporter:
              o.b.fischer Oliver B. Fischer
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: