Package org.jibx.binding.def
Class BindingBuilder
- java.lang.Object
-
- org.jibx.binding.def.BindingBuilder
-
public abstract class BindingBuilder extends java.lang.ObjectBinding definition builder. This processes the binding definition file to generate the code generation structure.- Author:
- Dennis M. Sosnoski
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) static classBindingBuilder.ContainerBaseBase class for containers.
-
Field Summary
Fields Modifier and Type Field Description (package private) static intACC_PACKAGE(package private) static intACC_PRIVATE(package private) static intACC_PROTECTED(package private) static intACC_PUBLICprivate static java.lang.String[]ACCESS_LEVEL_NAMESprivate static int[]ACCESS_LEVEL_NUMSprivate static java.lang.String[]AUTO_LINK_NAMESprivate static int[]AUTO_LINK_NUMSprivate static java.lang.StringBINDING_ADDprivate static java.lang.StringBINDING_DIRECTIONprivate static java.lang.StringBINDING_ELEMENTDefinitions for "binding" element use "BINDING" prefix.private static java.lang.StringBINDING_FORCEprivate static java.lang.StringBINDING_FORWARDSprivate static java.lang.StringBINDING_GLOBALIDprivate static java.lang.StringBINDING_MAJORVERprivate static java.lang.StringBINDING_MINORVERprivate static java.lang.StringBINDING_NAMEprivate static java.lang.StringBINDING_PACKAGEprivate static java.lang.StringBINDING_TRACKINGprivate static java.lang.StringBINDING_TRIMprivate static java.lang.String[]BINDINGDIR_NAMESprivate static int[]BINDINGDIR_NUMSprivate static java.lang.StringCOLLECTION_ADDMETHODprivate static java.lang.StringCOLLECTION_ELEMENTDefinitions for "collection" element use "COLLECTION" prefix.private static java.lang.StringCOLLECTION_ITEMTYPEprivate static java.lang.StringCOLLECTION_ITERMETHODprivate static java.lang.StringCOLLECTION_LOADMETHODprivate static java.lang.StringCOLLECTION_SIZEMETHODprivate static java.lang.StringCOLLECTION_STOREMETHODprivate static java.lang.StringCOMMON_ACCESSLEVELprivate static java.lang.StringCOMMON_AUTOLINKprivate static java.lang.StringCOMMON_CHOICEprivate static java.lang.StringCOMMON_CREATETYPEprivate static java.lang.StringCOMMON_DEFAULTprivate static java.lang.StringCOMMON_DESERIALIZERprivate static java.lang.StringCOMMON_DUPLICATESprivate static java.lang.StringCOMMON_ENUMVALUEMETHODprivate static java.lang.StringCOMMON_FACTORYprivate static java.lang.StringCOMMON_FIELDprivate static java.lang.StringCOMMON_FLAGMETHODprivate static java.lang.StringCOMMON_FLEXIBLEprivate static java.lang.StringCOMMON_GETMETHODprivate static java.lang.StringCOMMON_LABELprivate static java.lang.StringCOMMON_MARSHALLERprivate static java.lang.StringCOMMON_NAMEprivate static java.lang.StringCOMMON_NAMESPACEprivate static java.lang.StringCOMMON_NAMESTYLEprivate static java.lang.StringCOMMON_NILLABLEprivate static java.lang.StringCOMMON_ORDEREDprivate static java.lang.StringCOMMON_POSTSETprivate static java.lang.StringCOMMON_PREGETprivate static java.lang.StringCOMMON_PRESETprivate static java.lang.StringCOMMON_SERIALIZERprivate static java.lang.StringCOMMON_SETMETHODprivate static java.lang.StringCOMMON_STRIPPREFIXprivate static java.lang.StringCOMMON_STRIPSUFFIXprivate static java.lang.StringCOMMON_STYLEprivate static java.lang.StringCOMMON_TESTMETHODprivate static java.lang.StringCOMMON_TYPEprivate static java.lang.StringCOMMON_UNMARSHALLERprivate static java.lang.StringCOMMON_USAGEprivate static java.lang.StringCOMMON_USINGprivate static java.lang.StringCOMMON_WHITESPACEprivate static java.lang.String[]COMPONENT_OBJECT_NAMESprivate static java.lang.String[]COMPONENT_OBJECT_NAMESPACESprivate static java.lang.String[]CONTAINING_STYLE_NAMESprivate static int[]CONTAINING_STYLE_NUMSprivate static java.lang.StringCUSTOM_ENUM_DESERIALIZER_NAMEprivate static java.lang.StringCUSTOM_ENUM_SERIALIZER_NAMEprivate static intDIRECTION_BOTHprivate static intDIRECTION_INPUTprivate static intDIRECTION_OUTPUTprivate static java.lang.StringFORMAT_ELEMENTDefinitions for "format" element use "FORMAT" prefix.private static java.lang.StringFORMAT_NAMEprivate static java.lang.StringFORMAT_TYPEprivate static java.lang.String[]IDENTTYPE_NAMESprivate static int[]IDENTTYPE_NUMSprivate static java.lang.StringINCLUDE_ELEMENTDefinitions for "include" element use "INCLUDE" prefix.private static java.lang.StringINCLUDE_PATHprivate static java.lang.StringINCLUDE_PRECOMPILED(package private) static intLINK_FIELDS(package private) static intLINK_METHODS(package private) static intLINK_NONEprivate static java.lang.StringMAPPING_ABSTRACTprivate static java.lang.StringMAPPING_CLASSprivate static java.lang.StringMAPPING_ELEMENTDefinitions for "mapping" element use "MAPPING" prefix.private static java.lang.StringMAPPING_EXTENDSprivate static java.lang.StringMAPPING_TYPENAMEprivate static java.lang.StringMARSHALLER_INTERFACEprivate static java.lang.StringMARSHALLER_INTERFACETYPEprivate static java.lang.String[]NAME_GENERATE_NAMESprivate static int[]NAME_GENERATE_NUMS(package private) static intNAME_HYPHENS(package private) static intNAME_MIXEDprivate static java.lang.StringNAMESPACE_DEFAULTprivate static java.lang.StringNAMESPACE_ELEMENTDefinitions for "namespace" element use "NAMESPACE" prefix.private static java.lang.StringNAMESPACE_PREFIXprivate static java.lang.StringNAMESPACE_URIprivate static java.lang.String[]NAMESPACEACCESS_NAMESprivate static int[]NAMESPACEACCESS_NUMSprivate static java.lang.StringSTRUCTURE_ELEMENTDefinitions for "structure" element use "STRUCTURE" prefix.private static java.lang.StringSTRUCTURE_MAPASprivate static java.lang.StringUNMARSHALLER_INTERFACEprivate static java.lang.StringUNMARSHALLER_INTERFACETYPEprivate static java.lang.StringURI_ATTRIBUTESAttribute namespace used for binding definition file.private static java.lang.StringURI_ELEMENTSElement namespace used for binding definition file.private static java.lang.StringUSAGE_OPTIONALprivate static java.lang.StringUSAGE_REQUIREDprivate static java.lang.StringVALUE_CONSTANTprivate static java.lang.StringVALUE_ELEMENTDefinitions for "value" element use "VALUE" prefix.private static java.lang.StringVALUE_FORMATprivate static java.lang.StringVALUE_IDENTprivate static java.lang.StringVALUE_STYLEprivate static java.lang.String[]VALUE_STYLE_NAMESprivate static int[]VALUE_STYLE_NUMS
-
Constructor Summary
Constructors Constructor Description BindingBuilder()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static voidbuildEnumDeserializeMethod(java.lang.String type, java.lang.String typesig, java.lang.String evfull, ExceptionMethodBuilder dmeth)Fill in the body of an enum deserialization method.private static voidbuildEnumSerializeMethod(java.lang.String evfull, ExceptionMethodBuilder smeth)Fill in the body of an enum serialization method.private static voidbuildEnumValueMethods(boolean exists, java.lang.String type, java.lang.String evmeth)Add (or verify) serializer and deserializer methods to enum class with special value method.private static booleanisDirectObject(UnmarshallingContext ctx)Check if attributes define a direct object reference.private static booleanisMappingRef(UnmarshallingContext ctx)Check if attributes define a mapping reference.private static booleanisNamePresent(UnmarshallingContext ctx)Check if attributes supply a name definition.private static booleanisObjectBinding(UnmarshallingContext ctx)Check for component object present.private static booleanisOptionalProperty(UnmarshallingContext ctx)Check for optional property.private static booleanisPropertyPresent(UnmarshallingContext ctx)Check for property definition present.private static voidpreserveMethodClass(java.lang.String name)Force the class containing a method to be preserved from modification.static BindingDefinitionunmarshalBindingDefinition(UnmarshallingContext ctx, java.lang.String name, java.net.URL root)Unmarshal binding definition.private static DirectObjectunmarshalDirectObj(UnmarshallingContext ctx, java.lang.String type, IContainer parent, DefinitionContext defc, java.lang.String mapname, NameDefinition name)Unmarshal direct object component.private static voidunmarshalFormats(UnmarshallingContext ctx, boolean exists, DefinitionContext defc)Unmarshal format definitions.static voidunmarshalInclude(UnmarshallingContext ctx, boolean precomp, BindingDefinition bdef, java.net.URL root, java.util.ArrayList nslist, java.util.HashSet paths, IBindingFactory factory, int[] nsxlate)Unmarshal included binding.static IMappingunmarshalMapping(UnmarshallingContext ctx, IContainer parent, java.util.ArrayList nss, boolean uord)Unmarshal mapping definition.private static IComponentunmarshalMappingRef(UnmarshallingContext ctx, IContainer parent, IContextObj objc, PropertyDefinition prop, NameDefinition name)Unmarshal mapping reference component.private static voidunmarshalMappings(UnmarshallingContext ctx, IContainer parent, java.util.ArrayList nss, boolean uord)Unmarshal mapping definitions.private static NameDefinitionunmarshalName(UnmarshallingContext ctx, boolean attr)Unmarshal name definition.private static NamespaceDefinitionunmarshalNamespace(UnmarshallingContext ctx)Unmarshal namespace definition.private static voidunmarshalNamespaces(UnmarshallingContext ctx, DefinitionContext defc)Unmarshal namespace definitions.private static ObjectBindingunmarshalObjectBinding(UnmarshallingContext ctx, IContextObj objc, IContainer parent, java.lang.String type)Unmarshal object binding component.private static voidunmarshalPrecompiledMappings(UnmarshallingContext ctx, IBindingFactory factory, IContainer parent, int[] nsxlate)Unmarshal precompiled mapping definitions.private static PropertyDefinitionunmarshalProperty(UnmarshallingContext ctx, IContainer parent, IContextObj cobj, boolean opt)Unmarshal property definition.private static StringConversionunmarshalStringConversion(UnmarshallingContext ctx, boolean exists, StringConversion base, java.lang.String type)Unmarshal string conversion.static IComponentunmarshalStructure(UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic)Unmarshal subclass instance for structure definition.private static voidunmarshalStructureChildren(UnmarshallingContext ctx, NestedBase nest, IContextObj objc, boolean impl, java.lang.String itype)Unmarshal child bindings for a nested structure definition.private static IComponentunmarshalStructureRef(UnmarshallingContext ctx, IContainer contain, NameDefinition name, PropertyDefinition prop, IContextObj cobj)Unmarshal structure reference component.private static ValueChildunmarshalValue(UnmarshallingContext ctx, IContainer parent, IContextObj cobj, boolean uord, boolean impl, java.lang.String itype)Unmarshal value definition.
-
-
-
Field Detail
-
URI_ELEMENTS
private static final java.lang.String URI_ELEMENTS
Element namespace used for binding definition file.
-
URI_ATTRIBUTES
private static final java.lang.String URI_ATTRIBUTES
Attribute namespace used for binding definition file.
-
COMMON_STYLE
private static final java.lang.String COMMON_STYLE
- See Also:
- Constant Field Values
-
COMMON_AUTOLINK
private static final java.lang.String COMMON_AUTOLINK
- See Also:
- Constant Field Values
-
COMMON_ACCESSLEVEL
private static final java.lang.String COMMON_ACCESSLEVEL
- See Also:
- Constant Field Values
-
COMMON_STRIPPREFIX
private static final java.lang.String COMMON_STRIPPREFIX
- See Also:
- Constant Field Values
-
COMMON_STRIPSUFFIX
private static final java.lang.String COMMON_STRIPSUFFIX
- See Also:
- Constant Field Values
-
COMMON_NAMESTYLE
private static final java.lang.String COMMON_NAMESTYLE
- See Also:
- Constant Field Values
-
COMMON_NAME
private static final java.lang.String COMMON_NAME
- See Also:
- Constant Field Values
-
COMMON_NAMESPACE
private static final java.lang.String COMMON_NAMESPACE
- See Also:
- Constant Field Values
-
COMMON_FACTORY
private static final java.lang.String COMMON_FACTORY
- See Also:
- Constant Field Values
-
COMMON_PRESET
private static final java.lang.String COMMON_PRESET
- See Also:
- Constant Field Values
-
COMMON_POSTSET
private static final java.lang.String COMMON_POSTSET
- See Also:
- Constant Field Values
-
COMMON_PREGET
private static final java.lang.String COMMON_PREGET
- See Also:
- Constant Field Values
-
COMMON_MARSHALLER
private static final java.lang.String COMMON_MARSHALLER
- See Also:
- Constant Field Values
-
COMMON_UNMARSHALLER
private static final java.lang.String COMMON_UNMARSHALLER
- See Also:
- Constant Field Values
-
COMMON_CREATETYPE
private static final java.lang.String COMMON_CREATETYPE
- See Also:
- Constant Field Values
-
COMMON_FIELD
private static final java.lang.String COMMON_FIELD
- See Also:
- Constant Field Values
-
COMMON_TYPE
private static final java.lang.String COMMON_TYPE
- See Also:
- Constant Field Values
-
COMMON_USAGE
private static final java.lang.String COMMON_USAGE
- See Also:
- Constant Field Values
-
COMMON_TESTMETHOD
private static final java.lang.String COMMON_TESTMETHOD
- See Also:
- Constant Field Values
-
COMMON_GETMETHOD
private static final java.lang.String COMMON_GETMETHOD
- See Also:
- Constant Field Values
-
COMMON_SETMETHOD
private static final java.lang.String COMMON_SETMETHOD
- See Also:
- Constant Field Values
-
COMMON_FLAGMETHOD
private static final java.lang.String COMMON_FLAGMETHOD
- See Also:
- Constant Field Values
-
COMMON_DEFAULT
private static final java.lang.String COMMON_DEFAULT
- See Also:
- Constant Field Values
-
COMMON_SERIALIZER
private static final java.lang.String COMMON_SERIALIZER
- See Also:
- Constant Field Values
-
COMMON_WHITESPACE
private static final java.lang.String COMMON_WHITESPACE
- See Also:
- Constant Field Values
-
COMMON_DESERIALIZER
private static final java.lang.String COMMON_DESERIALIZER
- See Also:
- Constant Field Values
-
COMMON_ENUMVALUEMETHOD
private static final java.lang.String COMMON_ENUMVALUEMETHOD
- See Also:
- Constant Field Values
-
COMMON_LABEL
private static final java.lang.String COMMON_LABEL
- See Also:
- Constant Field Values
-
COMMON_USING
private static final java.lang.String COMMON_USING
- See Also:
- Constant Field Values
-
COMMON_ORDERED
private static final java.lang.String COMMON_ORDERED
- See Also:
- Constant Field Values
-
COMMON_CHOICE
private static final java.lang.String COMMON_CHOICE
- See Also:
- Constant Field Values
-
COMMON_FLEXIBLE
private static final java.lang.String COMMON_FLEXIBLE
- See Also:
- Constant Field Values
-
COMMON_DUPLICATES
private static final java.lang.String COMMON_DUPLICATES
- See Also:
- Constant Field Values
-
COMMON_NILLABLE
private static final java.lang.String COMMON_NILLABLE
- See Also:
- Constant Field Values
-
BINDING_ELEMENT
private static final java.lang.String BINDING_ELEMENT
Definitions for "binding" element use "BINDING" prefix.- See Also:
- Constant Field Values
-
BINDING_NAME
private static final java.lang.String BINDING_NAME
- See Also:
- Constant Field Values
-
BINDING_DIRECTION
private static final java.lang.String BINDING_DIRECTION
- See Also:
- Constant Field Values
-
BINDING_GLOBALID
private static final java.lang.String BINDING_GLOBALID
- See Also:
- Constant Field Values
-
BINDING_FORWARDS
private static final java.lang.String BINDING_FORWARDS
- See Also:
- Constant Field Values
-
BINDING_PACKAGE
private static final java.lang.String BINDING_PACKAGE
- See Also:
- Constant Field Values
-
BINDING_TRACKING
private static final java.lang.String BINDING_TRACKING
- See Also:
- Constant Field Values
-
BINDING_FORCE
private static final java.lang.String BINDING_FORCE
- See Also:
- Constant Field Values
-
BINDING_ADD
private static final java.lang.String BINDING_ADD
- See Also:
- Constant Field Values
-
BINDING_TRIM
private static final java.lang.String BINDING_TRIM
- See Also:
- Constant Field Values
-
BINDING_MAJORVER
private static final java.lang.String BINDING_MAJORVER
- See Also:
- Constant Field Values
-
BINDING_MINORVER
private static final java.lang.String BINDING_MINORVER
- See Also:
- Constant Field Values
-
NAMESPACE_ELEMENT
private static final java.lang.String NAMESPACE_ELEMENT
Definitions for "namespace" element use "NAMESPACE" prefix.- See Also:
- Constant Field Values
-
NAMESPACE_URI
private static final java.lang.String NAMESPACE_URI
- See Also:
- Constant Field Values
-
NAMESPACE_PREFIX
private static final java.lang.String NAMESPACE_PREFIX
- See Also:
- Constant Field Values
-
NAMESPACE_DEFAULT
private static final java.lang.String NAMESPACE_DEFAULT
- See Also:
- Constant Field Values
-
FORMAT_ELEMENT
private static final java.lang.String FORMAT_ELEMENT
Definitions for "format" element use "FORMAT" prefix.- See Also:
- Constant Field Values
-
FORMAT_NAME
private static final java.lang.String FORMAT_NAME
- See Also:
- Constant Field Values
-
FORMAT_TYPE
private static final java.lang.String FORMAT_TYPE
- See Also:
- Constant Field Values
-
MAPPING_ELEMENT
private static final java.lang.String MAPPING_ELEMENT
Definitions for "mapping" element use "MAPPING" prefix.- See Also:
- Constant Field Values
-
MAPPING_CLASS
private static final java.lang.String MAPPING_CLASS
- See Also:
- Constant Field Values
-
MAPPING_ABSTRACT
private static final java.lang.String MAPPING_ABSTRACT
- See Also:
- Constant Field Values
-
MAPPING_EXTENDS
private static final java.lang.String MAPPING_EXTENDS
- See Also:
- Constant Field Values
-
MAPPING_TYPENAME
private static final java.lang.String MAPPING_TYPENAME
- See Also:
- Constant Field Values
-
VALUE_ELEMENT
private static final java.lang.String VALUE_ELEMENT
Definitions for "value" element use "VALUE" prefix.- See Also:
- Constant Field Values
-
VALUE_STYLE
private static final java.lang.String VALUE_STYLE
- See Also:
- Constant Field Values
-
VALUE_FORMAT
private static final java.lang.String VALUE_FORMAT
- See Also:
- Constant Field Values
-
VALUE_CONSTANT
private static final java.lang.String VALUE_CONSTANT
- See Also:
- Constant Field Values
-
VALUE_IDENT
private static final java.lang.String VALUE_IDENT
- See Also:
- Constant Field Values
-
STRUCTURE_ELEMENT
private static final java.lang.String STRUCTURE_ELEMENT
Definitions for "structure" element use "STRUCTURE" prefix.- See Also:
- Constant Field Values
-
STRUCTURE_MAPAS
private static final java.lang.String STRUCTURE_MAPAS
- See Also:
- Constant Field Values
-
COLLECTION_ELEMENT
private static final java.lang.String COLLECTION_ELEMENT
Definitions for "collection" element use "COLLECTION" prefix.- See Also:
- Constant Field Values
-
COLLECTION_LOADMETHOD
private static final java.lang.String COLLECTION_LOADMETHOD
- See Also:
- Constant Field Values
-
COLLECTION_SIZEMETHOD
private static final java.lang.String COLLECTION_SIZEMETHOD
- See Also:
- Constant Field Values
-
COLLECTION_STOREMETHOD
private static final java.lang.String COLLECTION_STOREMETHOD
- See Also:
- Constant Field Values
-
COLLECTION_ADDMETHOD
private static final java.lang.String COLLECTION_ADDMETHOD
- See Also:
- Constant Field Values
-
COLLECTION_ITERMETHOD
private static final java.lang.String COLLECTION_ITERMETHOD
- See Also:
- Constant Field Values
-
COLLECTION_ITEMTYPE
private static final java.lang.String COLLECTION_ITEMTYPE
- See Also:
- Constant Field Values
-
INCLUDE_ELEMENT
private static final java.lang.String INCLUDE_ELEMENT
Definitions for "include" element use "INCLUDE" prefix.- See Also:
- Constant Field Values
-
INCLUDE_PATH
private static final java.lang.String INCLUDE_PATH
- See Also:
- Constant Field Values
-
INCLUDE_PRECOMPILED
private static final java.lang.String INCLUDE_PRECOMPILED
- See Also:
- Constant Field Values
-
VALUE_STYLE_NAMES
private static final java.lang.String[] VALUE_STYLE_NAMES
-
VALUE_STYLE_NUMS
private static final int[] VALUE_STYLE_NUMS
-
CONTAINING_STYLE_NAMES
private static final java.lang.String[] CONTAINING_STYLE_NAMES
-
CONTAINING_STYLE_NUMS
private static final int[] CONTAINING_STYLE_NUMS
-
LINK_NONE
static final int LINK_NONE
- See Also:
- Constant Field Values
-
LINK_FIELDS
static final int LINK_FIELDS
- See Also:
- Constant Field Values
-
LINK_METHODS
static final int LINK_METHODS
- See Also:
- Constant Field Values
-
AUTO_LINK_NAMES
private static final java.lang.String[] AUTO_LINK_NAMES
-
AUTO_LINK_NUMS
private static final int[] AUTO_LINK_NUMS
-
ACC_PRIVATE
static final int ACC_PRIVATE
- See Also:
- Constant Field Values
-
ACC_PACKAGE
static final int ACC_PACKAGE
- See Also:
- Constant Field Values
-
ACC_PROTECTED
static final int ACC_PROTECTED
- See Also:
- Constant Field Values
-
ACC_PUBLIC
static final int ACC_PUBLIC
- See Also:
- Constant Field Values
-
ACCESS_LEVEL_NAMES
private static final java.lang.String[] ACCESS_LEVEL_NAMES
-
ACCESS_LEVEL_NUMS
private static final int[] ACCESS_LEVEL_NUMS
-
NAME_HYPHENS
static final int NAME_HYPHENS
- See Also:
- Constant Field Values
-
NAME_MIXED
static final int NAME_MIXED
- See Also:
- Constant Field Values
-
NAME_GENERATE_NAMES
private static final java.lang.String[] NAME_GENERATE_NAMES
-
NAME_GENERATE_NUMS
private static final int[] NAME_GENERATE_NUMS
-
COMPONENT_OBJECT_NAMESPACES
private static final java.lang.String[] COMPONENT_OBJECT_NAMESPACES
-
COMPONENT_OBJECT_NAMES
private static final java.lang.String[] COMPONENT_OBJECT_NAMES
-
NAMESPACEACCESS_NAMES
private static final java.lang.String[] NAMESPACEACCESS_NAMES
-
NAMESPACEACCESS_NUMS
private static final int[] NAMESPACEACCESS_NUMS
-
IDENTTYPE_NAMES
private static final java.lang.String[] IDENTTYPE_NAMES
-
IDENTTYPE_NUMS
private static final int[] IDENTTYPE_NUMS
-
DIRECTION_INPUT
private static final int DIRECTION_INPUT
- See Also:
- Constant Field Values
-
DIRECTION_OUTPUT
private static final int DIRECTION_OUTPUT
- See Also:
- Constant Field Values
-
DIRECTION_BOTH
private static final int DIRECTION_BOTH
- See Also:
- Constant Field Values
-
BINDINGDIR_NAMES
private static final java.lang.String[] BINDINGDIR_NAMES
-
BINDINGDIR_NUMS
private static final int[] BINDINGDIR_NUMS
-
USAGE_OPTIONAL
private static final java.lang.String USAGE_OPTIONAL
- See Also:
- Constant Field Values
-
USAGE_REQUIRED
private static final java.lang.String USAGE_REQUIRED
- See Also:
- Constant Field Values
-
UNMARSHALLER_INTERFACE
private static final java.lang.String UNMARSHALLER_INTERFACE
- See Also:
- Constant Field Values
-
MARSHALLER_INTERFACE
private static final java.lang.String MARSHALLER_INTERFACE
- See Also:
- Constant Field Values
-
UNMARSHALLER_INTERFACETYPE
private static final java.lang.String UNMARSHALLER_INTERFACETYPE
- See Also:
- Constant Field Values
-
MARSHALLER_INTERFACETYPE
private static final java.lang.String MARSHALLER_INTERFACETYPE
- See Also:
- Constant Field Values
-
CUSTOM_ENUM_SERIALIZER_NAME
private static final java.lang.String CUSTOM_ENUM_SERIALIZER_NAME
- See Also:
- Constant Field Values
-
CUSTOM_ENUM_DESERIALIZER_NAME
private static final java.lang.String CUSTOM_ENUM_DESERIALIZER_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
isNamePresent
private static boolean isNamePresent(UnmarshallingContext ctx)
Check if attributes supply a name definition.- Parameters:
ctx- unmarshalling context information- Returns:
trueif attributes define a name,falseif not
-
isPropertyPresent
private static boolean isPropertyPresent(UnmarshallingContext ctx)
Check for property definition present. Just checks the attributes of the current element.- Parameters:
ctx- unmarshalling context information
-
isDirectObject
private static boolean isDirectObject(UnmarshallingContext ctx)
Check if attributes define a direct object reference. Just checks the attributes of the current element.- Parameters:
ctx- unmarshalling context information
-
isMappingRef
private static boolean isMappingRef(UnmarshallingContext ctx) throws JiBXException
Check if attributes define a mapping reference.- Parameters:
ctx- unmarshalling context information- Returns:
trueif attributes define a mapping reference,falseif not- Throws:
JiBXException- if error in unmarshalling
-
isObjectBinding
private static boolean isObjectBinding(UnmarshallingContext ctx) throws JiBXException
Check for component object present. Just checks the attributes of the current element, so this is not definitive - there may still be child binding definitions even without attributes.- Parameters:
ctx- unmarshalling context information- Throws:
JiBXException- if error in unmarshalling
-
unmarshalName
private static NameDefinition unmarshalName(UnmarshallingContext ctx, boolean attr) throws JiBXException
Unmarshal name definition. This unmarshals directly from attributes of the current element.- Parameters:
ctx- unmarshalling context informationattr- flag for attribute name definition- Throws:
JiBXException- if error in unmarshalling
-
unmarshalNamespace
private static NamespaceDefinition unmarshalNamespace(UnmarshallingContext ctx) throws JiBXException
Unmarshal namespace definition.- Parameters:
ctx- unmarshalling context information- Throws:
JiBXException- if error in unmarshalling
-
buildEnumValueMethods
private static void buildEnumValueMethods(boolean exists, java.lang.String type, java.lang.String evmeth) throws JiBXExceptionAdd (or verify) serializer and deserializer methods to enum class with special value method. This allows enums to be used even when the values present in XML are not valid Java names.- Parameters:
exists- only verify existing methods flagtype-evmeth-- Throws:
JiBXException
-
buildEnumSerializeMethod
private static void buildEnumSerializeMethod(java.lang.String evfull, ExceptionMethodBuilder smeth)Fill in the body of an enum serialization method.- Parameters:
evfull-smeth-
-
buildEnumDeserializeMethod
private static void buildEnumDeserializeMethod(java.lang.String type, java.lang.String typesig, java.lang.String evfull, ExceptionMethodBuilder dmeth)Fill in the body of an enum deserialization method.- Parameters:
type-typesig-evfull-dmeth-
-
unmarshalStringConversion
private static StringConversion unmarshalStringConversion(UnmarshallingContext ctx, boolean exists, StringConversion base, java.lang.String type) throws JiBXException
Unmarshal string conversion. Unmarshals conversion information directly from the attributes of the current start tag.- Parameters:
ctx- unmarshalling context informationexists- only verify existing methods flagbase- conversion used as base for this conversiontype- fully qualified class name of type handled by conversion- Throws:
JiBXException- if error in unmarshalling
-
isOptionalProperty
private static boolean isOptionalProperty(UnmarshallingContext ctx) throws JiBXException
Check for optional property. Just checks for the attribute and makes sure it has a valid value if present, returning either the default or the defined value.- Parameters:
ctx- unmarshalling context information- Returns:
trueif attribute present with value "true",falseotherwise- Throws:
JiBXException- if error in unmarshalling
-
unmarshalProperty
private static PropertyDefinition unmarshalProperty(UnmarshallingContext ctx, IContainer parent, IContextObj cobj, boolean opt) throws JiBXException
Unmarshal property definition. This unmarshals directly from attributes of the current element.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structurecobj- context object informationopt- force optional value flag- Throws:
JiBXException- if error in unmarshalling
-
unmarshalValue
private static ValueChild unmarshalValue(UnmarshallingContext ctx, IContainer parent, IContextObj cobj, boolean uord, boolean impl, java.lang.String itype) throws JiBXException
Unmarshal value definition. This handles the complete element supplying the value binding.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structurecobj- context object informationuord- unordered collection member flagimpl- implicit value from collection flagitype- base type for value- Throws:
JiBXException- if error in unmarshalling
-
unmarshalDirectObj
private static DirectObject unmarshalDirectObj(UnmarshallingContext ctx, java.lang.String type, IContainer parent, DefinitionContext defc, java.lang.String mapname, NameDefinition name) throws JiBXException
Unmarshal direct object component. Just constructs the component to be returned along with the supporting objects, and verifies that no disallowed properties are present.- Parameters:
ctx- unmarshalling context informationtype- fully qualified class name of object type handledparent- containing binding definition structuredefc- definition context to be used (if separate from parent, otherwisenull)mapname- marshaller/unmarshaller namename- element name information (nullif no element name)- Returns:
- constructed direct object component
- Throws:
JiBXException- if error in unmarshalling
-
unmarshalMappingRef
private static IComponent unmarshalMappingRef(UnmarshallingContext ctx, IContainer parent, IContextObj objc, PropertyDefinition prop, NameDefinition name) throws JiBXException
Unmarshal mapping reference component. Just constructs the component to be returned along with the supporting objects, and verifies that no disallowed properties are present.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structureobjc- current object contextprop- property definitionname- reference name definition (only allowed with abstract mappings)- Returns:
- constructed mapping reference component
- Throws:
JiBXException- if error in unmarshalling
-
unmarshalStructureRef
private static IComponent unmarshalStructureRef(UnmarshallingContext ctx, IContainer contain, NameDefinition name, PropertyDefinition prop, IContextObj cobj) throws JiBXException
Unmarshal structure reference component. Just constructs the component to be returned along with the supporting objects, and verifies that no disallowed properties are present.- Parameters:
ctx- unmarshalling context informationcontain- containing binding componentname- element name information (nullif no element name)prop- property definition (nullif no separate property)cobj- context object- Returns:
- constructed structure reference component
- Throws:
JiBXException- if error in unmarshalling
-
unmarshalStructureChildren
private static void unmarshalStructureChildren(UnmarshallingContext ctx, NestedBase nest, IContextObj objc, boolean impl, java.lang.String itype) throws JiBXException
Unmarshal child bindings for a nested structure definition.- Parameters:
ctx- unmarshalling context informationnest- nested structure definitionobjc- context object definitionimpl- property value implicit flagitype- item type for child components- Throws:
JiBXException- if error in unmarshalling
-
unmarshalObjectBinding
private static ObjectBinding unmarshalObjectBinding(UnmarshallingContext ctx, IContextObj objc, IContainer parent, java.lang.String type) throws JiBXException
Unmarshal object binding component. Just constructs the component to be returned along with the supporting objects. This handles both the unmarshalling of attributes, and of nested binding components.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structureobjc- current object contexttype- fully qualified name of object class- Returns:
- constructed structure reference component
- Throws:
JiBXException- if error in unmarshalling
-
unmarshalNamespaces
private static void unmarshalNamespaces(UnmarshallingContext ctx, DefinitionContext defc) throws JiBXException
Unmarshal namespace definitions. Any namespace definitions present are unmarshalled and added to the supplied definition context.- Parameters:
ctx- unmarshalling context informationdefc- definition context for defined namespaces- Throws:
JiBXException- if error in unmarshalling
-
unmarshalFormats
private static void unmarshalFormats(UnmarshallingContext ctx, boolean exists, DefinitionContext defc) throws JiBXException
Unmarshal format definitions. Any format definitions present are unmarshalled and added to the supplied definition context.- Parameters:
ctx- unmarshalling context informationexists- only verify existing methods flagdefc- definition context for defined formats- Throws:
JiBXException- if error in unmarshalling
-
unmarshalMappings
private static void unmarshalMappings(UnmarshallingContext ctx, IContainer parent, java.util.ArrayList nss, boolean uord) throws JiBXException
Unmarshal mapping definitions. Any mapping definitions present are unmarshalled and added to the supplied definition context.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structurenss- extra namespaces to be included in this mapping definition (may benull)uord- container is unordered structure flag- Throws:
JiBXException- if error in unmarshalling
-
unmarshalStructure
public static IComponent unmarshalStructure(UnmarshallingContext ctx, IContainer contain, IContextObj cobj, boolean coll, boolean uord, boolean implic) throws JiBXException
Unmarshal subclass instance for structure definition. This handles all combinations of attributes on the start tag, generating the appropriate structure of nested components and other classes to represent the binding information within the current element. This must be called with the parse positioned at the start tag of the element to be unmarshalled. TODO: At least split this up, or organize a better way to build binding- Parameters:
ctx- unmarshalling context informationcontain- containing binding definition structurecobj- context object informationcoll- collection structure flaguord- container is unordered structure flagimplic- property value implicit flag- Returns:
- root of component tree constructed from binding
- Throws:
JiBXException- if error in unmarshalling
-
unmarshalMapping
public static IMapping unmarshalMapping(UnmarshallingContext ctx, IContainer parent, java.util.ArrayList nss, boolean uord) throws JiBXException
Unmarshal mapping definition. This handles all combinations of attributes on the start tag, generating the appropriate structure of nested components and other classes to represent the binding information within the current element. This must be called with the parse positioned at the start tag of the element to be unmarshalled.- Parameters:
ctx- unmarshalling context informationparent- containing binding definition structurenss- extra namespaces to be included in this mapping definition (may benull)uord- container is unordered structure flag- Returns:
- mapping definition constructed from binding
- Throws:
JiBXException- if error in unmarshalling
-
preserveMethodClass
private static void preserveMethodClass(java.lang.String name)
Force the class containing a method to be preserved from modification.- Parameters:
name-
-
unmarshalPrecompiledMappings
private static void unmarshalPrecompiledMappings(UnmarshallingContext ctx, IBindingFactory factory, IContainer parent, int[] nsxlate) throws JiBXException
Unmarshal precompiled mapping definitions. Any mapping definitions present are unmarshalled and added to the supplied definition context.- Parameters:
ctx- unmarshalling context informationfactory- binding factory for mapping informationparent- containing binding definition structurensxlate- namespace index translation table (nullif none)- Throws:
JiBXException- if error in unmarshalling
-
unmarshalInclude
public static void unmarshalInclude(UnmarshallingContext ctx, boolean precomp, BindingDefinition bdef, java.net.URL root, java.util.ArrayList nslist, java.util.HashSet paths, IBindingFactory factory, int[] nsxlate) throws JiBXException
Unmarshal included binding. This handles the actual include element along with the actual included binding. The current implementation allows for nested includes, but requires that all the included bindings use compatible settings for the attributes of the root element, and only allows mapping elements as children of the included bindings (no namespace or format elements).- Parameters:
ctx- unmarshalling context informationprecomp- in precompiled bindings flagbdef- binding definition at root of includesroot- base URL for binding, ornullif unknownnslist- list of namespaces definedpaths- set of binding paths processedfactory- precompiled binding factory (nullif not in precompiled binding)nsxlate- namespace translation table for precompiled binding (nullif not in precompiled binding)- Throws:
JiBXException- if error in unmarshalling
-
unmarshalBindingDefinition
public static BindingDefinition unmarshalBindingDefinition(UnmarshallingContext ctx, java.lang.String name, java.net.URL root) throws JiBXException
Unmarshal binding definition. This handles the entire binding definition document.- Parameters:
ctx- unmarshalling context informationname- default name for bindingroot- base URL for binding, ornullif unknown- Returns:
- binding definition
- Throws:
JiBXException- if error in unmarshalling
-
-