Details

    • Issuezilla Id:
      448

      Description

      JAXB doesn't support a 'code-to-interfaces' approach when it comes to id
      references (i.e. @XmlIDREF), because a property on a class annotated with
      @XmlIDREF and @XmlAttribute can only refer to a class, but not an interface.
      The following does not work:

      @XmlIDREF
      @XmlAttribute
      public MyInterface getMyInterface() { //this is an interface
      return myInterface;
      }

      What's needed is an equivalent to @XmlElementRef (e.g. @XmlAttributeRef) for
      attributes, that lets you specify the allowable classes of the interface of the
      property.

      Perhaps some kind of autodetection could be possible, by looking up the single
      element in the XML file with an ID specified by the above property, and seeing
      if it's assignable to a type of 'MyInterface'.

        Activity

        There are no comments yet on this issue.

          People

          • Assignee:
            Martin Grebac
            Reporter:
            vk101
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated: