Hi folks,

I'm new to Castor.  Everything works well, but something confuses me.  I
have defined a Castor Map for use in Marshalling and Unmarshalling.  I have
a class like...

MyClass
{
   private String myString;
   private Object myObject;

   public void setMyString(String str) {...}
   public void setMyObject(Object obj) {...}
}

I set a breakpoint in both setters (using Eclipse).

The object is successfully created from an xml string. However, only the
setter breakpoint for 'MyString' is hit. Not for 'MyObject'.  This means
that any logic I require run when calling the setters (such as logging) does
not occur.

Am I right in assuming that Castor is calling the setter for simple types,
but uses reflection to set object types?  Is this any way to configure
Castor not to do this and to always call the setter so my 'setter' logic is
run? I have tried direct="false" on the field element, but to no avail.

Advice is appreciated.
Thanks in advance,
JB.
-- 
View this message in context: 
http://www.nabble.com/Castor-does-not-call-setter-when-method-parameter-is-object--tp22294300p22294300.html
Sent from the Castor - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to