JiBX
  1. JiBX
  2. JIBX-96

add an user-object to the IUnmarshallingContext class

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JiBX 1.1 beta4
    • Component/s: core
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The class IUnmarshallingContext should get a user object that can be used by factory methods to pre-initialize an object.

      Suggested interface:
      public Object getUserObject();
      public void setUserObject(Object obj);

      This object can then be stored in the context before starting unmarshalling and is then accessible by all factories.

        Activity

        Hide
        Dennis Sosnoski added a comment -

        That's an interesting suggestion, since user methods often need a context of some form. I work around this when unmarshalling the actual binding definitions by using a wrapper class for the root object which includes the context information, but a simple getUserContext/setUserContext would definitely be easier.

        Show
        Dennis Sosnoski added a comment - That's an interesting suggestion, since user methods often need a context of some form. I work around this when unmarshalling the actual binding definitions by using a wrapper class for the root object which includes the context information, but a simple getUserContext/setUserContext would definitely be easier.
        Hide
        Dennis Sosnoski added a comment -

        Added getUserContext()/setUserContext() methods to both the marshalling and unmarshalling contexts.

        Show
        Dennis Sosnoski added a comment - Added getUserContext()/setUserContext() methods to both the marshalling and unmarshalling contexts.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Matthias Mann
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: