Hi Steve,

http://castor.org/srcgen-properties.html#Maps-java-primitive-types-to-wrapper-object

should have all the relevant information.

Werner

Stephen More wrote:
> On Tue, May 13, 2008 at 4:01 AM, Werner Guttmann <wern....net> wrote:
>>  if you happen to be using primitive types, Castor has to somehow know
>>  whether a value has been set upon unmarshalling or not. If you use
>>  primitive wrappers, null values can be set and those _has_* members are
>>  not needed.
>>
>>  In other words, there's no switch to turn generation of these members
>>  off (as it would break functionality for primitive members).
> 
> How can I use a primitive wrapper ?
> 
> -Steve More
> 
>>  Stephen More wrote:
>>  > I am just getting started using the castor-maven-plugin to create java
>>  > beans from XML.
>>  >
>>  > <xsd:sequence>
>>  >             <xsd:element name="id" type="xsd:int"/>
>>  > </xsd:sequence>
>>  >
>>  > will create 2 fields in the bean:
>>  >
>>  >      /**
>>  >      * Field _id.
>>  >      */
>>  >     private int _id;
>>  >
>>  >     /**
>>  >      * keeps track of state for field: _id
>>  >      */
>>  >     private boolean _has_id;
>>  >
>>  > Is there anyway I can prevent it from generating the state field ?
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 


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

    http://xircles.codehaus.org/manage_email


Reply via email to