JAXB Interview Questions and Answers
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 |
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
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?