Uploaded image for project: 'HiveMind'
  1. HiveMind
  2. HIVEMIND-87

object translator: optionally, specify interface

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • framework
    • None

    Description

      It is very commonly the case when using the object translator that the object must be assignable to a particular interface (or extend a particular class). In most cases, the value obtained will be injected into a property of an object and a ClassCastException will occur that will (hopefully) identify the invalid contribution.

      In some cases, the object may go into some form of untyped collection, causing a class cast exception at a later point.

      It would be nice if the object translator could enforce an assignability check directly, ie.

      <attribute name="object" translator="object:java.lang.Runnable"/>

      Attachments

        Activity

          People

            Unassigned Unassigned
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated: