JAXB%20Interview%20Questions%20and%20Answers
Question: Discuss Global Bindings attributes.Answer: • collectionType– “indexed” (uses array and provides methods to get/set elements) or fully-qualified-java-class-name(must implement java.util.List) – default is “java.util.ArrayList” • enableFailFastCheck – “true” or “false” (default) – if true, invalid property values are reported as soon as they are set, instead of waiting until validation is requested – not implemented yet in RI • generateIsSetMethod – “true” or “false” (default) – if true, generates isSet and unSet methods for the property • underscoreBinding – “asCharInWord” or “asWordSeparator” (default) – if “asWordSeparator” , underscores in XML names are removed and words are camel-cased to form Java name – for example, “gear_shift_knob” goes to “gearShiftKnob” • bindingStyle (was modelGroupAsClass) – “modelGroupBinding” or “elementBinding” (default) • choiceContentProperty – “true” or “false” (default) – allows objects to hold one of a number of property choices which may each have a different data type • enableJavaNamingConventions – “true” (default) or “false” • fixedAttributeAsConstantProperty – “true” or “false” (default) – if true, “fixed” attributes will be represented as constants • typesafeEnumBase – “xsd:string” , “xsd:decimal” , “xsd:float” , “xsd:double” or “xsd:NCName” (default) – defines field type used to represent enumerated values in generated typesafe enum class • typesafeEnumMemberName – “generateName” or “generateError” (default) – specifies what to do if an enumerated value cannot be mapped to a valid Java identifier – “generateName” generates names in the form VALUE_# – “generateError” reports an error |
Is it helpful?
Yes
No
Most helpful rated by users:
- What Is XML Binding?
- What is XML Binding Relationships?
- Please explain JAXB Use Cases.
- Why Use XML Binding?
- What are the goals of JAXB?