On this point, what are the current annotations that we can use for the
generated bean code? Just a pointer to the docs would be perfect,
thanks!

Schalk

-----Original Message-----
From: Willis Morse [mailto:[EMAIL PROTECTED] 
Sent: 24 November 2007 01:50 PM
To: [email protected]
Subject: @Nullable annotations?

This may be a crazy request, but is there any way to get the  
generated Java code to use the Jetbrains @Nullable annotations? This  
would allow compile time support for nullability contracts to be  
driven by the generated code, and not hardcoded into my handbuilt  
code that uses the generated code.

For instance, if I have a complex type that contains an element with  
minOccurs of 1 and maxOccurs of 1, then the getter for this element  
could be annotated with @NotNull to provide the contract that the  
result of this getter will never be null. Likewise, if this element  
has a minOccurs of 0 and a maxOccurs of 1, then this getter would be  
annotated with @Nullable to show that the result could be null. In  
Idea, violation of these contracts show up as red marks in the code  
editor, and will throw an exception at run time if you don't fix them.

As it stands now, my code that uses the generated classes has to  
always check for a null result, and then decide whether a null result  
is a valid condition or not based on my knowledge of this portion of  
the schema. This forces me to hardcode knowledge of the schema into  
my code.

Background:

        http://www.jetbrains.com/idea/documentation/howto.html



Thanks,
Willis Morse

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This email and all content are subject to the following disclaimer:

http://content.momentum.co.za/content/legal/disclaimer_email.htm



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to