--- libjibx-java-1.0.1.orig/build/docs/dev/overview-frame.html +++ libjibx-java-1.0.1/build/docs/dev/overview-frame.html @@ -0,0 +1,52 @@ + + + + + + +Overview List (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + + + + +
+
+ + + + + +
All Classes +

+ +Packages +
+org.jibx.binding +
+org.jibx.binding.classes +
+org.jibx.binding.def +
+org.jibx.extras +
+org.jibx.runtime +
+org.jibx.runtime.impl +
+

+ +

+  + + --- libjibx-java-1.0.1.orig/build/docs/dev/constant-values.html +++ libjibx-java-1.0.1/build/docs/dev/constant-values.html @@ -0,0 +1,2944 @@ + + + + + + +Constant Field Values (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Constant Field Values

+
+
+Contents + + + + + + +
+org.jibx.*
+ +

+ + + + + + + + + + + + + + + + + +
org.jibx.binding.Run
+private static final java.lang.StringBINDING_LIST_RESOURCE"jibx_bindings.txt"
+private static final java.lang.StringDEFAULT_BINDING_RESOURCE"jibx_binding.xml"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.SchemaGenerator
+public static final java.lang.StringXML_URI"http://www.w3.org/XML/1998/namespace"
+public static final java.lang.StringXMLNS_URI"http://www.w3.org/2000/xmlns/"
+private static final java.lang.StringXSD_URI"http://www.w3.org/2001/XMLSchema"
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.binding.Utility
+private static final intCOPY_BUFFER_SIZE1024
+ +

+ +

+ + + + + + + + + + + + + + + + + +
org.jibx.binding.classes.BoundClass
+private static final java.lang.StringACCESS_PREFIX"JiBX_access_"
+private static final java.lang.StringGENERIC_MUNGE_CLASS"JiBX_MungeAdapter"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.classes.ClassFile
+public static final intPACKAGE_ACCESS1
+public static final intPRIVATE_ACCESS0
+protected static final intPRIVATEFIELD_ACCESS2
+public static final intPROTECTED_ACCESS2
+public static final intPUBLIC_ACCESS3
+ +

+ +

+ + + + + + + + + + + + + + + + + +
org.jibx.binding.classes.MarshalBuilder
+protected static final java.lang.StringMARSHAL_EXCEPTION_TEXT"Error while marshalling"
+private static final java.lang.StringMARSHALCONTEXT_CLASS"org.jibx.runtime.impl.MarshallingContext"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.classes.MethodBuilder
+public static final java.lang.StringEXCEPTION_CONSTRUCTOR_SIGNATURE1"(Ljava/lang/String;)V"
+public static final java.lang.StringEXCEPTION_CONSTRUCTOR_SIGNATURE2"(Ljava/lang/String;Ljava/lang/Throwable;)V"
+public static final java.lang.StringFRAMEWORK_EXCEPTION_CLASS"org.jibx.runtime.JiBXException"
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.binding.classes.MungedClass
+private static final java.lang.StringBINDING_LISTNAME"JiBX_bindingList"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.classes.UnmarshalBuilder
+protected static final java.lang.StringUNMARSHAL_EXCEPTION_TEXT"Error while unmarshalling "
+private static final java.lang.StringUNMARSHALCONTEXT_CLASS"org.jibx.runtime.impl.UnmarshallingContext"
+protected static final java.lang.StringUNMARSHALLING_POSITION_METHOD"org.jibx.runtime.impl.UnmarshallingContext.buildPositionString"
+protected static final java.lang.StringUNMARSHALLING_POSITION_SIGNATURE"()Ljava/lang/String;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.BindingBuilder
+static final intACC_PACKAGE1
+static final intACC_PRIVATE0
+static final intACC_PROTECTED2
+static final intACC_PUBLIC3
+private static final java.lang.StringBINDING_DIRECTION"direction"
+private static final java.lang.StringBINDING_ELEMENT"binding"
+private static final java.lang.StringBINDING_FORCE"force-classes"
+private static final java.lang.StringBINDING_FORWARDS"forwards"
+private static final java.lang.StringBINDING_GLOBALID"global-id"
+private static final java.lang.StringBINDING_NAME"name"
+private static final java.lang.StringBINDING_PACKAGE"package"
+private static final java.lang.StringBINDING_TRACKING"track-source"
+private static final java.lang.StringCOLLECTION_ADDMETHOD"add-method"
+private static final java.lang.StringCOLLECTION_ELEMENT"collection"
+private static final java.lang.StringCOLLECTION_ITEMTYPE"item-type"
+private static final java.lang.StringCOLLECTION_ITERMETHOD"iter-method"
+private static final java.lang.StringCOLLECTION_LOADMETHOD"load-method"
+private static final java.lang.StringCOLLECTION_SIZEMETHOD"size-method"
+private static final java.lang.StringCOLLECTION_STOREMETHOD"store-method"
+private static final java.lang.StringCOMMON_ACCESSLEVEL"access-level"
+private static final java.lang.StringCOMMON_AUTOLINK"auto-link"
+private static final java.lang.StringCOMMON_CHOICE"choice"
+private static final java.lang.StringCOMMON_DEFAULT"default"
+private static final java.lang.StringCOMMON_DESERIALIZER"deserializer"
+private static final java.lang.StringCOMMON_FACTORY"factory"
+private static final java.lang.StringCOMMON_FIELD"field"
+private static final java.lang.StringCOMMON_GETMETHOD"get-method"
+private static final java.lang.StringCOMMON_LABEL"label"
+private static final java.lang.StringCOMMON_MARSHALLER"marshaller"
+private static final java.lang.StringCOMMON_NAME"name"
+private static final java.lang.StringCOMMON_NAMESPACE"ns"
+private static final java.lang.StringCOMMON_NAMESTYLE"name-style"
+private static final java.lang.StringCOMMON_ORDERED"ordered"
+private static final java.lang.StringCOMMON_POSTSET"post-set"
+private static final java.lang.StringCOMMON_PREGET"pre-get"
+private static final java.lang.StringCOMMON_PRESET"pre-set"
+private static final java.lang.StringCOMMON_SERIALIZER"serializer"
+private static final java.lang.StringCOMMON_SETMETHOD"set-method"
+private static final java.lang.StringCOMMON_STRIPPREFIX"strip-prefix"
+private static final java.lang.StringCOMMON_STRIPSUFFIX"strip-suffix"
+private static final java.lang.StringCOMMON_STYLE"value-style"
+private static final java.lang.StringCOMMON_TESTMETHOD"test-method"
+private static final java.lang.StringCOMMON_TYPE"type"
+private static final java.lang.StringCOMMON_UNMARSHALLER"unmarshaller"
+private static final java.lang.StringCOMMON_USAGE"usage"
+private static final java.lang.StringCOMMON_USING"using"
+private static final intDIRECTION_BOTH2
+private static final intDIRECTION_INPUT0
+private static final intDIRECTION_OUTPUT1
+private static final java.lang.StringFORMAT_ELEMENT"format"
+private static final java.lang.StringFORMAT_NAME"label"
+private static final java.lang.StringFORMAT_TYPE"type"
+private static final java.lang.StringINCLUDE_ELEMENT"include"
+private static final java.lang.StringINCLUDE_PATH"path"
+static final intLINK_FIELDS1
+static final intLINK_METHODS2
+static final intLINK_NONE0
+private static final java.lang.StringMAPPING_ABSTRACT"abstract"
+private static final java.lang.StringMAPPING_CLASS"class"
+private static final java.lang.StringMAPPING_ELEMENT"mapping"
+private static final java.lang.StringMAPPING_EXTENDS"extends"
+private static final java.lang.StringMAPPING_TYPENAME"type-name"
+private static final java.lang.StringMARSHALLER_INTERFACE"org.jibx.runtime.IMarshaller"
+private static final java.lang.StringMARSHALLER_INTERFACETYPE"Lorg/jibx/runtime/IMarshaller;"
+static final intNAME_HYPHENS0
+static final intNAME_MIXED1
+private static final java.lang.StringNAMESPACE_DEFAULT"default"
+private static final java.lang.StringNAMESPACE_ELEMENT"namespace"
+private static final java.lang.StringNAMESPACE_PREFIX"prefix"
+private static final java.lang.StringNAMESPACE_URI"uri"
+private static final java.lang.StringSTRUCTURE_ELEMENT"structure"
+private static final java.lang.StringSTRUCTURE_MAPAS"map-as"
+private static final java.lang.StringUNMARSHALLER_INTERFACE"org.jibx.runtime.IUnmarshaller"
+private static final java.lang.StringUNMARSHALLER_INTERFACETYPE"Lorg/jibx/runtime/IUnmarshaller;"
+private static final java.lang.StringUSAGE_OPTIONAL"optional"
+private static final java.lang.StringUSAGE_REQUIRED"required"
+private static final java.lang.StringVALUE_CONSTANT"constant"
+private static final java.lang.StringVALUE_ELEMENT"value"
+private static final java.lang.StringVALUE_FORMAT"format"
+private static final java.lang.StringVALUE_IDENT"ident"
+private static final java.lang.StringVALUE_STYLE"style"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.BindingDefinition
+private static final java.lang.StringCLASSES_ARRAYNAME"m_classes"
+private static final java.lang.StringCREATEMARSHAL_METHODNAME"createMarshallingContext"
+private static final java.lang.StringCREATEUNMARSHAL_METHODNAME"createUnmarshallingContext"
+public static final java.lang.StringCURRENT_VERSION_NAME"@distrib@"
+static final java.lang.StringDEFAULT_AUTOPREFIX"id_"
+private static final intFACTORY_INSTACCESS10
+private static final java.lang.StringFACTORY_INSTNAME"m_inst"
+private static final java.lang.StringFACTORY_INTERFACE"org.jibx.runtime.IBindingFactory"
+private static final java.lang.StringFACTORY_SUFFIX"Factory"
+public static final java.lang.StringGENERATE_PREFIX"JiBX_"
+private static final java.lang.StringGETCLASSES_METHODNAME"getMappedClasses"
+private static final java.lang.StringGETDEFINEDNSS_METHODNAME"getNamespaces"
+private static final java.lang.StringGETDEFINEDPREFS_METHODNAME"getPrefixes"
+private static final java.lang.StringGETDISTRIB_METHODNAME"getCompilerDistribution"
+private static final java.lang.StringGETELEMENTNAMES_METHODNAME"getElementNames"
+private static final java.lang.StringGETELEMENTNSS_METHODNAME"getElementNamespaces"
+private static final java.lang.StringGETINST_METHODNAME"getInstance"
+private static final java.lang.StringGETTYPEINDEX_METHODNAME"getTypeIndex"
+private static final java.lang.StringGETVERSION_METHODNAME"getCompilerVersion"
+private static final java.lang.StringGNAMES_ARRAYNAME"m_globalNames"
+private static final java.lang.StringGURIS_ARRAYNAME"m_globalUris"
+private static final java.lang.StringIDNAMES_ARRAYNAME"m_idNames"
+private static final java.lang.StringMARSHALCONTEXT_IMPLEMENTATION"org.jibx.runtime.impl.MarshallingContext"
+private static final java.lang.StringMARSHALCONTEXT_INTERFACE"org.jibx.runtime.IMarshallingContext"
+private static final java.lang.StringMARSHALCONTEXTINIT_SIGNATURE"([Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Lorg/jibx/runtime/IBindingFactory;)V"
+private static final java.lang.StringMARSHALLER_ARRAYNAME"m_marshallers"
+private static final java.lang.StringPREFIXES_ARRAYNAME"m_prefixes"
+private static final java.lang.StringSTRING_ARRAYTYPE"java.lang.String[]"
+private static final java.lang.StringSTRINGINT_MAPTYPE"org.jibx.runtime.impl.StringIntHashMap"
+private static final java.lang.StringSTRINGINTADD_METHOD"org.jibx.runtime.impl.StringIntHashMap.add"
+private static final java.lang.StringSTRINGINTADD_SIGNATURE"(Ljava/lang/String;I)I"
+private static final java.lang.StringSTRINGINTGET_METHOD"org.jibx.runtime.impl.StringIntHashMap.get"
+private static final java.lang.StringSTRINGINTGET_SIGNATURE"(Ljava/lang/String;)I"
+private static final java.lang.StringSTRINGINTINIT_SIGNATURE"(I)V"
+private static final intTYPEMAP_MINIMUM_SIZE5
+private static final java.lang.StringTYPEMAP_NAME"m_typeMap"
+private static final java.lang.StringUNMARSHALCONTEXT_IMPLEMENTATION"org.jibx.runtime.impl.UnmarshallingContext"
+private static final java.lang.StringUNMARSHALCONTEXT_INTERFACE"org.jibx.runtime.IUnmarshallingContext"
+private static final java.lang.StringUNMARSHALCONTEXTINIT_SIGNATURE"(I[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Lorg/jibx/runtime/IBindingFactory;)V"
+private static final java.lang.StringUNMARSHALLER_ARRAYNAME"m_unmarshallers"
+private static final java.lang.StringUNSUPPORTED_EXCEPTION_CLASS"java.lang.UnsupportedOperationException"
+private static final java.lang.StringURIS_ARRAYNAME"m_uris"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.DirectGeneric
+private static final java.lang.StringISEND_METHOD"org.jibx.runtime.impl.UnmarshallingContext.isEnd"
+private static final java.lang.StringISEND_SIGNATURE"()Z"
+private static final java.lang.StringMARSHALLABLE_INTERFACE"org.jibx.runtime.IMarshallable"
+private static final java.lang.StringMARSHALLABLE_METHOD"org.jibx.runtime.IMarshallable.marshal"
+private static final java.lang.StringMARSHALLABLE_SIGNATURE"(Lorg/jibx/runtime/IMarshallingContext;)V"
+private static final java.lang.StringUNMARSHALELEMENT_METHOD"org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement"
+private static final java.lang.StringUNMARSHALELEMENT_SIGNATURE"()Ljava/lang/Object;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.DirectObject
+private static final java.lang.StringABSTRACTMARSHAL_METHOD"org.jibx.runtime.IAbstractMarshaller.baseMarshal"
+private static final java.lang.StringABSTRACTMARSHAL_SIGNATURE"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V"
+private static final java.lang.StringABSTRACTMARSHALLER_INTERFACE"org.jibx.runtime.IAbstractMarshaller"
+private static final java.lang.StringALIASABLE_INTERFACETYPE"Lorg/jibx/runtime/IAliasable;"
+private static final java.lang.StringANY_INIT_SIG"()V"
+private static final java.lang.StringANY_INITCLASS_SIG"(Ljava/lang/String;)V"
+private static final java.lang.StringGETMARSHALLER_METHOD"org.jibx.runtime.IMarshallingContext.getMarshaller"
+private static final java.lang.StringGETMARSHALLER_SIGNATURE"(ILjava/lang/String;)Lorg/jibx/runtime/IMarshaller;"
+private static final java.lang.StringGETUNMARSHALLER_METHOD"org.jibx.runtime.IUnmarshallingContext.getUnmarshaller"
+private static final java.lang.StringGETUNMARSHALLER_SIGNATURE"(I)Lorg/jibx/runtime/IUnmarshaller;"
+private static final java.lang.StringMARSHALLER_MARSHAL_METHOD"org.jibx.runtime.IMarshaller.marshal"
+private static final java.lang.StringMARSHALLER_MARSHAL_SIGNATURE"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V"
+private static final java.lang.StringMARSHALONLY_INIT_SIG"(ILjava/lang/String;)V"
+private static final java.lang.StringMARSHALONLY_INITCLASS_SIG"(ILjava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringMARSHALUNMARSHAL_INIT_SIG"(Ljava/lang/String;ILjava/lang/String;)V"
+private static final java.lang.StringMARSHALUNMARSHAL_INITCLASS_SIG"(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringUNMARSHALLER_TESTPRESENT_METHOD"org.jibx.runtime.IUnmarshaller.isPresent"
+private static final java.lang.StringUNMARSHALLER_TESTPRESENT_SIGNATURE"(Lorg/jibx/runtime/IUnmarshallingContext;)Z"
+private static final java.lang.StringUNMARSHALLER_UNMARSHAL_METHOD"org.jibx.runtime.IUnmarshaller.unmarshal"
+private static final java.lang.StringUNMARSHALLER_UNMARSHAL_SIGNATURE"(Ljava/lang/Object;Lorg/jibx/runtime/IUnmarshallingContext;)Ljava/lang/Object;"
+private static final java.lang.StringUNMARSHALONLY_INIT_SIG"(Ljava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringUNMARSHALONLY_INITCLASS_SIG"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.ElementWrapper
+private static final java.lang.StringMARSHAL_CLOSESTARTCONTENT"org.jibx.runtime.impl.MarshallingContext.closeStartContent"
+private static final java.lang.StringMARSHAL_CLOSESTARTEMPTY"org.jibx.runtime.impl.MarshallingContext.closeStartEmpty"
+private static final java.lang.StringMARSHAL_CLOSESTARTSIGNATURE"()Lorg/jibx/runtime/impl/MarshallingContext;"
+private static final java.lang.StringMARSHAL_STARTNAMESPACESSIGNATURE"(ILjava/lang/String;[I[Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+private static final java.lang.StringMARSHAL_WRITEENDMETHOD"org.jibx.runtime.impl.MarshallingContext.endTag"
+private static final java.lang.StringMARSHAL_WRITEENDSIGNATURE"(ILjava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+private static final java.lang.StringMARSHAL_WRITESTARTATTRIBUTES"org.jibx.runtime.impl.MarshallingContext.startTagAttributes"
+private static final java.lang.StringMARSHAL_WRITESTARTNAMESPACES"org.jibx.runtime.impl.MarshallingContext.startTagNamespaces"
+private static final java.lang.StringMARSHAL_WRITESTARTNOATTRIBUTES"org.jibx.runtime.impl.MarshallingContext.startTag"
+private static final java.lang.StringMARSHAL_WRITESTARTSIGNATURE"(ILjava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+private static final java.lang.StringMARSHALLING_CONTEXT"org.jibx.runtime.impl.MarshallingContext"
+private static final java.lang.StringUNMARSHAL_ISATMETHOD"org.jibx.runtime.IUnmarshallingContext.isAt"
+private static final java.lang.StringUNMARSHAL_ISATSIGNATURE"(Ljava/lang/String;Ljava/lang/String;)Z"
+private static final java.lang.StringUNMARSHAL_PARSEENDMETHOD"org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag"
+private static final java.lang.StringUNMARSHAL_PARSEENDSIGNATURE"(Ljava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringUNMARSHAL_PARSEPASTSTART"org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag"
+private static final java.lang.StringUNMARSHAL_PARSESTARTATTRIBUTES"org.jibx.runtime.impl.UnmarshallingContext.parseToStartTag"
+private static final java.lang.StringUNMARSHAL_PARSESTARTNOATTRIBUTES"org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag"
+private static final java.lang.StringUNMARSHAL_PARSESTARTSIGNATURE"(Ljava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringUNMARSHAL_SKIPELEMENTMETHOD"org.jibx.runtime.impl.UnmarshallingContext.parsePastElement"
+private static final java.lang.StringUNMARSHAL_SKIPELEMENTSIGNATURE"(Ljava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringUNMARSHALLING_CONTEXT"org.jibx.runtime.impl.UnmarshallingContext"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.MappingBase
+protected static final java.lang.StringABSTRACTMARSHALLER_INTERFACE"org.jibx.runtime.IAbstractMarshaller"
+protected static final java.lang.StringCHECKEXTENDS_METHODNAME"isExtension"
+protected static final java.lang.StringCHECKEXTENDS_SIGNATURE"(I)Z"
+protected static final java.lang.StringGETINDEX_METHODNAME"JiBX_getIndex"
+protected static final java.lang.StringGETINDEX_SIGNATURE"()I"
+protected static final java.lang.StringGETMARSHALLER_METHOD"org.jibx.runtime.IMarshallingContext.getMarshaller"
+protected static final java.lang.StringGETMARSHALLER_SIGNATURE"(ILjava/lang/String;)Lorg/jibx/runtime/IMarshaller;"
+protected static final java.lang.StringGETUNMARSHALLER_METHOD"org.jibx.runtime.IUnmarshallingContext.getUnmarshaller"
+protected static final java.lang.StringGETUNMARSHALLER_SIGNATURE"(I)Lorg/jibx/runtime/IUnmarshaller;"
+protected static final java.lang.StringIMARSHALLABLE_INTERFACE"org.jibx.runtime.IMarshallable"
+protected static final java.lang.StringIUNMARSHALLABLE_INTERFACE"org.jibx.runtime.IUnmarshallable"
+protected static final java.lang.StringMARSHALLABLE_METHODNAME"marshal"
+protected static final java.lang.StringMARSHALLABLE_SIGNATURE"(Lorg/jibx/runtime/IMarshallingContext;)V"
+protected static final java.lang.StringMARSHALLER_INTERFACE"org.jibx.runtime.IMarshaller"
+protected static final java.lang.StringMARSHALLERMARSHAL_METHOD"org.jibx.runtime.IMarshaller.marshal"
+protected static final java.lang.StringMARSHALLERMARSHAL_SIGNATURE"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V"
+protected static final java.lang.StringUNMARSHALLABLE_METHODNAME"unmarshal"
+protected static final java.lang.StringUNMARSHALLABLE_SIGNATURE"(Lorg/jibx/runtime/IUnmarshallingContext;)V"
+protected static final java.lang.StringUNMARSHALLER_INTERFACE"org.jibx.runtime.IUnmarshaller"
+protected static final java.lang.StringUNMARSHALLERUNMARSHAL_METHOD"org.jibx.runtime.IUnmarshaller.unmarshal"
+protected static final java.lang.StringUNMARSHALLERUNMARSHAL_SIGNATURE"(Ljava/lang/Object;Lorg/jibx/runtime/IUnmarshallingContext;)Ljava/lang/Object;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.MappingDefinition
+private static final java.lang.StringADAPTERCLASS_SUFFIX"_access"
+private static final java.lang.StringADDMARSHALLER_METHOD"org.jibx.runtime.impl.MarshallingContext.addMarshalling"
+private static final java.lang.StringADDMARSHALLER_SIGNATURE"(ILjava/lang/String;)V"
+private static final java.lang.StringADDUNMARSHALLER_METHOD"org.jibx.runtime.impl.UnmarshallingContext.addUnmarshalling"
+private static final java.lang.StringADDUNMARSHALLER_SIGNATURE"(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V"
+private static final java.lang.StringBASEMARSHAL_METHODNAME"baseMarshal"
+private static final java.lang.StringCHECKEXTENDS_METHOD"org.jibx.runtime.IMarshaller.isExtension"
+private static final java.lang.StringCURRENTELEMENT_METHOD"org.jibx.runtime.impl.UnmarshallingContext.currentNameString"
+private static final java.lang.StringCURRENTELEMENT_SIGNATURE"()Ljava/lang/String;"
+private static final java.lang.StringGETINDEX_METHOD"org.jibx.runtime.IMarshallable.JiBX_getIndex"
+private static final java.lang.StringISPRESENT_METHODNAME"isPresent"
+private static final java.lang.StringMARSHAL_METHODNAME"marshal"
+private static final java.lang.StringMARSHALCONTEXT_CLASS"org.jibx.runtime.impl.MarshallingContext"
+private static final java.lang.StringMARSHALCONTEXT_INTERFACE"org.jibx.runtime.IMarshallingContext"
+private static final java.lang.StringREMOVEMARSHALLER_METHOD"org.jibx.runtime.impl.MarshallingContext.removeMarshalling"
+private static final java.lang.StringREMOVEMARSHALLER_SIGNATURE"(I)V"
+private static final java.lang.StringREMOVEUNMARSHALLER_METHOD"org.jibx.runtime.impl.UnmarshallingContext.removeUnmarshalling"
+private static final java.lang.StringREMOVEUNMARSHALLER_SIGNATURE"(I)V"
+private static final java.lang.StringUNMARSHAL_ISATMETHOD"org.jibx.runtime.IUnmarshallingContext.isAt"
+private static final java.lang.StringUNMARSHAL_ISATSIGNATURE"(Ljava/lang/String;Ljava/lang/String;)Z"
+private static final java.lang.StringUNMARSHAL_METHODNAME"unmarshal"
+private static final java.lang.StringUNMARSHALCONTEXT_CLASS"org.jibx.runtime.impl.UnmarshallingContext"
+private static final java.lang.StringUNMARSHALCONTEXT_INTERFACE"org.jibx.runtime.IUnmarshallingContext"
+private static final java.lang.StringUNMARSHALLERPRESENT_METHOD"org.jibx.runtime.IUnmarshaller.isPresent"
+private static final java.lang.StringUNMARSHALLERPRESENT_SIGNATURE"(Lorg/jibx/runtime/IUnmarshallingContext;)Z"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.NamespaceDefinition
+static final intALLDEFAULT_USAGE3
+static final intATTRIBUTES_USAGE2
+static final intELEMENTS_USAGE1
+static final intNODEFAULT_USAGE0
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.NestedCollection
+private static final java.lang.StringGROWARRAY_METHOD"org.jibx.runtime.Utility.growArray"
+private static final java.lang.StringGROWARRAY_SIGNATURE"(Ljava/lang/Object;)Ljava/lang/Object;"
+private static final java.lang.StringRESIZEARRAY_METHOD"org.jibx.runtime.Utility.resizeArray"
+private static final java.lang.StringRESIZEARRAY_SIGNATURE"(ILjava/lang/Object;)Ljava/lang/Object;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.ObjectBinding
+private static final java.lang.StringGETSTACKTOP_SIGNATURE"()Ljava/lang/Object;"
+private static final java.lang.StringMARSHAL_ATTR_SUFFIX"_marshalAttr"
+private static final java.lang.StringMARSHAL_GETSTACKTOPMETHOD"org.jibx.runtime.impl.MarshallingContext.getStackTop"
+private static final java.lang.StringMARSHAL_POPOBJECTMETHOD"org.jibx.runtime.impl.MarshallingContext.popObject"
+private static final java.lang.StringMARSHAL_PUSHOBJECTMETHOD"org.jibx.runtime.impl.MarshallingContext.pushObject"
+private static final java.lang.StringMARSHAL_SUFFIX"_marshal"
+private static final java.lang.StringMARSHALLING_CONTEXT"org.jibx.runtime.impl.MarshallingContext"
+private static final java.lang.StringNEWINSTANCE_SUFFIX"_newinstance"
+private static final java.lang.StringPOPOBJECT_SIGNATURE"()V"
+private static final java.lang.StringPUSHOBJECT_SIGNATURE"(Ljava/lang/Object;)V"
+private static final java.lang.StringSETSOURCE_METHODNAME"jibx_setSource"
+private static final java.lang.StringSOURCE_TRACKING_INTERFACE"org.jibx.runtime.impl.ITrackSourceImpl"
+private static final java.lang.StringSOURCECOLUMN_FIELDNAME"jibx_sourceColumn"
+private static final java.lang.StringSOURCECOLUMN_METHODNAME"jibx_getColumnNumber"
+private static final java.lang.StringSOURCEDOCUMENT_FIELDNAME"jibx_sourceDocument"
+private static final java.lang.StringSOURCELINE_FIELDNAME"jibx_sourceLine"
+private static final java.lang.StringSOURCELINE_METHODNAME"jibx_getLineNumber"
+private static final java.lang.StringSOURCENAME_METHODNAME"jibx_getDocumentName"
+private static final java.lang.StringUNMARSHAL_ATTR_SUFFIX"_unmarshalAttr"
+private static final java.lang.StringUNMARSHAL_GETSTACKTOPMETHOD"org.jibx.runtime.impl.UnmarshallingContext.getStackTop"
+private static final java.lang.StringUNMARSHAL_PARAMETER_SIGNATURE"(Lorg/jibx/runtime/impl/UnmarshallingContext;)"
+private static final java.lang.StringUNMARSHAL_POPOBJECTMETHOD"org.jibx.runtime.impl.UnmarshallingContext.popObject"
+private static final java.lang.StringUNMARSHAL_PUSHOBJECTMETHOD"org.jibx.runtime.impl.UnmarshallingContext.pushObject"
+private static final java.lang.StringUNMARSHAL_PUSHTRACKEDOBJECTMETHOD"org.jibx.runtime.impl.UnmarshallingContext.pushTrackedObject"
+private static final java.lang.StringUNMARSHAL_SUFFIX"_unmarshal"
+private static final java.lang.StringUNMARSHALLING_CONTEXT"org.jibx.runtime.impl.UnmarshallingContext"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.ObjectStringConversion
+private static final java.lang.StringFROMSTRING_SIGNATURE"(Ljava/lang/String;)V"
+private static final java.lang.StringTOSTRING_METHOD"toString"
+private static final java.lang.StringTOSTRING_SIGNATURE"()Ljava/lang/String;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.PrimitiveStringConversion
+private static final intDOUBLE_TYPE3
+private static final intFLOAT_TYPE2
+private static final intINT_TYPE0
+private static final intLONG_TYPE1
+private static final java.lang.StringUNMARSHAL_SIG_LEAD"(Ljava/lang/String;Ljava/lang/String;"
+private static final java.lang.StringUTILITY_CLASS_NAME"org.jibx.runtime.Utility"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.StringConversion
+protected static final java.lang.StringCOMPARE_OBJECTS_METHOD"org.jibx.runtime.Utility.isEqual"
+protected static final java.lang.StringCOMPARE_OBJECTS_SIGNATURE"(Ljava/lang/Object;Ljava/lang/Object;)Z"
+protected static final java.lang.StringMARSHAL_ATTRIBUTE"org.jibx.runtime.impl.MarshallingContext.attribute"
+protected static final java.lang.StringMARSHAL_ELEMENT"org.jibx.runtime.impl.MarshallingContext.element"
+public static final intMARSHAL_NAME_VALUES2
+protected static final java.lang.StringMARSHAL_SIGNATURE"(ILjava/lang/String;Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+protected static final java.lang.StringUNMARSHAL_OPT_ATTRIBUTE"org.jibx.runtime.impl.UnmarshallingContext.attributeText"
+protected static final java.lang.StringUNMARSHAL_OPT_ELEMENT"org.jibx.runtime.impl.UnmarshallingContext.parseElementText"
+protected static final java.lang.StringUNMARSHAL_OPT_SIGNATURE"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"
+protected static final java.lang.StringUNMARSHAL_REQ_ATTRIBUTE"org.jibx.runtime.impl.UnmarshallingContext.attributeText"
+protected static final java.lang.StringUNMARSHAL_REQ_ELEMENT"org.jibx.runtime.impl.UnmarshallingContext.parseElementText"
+protected static final java.lang.StringUNMARSHAL_REQ_SIGNATURE"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.binding.def.ValueChild
+static final intATTRIBUTE_STYLE0
+static final intAUTO_IDENT1
+private static final java.lang.StringBACKFILL_METHODNAME"backfill"
+private static final java.lang.StringBACKFILL_SUFFIX"_backfill_"
+private static final java.lang.StringBOUNDREF_NAME"m_obj"
+static final intCDATA_STYLE3
+private static final java.lang.StringCHECK_ATTRIBUTE_NAME"org.jibx.runtime.impl.UnmarshallingContext.hasAttribute"
+private static final java.lang.StringCHECK_ELEMENT_NAME"org.jibx.runtime.impl.UnmarshallingContext.isAt"
+private static final java.lang.StringCHECK_SIGNATURE"(Ljava/lang/String;Ljava/lang/String;)Z"
+static final intDEF_IDENT2
+private static final java.lang.StringDEFINE_ID_NAME"org.jibx.runtime.impl.UnmarshallingContext.defineID"
+private static final java.lang.StringDEFINE_ID_SIGNATURE"(Ljava/lang/String;ILjava/lang/Object;)V"
+static final intDIRECT_IDENT0
+static final intELEMENT_STYLE1
+protected static final java.lang.StringMARSHAL_ATTRIBUTE"org.jibx.runtime.impl.MarshallingContext.attribute"
+private static final java.lang.StringMARSHAL_CDATA_NAME"org.jibx.runtime.impl.MarshallingContext.writeCData"
+protected static final java.lang.StringMARSHAL_ELEMENT"org.jibx.runtime.impl.MarshallingContext.element"
+protected static final java.lang.StringMARSHAL_SIGNATURE"(ILjava/lang/String;Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+private static final java.lang.StringMARSHAL_TEXT_NAME"org.jibx.runtime.impl.MarshallingContext.writeContent"
+private static final java.lang.StringMARSHAL_TEXT_SIGNATURE"(Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;"
+static final intREF_IDENT3
+private static final java.lang.StringREGISTER_BACKFILL_NAME"org.jibx.runtime.impl.UnmarshallingContext.registerBackFill"
+private static final java.lang.StringREGISTER_BACKFILL_SIGNATURE"(ILorg/jibx/runtime/impl/BackFillReference;)V"
+static final intTEXT_STYLE2
+private static final java.lang.StringUNMARSHAL_DEFREF_ATTR_NAME"org.jibx.runtime.impl.UnmarshallingContext.attributeExistingIDREF"
+private static final java.lang.StringUNMARSHAL_DEFREF_ELEM_NAME"org.jibx.runtime.impl.UnmarshallingContext.parseElementExistingIDREF"
+private static final java.lang.StringUNMARSHAL_DEFREF_SIGNATURE"(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/Object;"
+private static final java.lang.StringUNMARSHAL_FWDREF_ATTR_NAME"org.jibx.runtime.impl.UnmarshallingContext.attributeForwardIDREF"
+private static final java.lang.StringUNMARSHAL_FWDREF_ELEM_NAME"org.jibx.runtime.impl.UnmarshallingContext.parseElementForwardIDREF"
+private static final java.lang.StringUNMARSHAL_TEXT_NAME"org.jibx.runtime.impl.UnmarshallingContext.parseContentText"
+private static final java.lang.StringUNMARSHAL_TEXT_SIGNATURE"()Ljava/lang/String;"
+private static final java.lang.StringUNMARSHALLING_THROWEXCEPTION_METHOD"org.jibx.runtime.impl.UnmarshallingContext.throwException"
+private static final java.lang.StringUNMARSHALLING_THROWEXCEPTION_SIGNATURE"(Ljava/lang/String;)V"
+ +

+ +

+ + + + + + + + + + + + + + + + + +
org.jibx.extras.DocumentModelMapperBase
+public static final java.lang.StringXML_NAMESPACE"http://www.w3.org/XML/1998/namespace"
+public static final java.lang.StringXMLNS_NAMESPACE"http://www.w3.org/2000/xmlns/"
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.extras.HashMapperStringToComplex
+private static final intDEFAULT_SIZE10
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.extras.HashMapperStringToSchemaType
+public static final intBOOLEAN_TYPE0
+public static final intBYTE_TYPE1
+public static final intBYTERRAY_TYPE12
+public static final intDATE_TYPE8
+public static final intDATETIME_TYPE7
+public static final intDECIMAL_TYPE10
+private static final intDEFAULT_SIZE10
+public static final intDOUBLE_TYPE2
+private static final java.lang.StringENTRY_ELEMENT_NAME"entry"
+public static final intFLOAT_TYPE3
+public static final intINT_TYPE4
+public static final intINTEGER_TYPE11
+private static final java.lang.StringKEY_ATTRIBUTE_NAME"key"
+public static final intLONG_TYPE5
+public static final intSHORT_TYPE6
+private static final java.lang.StringSIZE_ATTRIBUTE_NAME"size"
+public static final intSTRING_TYPE13
+public static final intTIME_TYPE9
+private static final java.lang.StringTYPE_ATTRIBUTE_NAME"type"
+private static final java.lang.StringXSD_NAMESPACE_PREFIX"xsd"
+private static final java.lang.StringXSD_NAMESPACE_URI"http://www.w3.org/2001/XMLSchema"
+private static final java.lang.StringXSD_PREFIX_LEAD"xsd:"
+private static final java.lang.StringXSI_NAMESPACE_PREFIX"xsi"
+private static final java.lang.StringXSI_NAMESPACE_URI"http://www.w3.org/2001/XMLSchema-instance"
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.runtime.BindingDirectory
+public static final java.lang.StringBINDINGFACTORY_PREFIX"JiBX_"
+public static final java.lang.StringBINDINGFACTORY_SUFFIX"Factory"
+public static final java.lang.StringBINDINGLIST_NAME"JiBX_bindingList"
+public static final java.lang.StringFACTORY_INSTMETHOD"getInstance"
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.runtime.EnumSet
+public static final intVALUE_LIMIT512
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.jibx.runtime.IBindingFactory
+public static final intCOMPATIBLE_VERSION_MASK-65536
+public static final java.lang.StringCURRENT_VERSION_NAME"jibx_1_0"
+public static final intCURRENT_VERSION_NUMBER65536
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.runtime.Utility
+private static final longLMSPERDAY86400000L
+public static final intMINIMUM_GROWN_ARRAY_SIZE16
+private static final longMSPERAVGYEAR31557600000L
+private static final longMSPERCENTURY3155695200000L
+private static final intMSPERDAY86400000
+private static final intMSPERHOUR3600000
+private static final intMSPERMINUTE60000
+private static final longMSPERYEAR31536000000L
+private static final charPAD_CHAR61
+private static final longTIME_BASE62135596800000L
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.runtime.impl.InputStreamWrapper
+private static final intBUFFER_SIZE2048
+ +

+ +

+ + + + + + + + + + + + + + + + + +
org.jibx.runtime.impl.MarshallingContext
+private static final intINITIAL_STACK_SIZE20
+public static final java.lang.StringXML_NAMESPACE"http://www.w3.org/XML/1998/namespace"
+ +

+ +

+ + + + + + + + + + + + +
org.jibx.runtime.impl.StreamWriterBase
+private static final intINITIAL_BUFFER_SIZE2048
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + +
org.jibx.runtime.impl.StringIntHashMap
+protected static final doubleDEFAULT_FILL0.3
+public static final intDEFAULT_NOT_FOUND-2147483648
+protected static final intMINIMUM_SIZE31
+ +

+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
org.jibx.runtime.impl.UnmarshallingContext
+public static final intCDSECT5
+public static final intCOMMENT9
+private static final java.lang.StringDEFAULT_PARSER_NAME"org.xmlpull.mxp1.MXParserFactory"
+public static final intDOCDECL10
+public static final intEND_DOCUMENT1
+public static final intEND_TAG3
+public static final intENTITY_REF6
+public static final intIGNORABLE_WHITESPACE7
+private static final intINITIAL_STACK_SIZE20
+public static final intPROCESSING_INSTRUCTION8
+public static final intSTART_DOCUMENT0
+public static final intSTART_TAG2
+public static final intTEXT4
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/allclasses-noframe.html +++ libjibx-java-1.0.1/build/docs/dev/allclasses-noframe.html @@ -0,0 +1,283 @@ + + + + + + +All Classes (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +All Classes +
+ + + + + +
ArrayRangeIterator +
+BackFillArray +
+BackFillHolder +
+BackFillReference +
+BaseMappingWrapper +
+BindingBuilder +
+BindingBuilder.ContainerBase +
+BindingDefinition +
+BindingDirectory +
+BindingGenerator +
+BindingMethod +
+BindingSelector +
+BoundClass +
+BranchTarget +
+BranchWrapper +
+ClassCache +
+ClassFile +
+ClassItem +
+Compile +
+Compile.DirectLoader +
+ComponentProperty +
+ContextMethodBuilder +
+DefinitionContext +
+DirectGeneric +
+DirectObject +
+DirectProperty +
+DiscardElementMapper +
+DiscardListMapper +
+DocumentComparator +
+DocumentModelMapperBase +
+Dom4JElementMapper +
+Dom4JListMapper +
+Dom4JMapperBase +
+DomElementMapper +
+DomFragmentMapper +
+DomListMapper +
+DomMapperBase +
+ElementWrapper +
+EnumSet +
+EnumSet.EnumItem +
+ExceptionMethodBuilder +
+ExistingMethod +
+GenericXMLWriter +
+HashMapperStringToComplex +
+HashMapperStringToSchemaType +
+IAbstractMarshaller +
+IAliasable +
+IBindingFactory +
+ICharacterEscaper +
+IComponent +
+IContainer +
+IContextObj +
+IdDefRefMapperBase +
+IdRefMapperBase +
+IMapping +
+IMarshallable +
+IMarshaller +
+IMarshallingContext +
+InputStreamWrapper +
+InstructionBuilder +
+ISO88591Escaper +
+ISO88591StreamWriter +
+ITrackSource +
+ITrackSourceImpl +
+IUnmarshallable +
+IUnmarshaller +
+IUnmarshallingContext +
+IXMLWriter +
+JDOMWriter +
+JiBXException +
+LinkableBase +
+Loader +
+MappingBase +
+MappingDefinition +
+MappingDirect +
+MappingReference +
+MarshalBuilder +
+MarshallingContext +
+MarshalUnmarshalBuilder +
+MethodBuilder +
+MungedClass +
+MungedClass.JiBXFilter +
+NameDefinition +
+NamespaceDefinition +
+NestedBase +
+NestedCollection +
+NestedCollection.AddStore +
+NestedCollection.ArrayLoad +
+NestedCollection.ArrayStore +
+NestedCollection.CollectionLoad +
+NestedCollection.CollectionStore +
+NestedCollection.IndexedLoad +
+NestedCollection.IndexedStore +
+NestedCollection.IteratorLoad +
+NestedStructure +
+ObjectArrayMapper +
+ObjectBinding +
+ObjectStringConversion +
+OptionalStructureWrapper +
+PassThroughComponent +
+PrimitiveStringConversion +
+PropertyDefinition +
+QName +
+RecoverableException +
+Run +
+SchemaGenerator +
+SparseArrayIterator +
+StreamWriterBase +
+StringConversion +
+StringIntHashMap +
+StructureReference +
+TestMultRoundtrip +
+TestRoundtrip +
+TypedArrayMapper +
+UnmarshalBuilder +
+UnmarshallingContext +
+UnrecoverableException +
+USASCIIEscaper +
+UTF8Escaper +
+UTF8StreamWriter +
+Utility +
+Utility +
+ValidationException +
+ValueChild +
+XMLWriterBase +
+XMLWriterNamespaceBase +
+XMLWriterNamespaceBase.DeclarationInfo +
+
+ + + --- libjibx-java-1.0.1.orig/build/docs/dev/index.html +++ libjibx-java-1.0.1/build/docs/dev/index.html @@ -0,0 +1,39 @@ + + + + + + +JiBX Java data binding to XML - Version 1.0 + + + + + + + + + + + +<H2> +Frame Alert</H2> + +<P> +This document is designed to be viewed using the frames feature. If you see this message, you are using a non-frame-capable web client. +<BR> +Link to<A HREF="overview-summary.html">Non-frame version.</A> + + + --- libjibx-java-1.0.1.orig/build/docs/dev/deprecated-list.html +++ libjibx-java-1.0.1/build/docs/dev/deprecated-list.html @@ -0,0 +1,138 @@ + + + + + + +Deprecated List (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Deprecated API

+
+
+Contents + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/package-list +++ libjibx-java-1.0.1/build/docs/dev/package-list @@ -0,0 +1,6 @@ +org.jibx.binding +org.jibx.binding.classes +org.jibx.binding.def +org.jibx.extras +org.jibx.runtime +org.jibx.runtime.impl --- libjibx-java-1.0.1.orig/build/docs/dev/overview-summary.html +++ libjibx-java-1.0.1/build/docs/dev/overview-summary.html @@ -0,0 +1,168 @@ + + + + + + +Overview (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+JiBX Java data binding to XML - Version 1.0 +

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Packages
org.jibx.binding 
org.jibx.binding.classes 
org.jibx.binding.def 
org.jibx.extrasExtra goodies for working with JiBX.
org.jibx.runtimeUser interface to JiBX data binding framework runtime.
org.jibx.runtime.implJiBX data binding framework runtime implementation package.
+ +


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/serialized-form.html +++ libjibx-java-1.0.1/build/docs/dev/serialized-form.html @@ -0,0 +1,225 @@ + + + + + + +Serialized Form (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+
+

+Serialized Form

+
+
+ + + + + +
+Package org.jibx.binding.classes
+ +

+ + + + + +
+Class org.jibx.binding.classes.InstructionBuilder extends org.apache.bcel.generic.InstructionFactory implements Serializable
+ +

+


+ + + + + +
+Package org.jibx.runtime
+ +

+ + + + + +
+Class org.jibx.runtime.JiBXException extends java.lang.Exception implements Serializable
+ +

+ + + + + +
+Serialized Fields
+ +

+m_rootCause

+
+java.lang.Throwable m_rootCause
+
+
Exception that caused this exception. +

+

+
+
+ +

+ + + + + +
+Class org.jibx.runtime.RecoverableException extends JiBXException implements Serializable
+ +

+ +

+ + + + + +
+Class org.jibx.runtime.UnrecoverableException extends JiBXException implements Serializable
+ +

+ +

+ + + + + +
+Class org.jibx.runtime.ValidationException extends RecoverableException implements Serializable
+ +

+ +

+


+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/stylesheet.css +++ libjibx-java-1.0.1/build/docs/dev/stylesheet.css @@ -0,0 +1,29 @@ +/* Javadoc style sheet */ + +/* Define colors, fonts and other style attributes here to override the defaults */ + +/* Page background color */ +body { background-color: #FFFFFF; color:#000000 } + +/* Headings */ +h1 { font-size: 145% } + +/* Table colors */ +.TableHeadingColor { background: #CCCCFF; color:#000000 } /* Dark mauve */ +.TableSubHeadingColor { background: #EEEEFF; color:#000000 } /* Light mauve */ +.TableRowColor { background: #FFFFFF; color:#000000 } /* White */ + +/* Font used in left-hand frame lists */ +.FrameTitleFont { font-size: 100%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameHeadingFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } +.FrameItemFont { font-size: 90%; font-family: Helvetica, Arial, sans-serif; color:#000000 } + +/* Navigation bar fonts and colors */ +.NavBarCell1 { background-color:#EEEEFF; color:#000000} /* Light mauve */ +.NavBarCell1Rev { background-color:#00008B; color:#FFFFFF} /* Dark Blue */ +.NavBarFont1 { font-family: Arial, Helvetica, sans-serif; color:#000000;color:#000000;} +.NavBarFont1Rev { font-family: Arial, Helvetica, sans-serif; color:#FFFFFF;color:#FFFFFF;} + +.NavBarCell2 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} +.NavBarCell3 { font-family: Arial, Helvetica, sans-serif; background-color:#FFFFFF; color:#000000} + --- libjibx-java-1.0.1.orig/build/docs/dev/allclasses-frame.html +++ libjibx-java-1.0.1/build/docs/dev/allclasses-frame.html @@ -0,0 +1,283 @@ + + + + + + +All Classes (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +All Classes +
+ + + + + +
ArrayRangeIterator +
+BackFillArray +
+BackFillHolder +
+BackFillReference +
+BaseMappingWrapper +
+BindingBuilder +
+BindingBuilder.ContainerBase +
+BindingDefinition +
+BindingDirectory +
+BindingGenerator +
+BindingMethod +
+BindingSelector +
+BoundClass +
+BranchTarget +
+BranchWrapper +
+ClassCache +
+ClassFile +
+ClassItem +
+Compile +
+Compile.DirectLoader +
+ComponentProperty +
+ContextMethodBuilder +
+DefinitionContext +
+DirectGeneric +
+DirectObject +
+DirectProperty +
+DiscardElementMapper +
+DiscardListMapper +
+DocumentComparator +
+DocumentModelMapperBase +
+Dom4JElementMapper +
+Dom4JListMapper +
+Dom4JMapperBase +
+DomElementMapper +
+DomFragmentMapper +
+DomListMapper +
+DomMapperBase +
+ElementWrapper +
+EnumSet +
+EnumSet.EnumItem +
+ExceptionMethodBuilder +
+ExistingMethod +
+GenericXMLWriter +
+HashMapperStringToComplex +
+HashMapperStringToSchemaType +
+IAbstractMarshaller +
+IAliasable +
+IBindingFactory +
+ICharacterEscaper +
+IComponent +
+IContainer +
+IContextObj +
+IdDefRefMapperBase +
+IdRefMapperBase +
+IMapping +
+IMarshallable +
+IMarshaller +
+IMarshallingContext +
+InputStreamWrapper +
+InstructionBuilder +
+ISO88591Escaper +
+ISO88591StreamWriter +
+ITrackSource +
+ITrackSourceImpl +
+IUnmarshallable +
+IUnmarshaller +
+IUnmarshallingContext +
+IXMLWriter +
+JDOMWriter +
+JiBXException +
+LinkableBase +
+Loader +
+MappingBase +
+MappingDefinition +
+MappingDirect +
+MappingReference +
+MarshalBuilder +
+MarshallingContext +
+MarshalUnmarshalBuilder +
+MethodBuilder +
+MungedClass +
+MungedClass.JiBXFilter +
+NameDefinition +
+NamespaceDefinition +
+NestedBase +
+NestedCollection +
+NestedCollection.AddStore +
+NestedCollection.ArrayLoad +
+NestedCollection.ArrayStore +
+NestedCollection.CollectionLoad +
+NestedCollection.CollectionStore +
+NestedCollection.IndexedLoad +
+NestedCollection.IndexedStore +
+NestedCollection.IteratorLoad +
+NestedStructure +
+ObjectArrayMapper +
+ObjectBinding +
+ObjectStringConversion +
+OptionalStructureWrapper +
+PassThroughComponent +
+PrimitiveStringConversion +
+PropertyDefinition +
+QName +
+RecoverableException +
+Run +
+SchemaGenerator +
+SparseArrayIterator +
+StreamWriterBase +
+StringConversion +
+StringIntHashMap +
+StructureReference +
+TestMultRoundtrip +
+TestRoundtrip +
+TypedArrayMapper +
+UnmarshalBuilder +
+UnmarshallingContext +
+UnrecoverableException +
+USASCIIEscaper +
+UTF8Escaper +
+UTF8StreamWriter +
+Utility +
+Utility +
+ValidationException +
+ValueChild +
+XMLWriterBase +
+XMLWriterNamespaceBase +
+XMLWriterNamespaceBase.DeclarationInfo +
+
+ + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/HashMapperStringToSchemaType.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/HashMapperStringToSchemaType.html @@ -0,0 +1,1015 @@ + + + + + + +HashMapperStringToSchemaType (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class HashMapperStringToSchemaType

+
+java.lang.Object
+  extended by org.jibx.extras.HashMapperStringToSchemaType
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class HashMapperStringToSchemaType
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom marshaller/unmarshaller for java.util.Map + instances. This handles mapping hash maps with string keys and values that + match basic schema datatypes to and from XML. The key objects are marshalled + as simple text values, using the toString() method to convert + them to String if they are not already of that type. When + unmarshalling the keys are always treated as String values. The + corresponding values can be any of the object types corresponding to basic + schema data types, and are marshalled with xsi:type attributes to specify the + type of each value. The types currently supported are Byte, + Double, Float, Integer, + Long, java.util.Date (as xsd:dateTime), + java.sql.Date (as xsd:date), java.sql.Time (as + xsd:time), java.math.BigDecimal (with no exponent allowed, as + xsd:decimal), and java.math.BigInteger (as xsd:integer). The + xsd:type attribute is checked when unmarshalling values to select the proper + deserialization and value type. The name of the top-level element in the XML + structure can be configured in the binding definition, but the rest of the + names are predefined and set in the code (though the namespace configured for + the top-level element will be used with all the names).

+ +

The net effect is that the XML structure will always be of the form:

+ +
<map-name size="6" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
+     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+   <entry key="name" xsi:type="xsd:string">John Smith</entry>
+   <entry key="street" xsi:type="xsd:string">12345 Happy Lane</entry>
+   <entry key="city" xsi:type="xsd:string">Plunk</entry>
+   <entry key="state" xsi:type="xsd:string">WA</entry>
+   <entry key="rating" xsi:type="xsd:int">6</entry>
+   <entry key="joined" xsi:type="xsd:dateTime">2002-08-06T00:13:31Z</entry>
+ </map-name>
+ +

where "map-name" is the configured top-level element name, the "size" + attribute is the number of pairs in the hash map, and the "entry" elements + are the actual entries in the hash map.

+ +

For unmarshalling this requires an active namespace declaration with a + prefix for the schema namespace. All xsi:type attribute values must use this + prefix. If more than one prefix is declared for the schema namespace, the + innermost one declared must be used.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intBOOLEAN_TYPE + +
+           
+static intBYTE_TYPE + +
+           
+static intBYTERRAY_TYPE + +
+           
+static intDATE_TYPE + +
+           
+static intDATETIME_TYPE + +
+           
+static intDECIMAL_TYPE + +
+           
+private static intDEFAULT_SIZE + +
+           
+static intDOUBLE_TYPE + +
+           
+private static java.lang.StringENTRY_ELEMENT_NAME + +
+           
+static intFLOAT_TYPE + +
+           
+static intINT_TYPE + +
+           
+static intINTEGER_TYPE + +
+           
+private static java.lang.StringKEY_ATTRIBUTE_NAME + +
+           
+static intLONG_TYPE + +
+           
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+private static EnumSets_javaTypesEnum + +
+           
+private static EnumSets_schemaTypesEnum + +
+           
+private static java.lang.String[]SCHEMA_NAMESPACE_PREFIXES + +
+           
+private static java.lang.String[]SCHEMA_NAMESPACE_URIS + +
+           
+static intSHORT_TYPE + +
+           
+private static java.lang.StringSIZE_ATTRIBUTE_NAME + +
+           
+static intSTRING_TYPE + +
+           
+static intTIME_TYPE + +
+           
+private static java.lang.StringTYPE_ATTRIBUTE_NAME + +
+           
+private static java.lang.StringXSD_NAMESPACE_PREFIX + +
+           
+private static java.lang.StringXSD_NAMESPACE_URI + +
+           
+private static java.lang.StringXSD_PREFIX_LEAD + +
+           
+private static java.lang.StringXSI_NAMESPACE_PREFIX + +
+           
+private static java.lang.StringXSI_NAMESPACE_URI + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
HashMapperStringToSchemaType() + +
+          Default constructor.
HashMapperStringToSchemaType(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+SIZE_ATTRIBUTE_NAME

+
+private static final java.lang.String SIZE_ATTRIBUTE_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ENTRY_ELEMENT_NAME

+
+private static final java.lang.String ENTRY_ELEMENT_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+KEY_ATTRIBUTE_NAME

+
+private static final java.lang.String KEY_ATTRIBUTE_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TYPE_ATTRIBUTE_NAME

+
+private static final java.lang.String TYPE_ATTRIBUTE_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+XSI_NAMESPACE_URI

+
+private static final java.lang.String XSI_NAMESPACE_URI
+
+
+
See Also:
Constant Field Values
+
+
+ +

+XSD_NAMESPACE_URI

+
+private static final java.lang.String XSD_NAMESPACE_URI
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SCHEMA_NAMESPACE_URIS

+
+private static final java.lang.String[] SCHEMA_NAMESPACE_URIS
+
+
+
+
+
+ +

+XSI_NAMESPACE_PREFIX

+
+private static final java.lang.String XSI_NAMESPACE_PREFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+XSD_NAMESPACE_PREFIX

+
+private static final java.lang.String XSD_NAMESPACE_PREFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SCHEMA_NAMESPACE_PREFIXES

+
+private static final java.lang.String[] SCHEMA_NAMESPACE_PREFIXES
+
+
+
+
+
+ +

+XSD_PREFIX_LEAD

+
+private static final java.lang.String XSD_PREFIX_LEAD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_SIZE

+
+private static final int DEFAULT_SIZE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BOOLEAN_TYPE

+
+public static final int BOOLEAN_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BYTE_TYPE

+
+public static final int BYTE_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DOUBLE_TYPE

+
+public static final int DOUBLE_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FLOAT_TYPE

+
+public static final int FLOAT_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+INT_TYPE

+
+public static final int INT_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+LONG_TYPE

+
+public static final int LONG_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SHORT_TYPE

+
+public static final int SHORT_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DATETIME_TYPE

+
+public static final int DATETIME_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DATE_TYPE

+
+public static final int DATE_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TIME_TYPE

+
+public static final int TIME_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DECIMAL_TYPE

+
+public static final int DECIMAL_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+INTEGER_TYPE

+
+public static final int INTEGER_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BYTERRAY_TYPE

+
+public static final int BYTERRAY_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRING_TYPE

+
+public static final int STRING_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+s_javaTypesEnum

+
+private static final EnumSet s_javaTypesEnum
+
+
+
+
+
+ +

+s_schemaTypesEnum

+
+private static final EnumSet s_schemaTypesEnum
+
+
+
+
+
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+HashMapperStringToSchemaType

+
+public HashMapperStringToSchemaType()
+
+
Default constructor. This uses a pre-defined name for the top-level + element. It'll be used by JiBX when no name information is supplied by + the mapping which references this custom marshaller/unmarshaller. +

+

+
+ +

+HashMapperStringToSchemaType

+
+public HashMapperStringToSchemaType(java.lang.String uri,
+                                    int index,
+                                    java.lang.String name)
+
+
Aliased constructor. This takes a name definition for the top-level + element. It'll be used by JiBX when a name is supplied by the mapping + which references this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element (also used for all + other names within the binding)
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/QName.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/QName.html @@ -0,0 +1,517 @@ + + + + + + +QName (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class QName

+
+java.lang.Object
+  extended by org.jibx.extras.QName
+
+
+
+
public class QName
extends java.lang.Object
+ + +

+Representation of a qualified name. This includes the serializer/deserializer + methods for the representation. It assumes that the actual namespace + declarations are being handled separately for marshalling. +

+ +

+

+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_prefix + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
QName() + +
+          Default constructor.
QName(java.lang.String uri, + java.lang.String prefix, + java.lang.String name) + +
+          Constructor from full set of components.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static QNamedeserialize(java.lang.String text, + IUnmarshallingContext ictx) + +
+          JiBX deserializer method.
+ java.lang.StringgetName() + +
+          Get local name.
+ java.lang.StringgetPrefix() + +
+          Get namespace prefix.
+ java.lang.StringgetUri() + +
+          Get namespace URI.
+static java.lang.Stringserialize(QName qname, + IMarshallingContext ictx) + +
+          JiBX serializer method.
+ voidsetName(java.lang.String name) + +
+          Set local name.
+ voidsetPrefix(java.lang.String prefix) + +
+          Set namespace prefix.
+ voidsetUri(java.lang.String uri) + +
+          Set namespace URI.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_prefix

+
+private java.lang.String m_prefix
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+QName

+
+public QName()
+
+
Default constructor. +

+

+
+ +

+QName

+
+public QName(java.lang.String uri,
+             java.lang.String prefix,
+             java.lang.String name)
+
+
Constructor from full set of components. +

+

+
Parameters:
uri -
prefix -
name -
+
+ + + + + + + + +
+Method Detail
+ +

+getName

+
+public java.lang.String getName()
+
+
Get local name. +

+

+ +
Returns:
name
+
+
+
+ +

+setName

+
+public void setName(java.lang.String name)
+
+
Set local name. +

+

+
Parameters:
name - name
+
+
+
+ +

+getPrefix

+
+public java.lang.String getPrefix()
+
+
Get namespace prefix. +

+

+ +
Returns:
prefix
+
+
+
+ +

+setPrefix

+
+public void setPrefix(java.lang.String prefix)
+
+
Set namespace prefix. +

+

+
Parameters:
prefix - prefix
+
+
+
+ +

+getUri

+
+public java.lang.String getUri()
+
+
Get namespace URI. +

+

+ +
Returns:
uri
+
+
+
+ +

+setUri

+
+public void setUri(java.lang.String uri)
+
+
Set namespace URI. +

+

+
Parameters:
uri - uri
+
+
+
+ +

+deserialize

+
+public static QName deserialize(java.lang.String text,
+                                IUnmarshallingContext ictx)
+                         throws JiBXException
+
+
JiBX deserializer method. This is intended for use as a deserializer for + instances of the class. +

+

+
Parameters:
text - value text
ictx - unmarshalling context +
Returns:
created class instance +
Throws: +
JiBXException - on error in unmarshalling
+
+
+
+ +

+serialize

+
+public static java.lang.String serialize(QName qname,
+                                         IMarshallingContext ictx)
+                                  throws JiBXException
+
+
JiBX serializer method. This is intended for use as a serializer for + instances of the class. The namespace must be active in the output + document at the point where this is called. +

+

+
Parameters:
text - value text
ictx - unmarshalling context +
Returns:
created class instance +
Throws: +
JiBXException - on error in marshalling
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DocumentModelMapperBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DocumentModelMapperBase.html @@ -0,0 +1,430 @@ + + + + + + +DocumentModelMapperBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DocumentModelMapperBase

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+
+
+
Direct Known Subclasses:
Dom4JMapperBase, DomMapperBase
+
+
+
+
public class DocumentModelMapperBase
extends java.lang.Object
+ + +

+

Base implementation for custom marshaller/unmarshallers to any document + model representation. This class just provides a few basic operations that + are used by the representation-specific subclasses.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  UnmarshallingContextm_unmarshalContext + +
+          Context being used for unmarshalling.
+protected  IXMLWriterm_xmlWriter + +
+          Writer for direct output as XML.
+static java.lang.StringXML_NAMESPACE + +
+          Fixed XML namespace.
+static java.lang.StringXMLNS_NAMESPACE + +
+          Fixed XML namespace namespace.
+  + + + + + + + + + + +
+Constructor Summary
DocumentModelMapperBase() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.StringaccumulateText() + +
+          Accumulate text content.
+protected  java.lang.StringgetNamespaceUri(int index) + +
+          Get namespace URI for index.
+protected  intgetNextNamespaceIndex() + +
+          Get next namespace index.
+protected  booleanisWhitespace(char chr) + +
+          Check if a character is a space character.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+XML_NAMESPACE

+
+public static final java.lang.String XML_NAMESPACE
+
+
Fixed XML namespace. +

+

+
See Also:
Constant Field Values
+
+
+ +

+XMLNS_NAMESPACE

+
+public static final java.lang.String XMLNS_NAMESPACE
+
+
Fixed XML namespace namespace. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_xmlWriter

+
+protected IXMLWriter m_xmlWriter
+
+
Writer for direct output as XML. +

+

+
+
+
+ +

+m_unmarshalContext

+
+protected UnmarshallingContext m_unmarshalContext
+
+
Context being used for unmarshalling. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DocumentModelMapperBase

+
+public DocumentModelMapperBase()
+
+
+ + + + + + + + +
+Method Detail
+ +

+getNamespaceUri

+
+protected java.lang.String getNamespaceUri(int index)
+
+
Get namespace URI for index. +

+

+
Parameters:
index - namespace index to look up +
Returns:
uri namespace URI at index position
+
+
+
+ +

+getNextNamespaceIndex

+
+protected int getNextNamespaceIndex()
+
+
Get next namespace index. +

+

+ +
Returns:
next namespace index
+
+
+
+ +

+accumulateText

+
+protected java.lang.String accumulateText()
+                                   throws JiBXException
+
+
Accumulate text content. This consolidates consecutive text and entities + to a single string. +

+

+ +
Returns:
consolidated text string +
Throws: +
JiBXException - on error in unmarshalling
+
+
+
+ +

+isWhitespace

+
+protected boolean isWhitespace(char chr)
+
+
Check if a character is a space character. +

+

+
Parameters:
chr - character to be checked +
Returns:
true if whitespace, false if not
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/Dom4JElementMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/Dom4JElementMapper.html @@ -0,0 +1,521 @@ + + + + + + +Dom4JElementMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class Dom4JElementMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.Dom4JMapperBase
+          extended by org.jibx.extras.Dom4JElementMapper
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class Dom4JElementMapper
extends Dom4JMapperBase
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom element marshaller/unmarshaller to dom4j representation. This + allows you to mix data binding and document model representations for XML + within the same application. You simply use this marshaller/unmarshaller with + a linked object type of org.dom4j.Element (the actual runtime + type - the declared type is ignored and can be anything). If a name is + supplied on a reference that element name will always be matched when + unmarshalling but will be ignored when marshalling (with the actual dom4j + element name used). If no name is supplied this will unmarshal a single + element with any name.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_index + +
+          Namespace URI index in binding.
+private  java.lang.Stringm_name + +
+          Root element name.
+private  java.lang.Stringm_uri + +
+          Root element namespace URI.
+ + + + + + + +
Fields inherited from class org.jibx.extras.Dom4JMapperBase
m_defaultNamespaceIndex, m_defaultNamespaceURI
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + + + + +
+Constructor Summary
Dom4JElementMapper() + +
+          Default constructor.
Dom4JElementMapper(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class org.jibx.extras.Dom4JMapperBase
marshalContent, marshalElement, unmarshalContent, unmarshalElement
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_uri

+
+private final java.lang.String m_uri
+
+
Root element namespace URI. +

+

+
+
+
+ +

+m_index

+
+private final int m_index
+
+
Namespace URI index in binding. +

+

+
+
+
+ +

+m_name

+
+private final java.lang.String m_name
+
+
Root element name. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Dom4JElementMapper

+
+public Dom4JElementMapper()
+
+
Default constructor. +

+

+
+ +

+Dom4JElementMapper

+
+public Dom4JElementMapper(java.lang.String uri,
+                          int index,
+                          java.lang.String name)
+
+
Aliased constructor. This takes a name definition for the element. It'll + be used by JiBX when a name is supplied by the mapping which references + this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/TestRoundtrip.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/TestRoundtrip.html @@ -0,0 +1,293 @@ + + + + + + +TestRoundtrip (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class TestRoundtrip

+
+java.lang.Object
+  extended by org.jibx.extras.TestRoundtrip
+
+
+
+
public class TestRoundtrip
extends java.lang.Object
+ + +

+Test program for the JiBX framework. Works with two or three command line + arguments: mapped-class, in-file, and out-file (optional, only needed if + different from in-file). You can also supply a multiple of three input + arguments, in which case each set of three is processed in turn (in this case + the out-file is required). Unmarshals documents from files using the binding + defined for the mapped class, then marshals them back out using the same + bindings and compares the results. In case of a comparison error the output + file is left as temp.xml. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
TestRoundtrip() + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+static voidmain(java.lang.String[] args) + +
+           
+protected static booleanrunTest(java.lang.String mname, + java.lang.String bname, + java.lang.String fin, + java.lang.String fout) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+TestRoundtrip

+
+public TestRoundtrip()
+
+
+ + + + + + + + +
+Method Detail
+ +

+runTest

+
+protected static boolean runTest(java.lang.String mname,
+                                 java.lang.String bname,
+                                 java.lang.String fin,
+                                 java.lang.String fout)
+                          throws java.io.IOException,
+                                 JiBXException,
+                                 org.xmlpull.v1.XmlPullParserException
+
+
+ +
Throws: +
java.io.IOException +
JiBXException +
org.xmlpull.v1.XmlPullParserException
+
+
+
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/Dom4JMapperBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/Dom4JMapperBase.html @@ -0,0 +1,468 @@ + + + + + + +Dom4JMapperBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class Dom4JMapperBase

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.Dom4JMapperBase
+
+
+
Direct Known Subclasses:
Dom4JElementMapper, Dom4JListMapper
+
+
+
+
public class Dom4JMapperBase
extends DocumentModelMapperBase
+ + +

+

Base implementation for custom marshaller/unmarshallers to dom4j + representation. This provides the basic code used for both single element and + content list handling.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  intm_defaultNamespaceIndex + +
+          Current default namespace index.
+protected  java.lang.Stringm_defaultNamespaceURI + +
+          Current default namespace URI (null if not determined).
+private static org.dom4j.DocumentFactorys_factory + +
+          dom4j component construction factory.
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + +
+Constructor Summary
Dom4JMapperBase() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  intfindNamespaceIndex(org.dom4j.Namespace ns) + +
+          Get index number for declared namespace.
+protected  voidmarshalContent(java.util.List content) + +
+          Marshal content list.
+protected  voidmarshalElement(org.dom4j.Element element) + +
+          Marshal element with all attributes and content.
+protected  voidunmarshalContent(java.util.List content) + +
+          Unmarshal element content.
+protected  org.dom4j.ElementunmarshalElement() + +
+          Unmarshal element with all attributes and content.
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_factory

+
+private static org.dom4j.DocumentFactory s_factory
+
+
dom4j component construction factory. +

+

+
+
+
+ +

+m_defaultNamespaceURI

+
+protected java.lang.String m_defaultNamespaceURI
+
+
Current default namespace URI (null if not determined). +

+

+
+
+
+ +

+m_defaultNamespaceIndex

+
+protected int m_defaultNamespaceIndex
+
+
Current default namespace index. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Dom4JMapperBase

+
+public Dom4JMapperBase()
+
+
+ + + + + + + + +
+Method Detail
+ +

+findNamespaceIndex

+
+private int findNamespaceIndex(org.dom4j.Namespace ns)
+
+
Get index number for declared namespace. +

+

+
Parameters:
ns - namespace of interest +
Returns:
namespace index number, or -1 if not declared or + masked
+
+
+
+ +

+marshalContent

+
+protected void marshalContent(java.util.List content)
+                       throws JiBXException,
+                              java.io.IOException
+
+
Marshal content list. +

+

+
Parameters:
content - list of content items to marshal +
Throws: +
JiBXException - on error in marshalling +
java.io.IOException - on error writing to output
+
+
+
+ +

+marshalElement

+
+protected void marshalElement(org.dom4j.Element element)
+                       throws JiBXException,
+                              java.io.IOException
+
+
Marshal element with all attributes and content. +

+

+
Parameters:
element - element to be marshalled +
Throws: +
JiBXException - on error in marshalling +
java.io.IOException - on error writing to output
+
+
+
+ +

+unmarshalContent

+
+protected void unmarshalContent(java.util.List content)
+                         throws JiBXException,
+                                java.io.IOException
+
+
Unmarshal element content. This unmarshals everything up to the + containing element close tag, adding each component to the content list + supplied. On return, the parse position will always be at an END_TAG. +

+

+
Parameters:
content - list for unmarshalled content +
Throws: +
JiBXException - on error in unmarshalling +
java.io.IOException - on error reading input
+
+
+
+ +

+unmarshalElement

+
+protected org.dom4j.Element unmarshalElement()
+                                      throws JiBXException,
+                                             java.io.IOException
+
+
Unmarshal element with all attributes and content. This must be called + with the unmarshalling context positioned at a START_TAG event. +

+

+ +
Returns:
unmarshalled element +
Throws: +
JiBXException - on error in unmarshalling +
java.io.IOException - on error reading input
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DiscardListMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DiscardListMapper.html @@ -0,0 +1,369 @@ + + + + + + +DiscardListMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DiscardListMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DiscardListMapper
+
+
+
All Implemented Interfaces:
IMarshaller, IUnmarshaller
+
+
+
+
public class DiscardListMapper
extends java.lang.Object
implements IMarshaller, IUnmarshaller
+ + +

+

Custom marshaller/unmarshaller for arbitrary ignored content to end of + element. This ignores all content to the end of the enclosing element when + unmarshalling, and does nothing with marshalling.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
DiscardListMapper() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+DiscardListMapper

+
+public DiscardListMapper()
+
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/TestMultRoundtrip.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/TestMultRoundtrip.html @@ -0,0 +1,261 @@ + + + + + + +TestMultRoundtrip (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class TestMultRoundtrip

+
+java.lang.Object
+  extended by org.jibx.extras.TestMultRoundtrip
+
+
+
+
public class TestMultRoundtrip
extends java.lang.Object
+ + +

+Test program for the JiBX framework. Works with three or four command line + arguments: mapped-class, binding-name, in-file, and out-file (optional, only + needed if different from in-file). You can also supply a multiple of four + input arguments, in which case each set of four is processed in turn (in this + case the out-file is required). Unmarshals documents from files using the + specified bindings for the mapped classes, then marshals them back out using + the same bindings and compares the results. In case of a comparison error the + output file is left as temp.xml . +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
TestMultRoundtrip() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+static voidmain(java.lang.String[] args) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+TestMultRoundtrip

+
+public TestMultRoundtrip()
+
+
+ + + + + + + + +
+Method Detail
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DomListMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DomListMapper.html @@ -0,0 +1,432 @@ + + + + + + +DomListMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DomListMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.DomMapperBase
+          extended by org.jibx.extras.DomListMapper
+
+
+
All Implemented Interfaces:
IMarshaller, IUnmarshaller
+
+
+
+
public class DomListMapper
extends DomMapperBase
implements IMarshaller, IUnmarshaller
+ + +

+

Custom content list marshaller/unmarshaller to DOM representation. This + allows you to mix data binding and document model representations for XML + within the same application. You simply use this marshaller/unmarshaller with + a linked object type that implements java.util.List (the actual + runtime type - the declared type is ignored and can be anything). When + unmarshalling it will create an instance of java.util.ArrayList + if a list is not passed in and any content is present, then return all the + content up to the close tag for the enclosing element in the list. When + marshalling, it will simply write out any content directly.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.extras.DomMapperBase
m_defaultNamespaceIndex, m_defaultNamespaceURI, m_document
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + +
+Constructor Summary
DomListMapper() + +
+          Default constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class org.jibx.extras.DomMapperBase
marshalContent, marshalElement, marshalNode, unmarshalContent, unmarshalElement, unmarshalNode
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+DomListMapper

+
+public DomListMapper()
+              throws JiBXException
+
+
Default constructor. +

+

+ +
Throws: +
JiBXException - on configuration error
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/ObjectArrayMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/ObjectArrayMapper.html @@ -0,0 +1,513 @@ + + + + + + +ObjectArrayMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class ObjectArrayMapper

+
+java.lang.Object
+  extended by org.jibx.extras.ObjectArrayMapper
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class ObjectArrayMapper
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom marshaller/unmarshaller for Object[] instances. This + handles mapping arrays typed as java.lang.Object[], where each + item in the array must be of a mapped type. If a name is specified by the + mapping definition that name is used as a wrapper around the elements + representing the items in the array; otherwise, the elements are just handled + inline.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.Object[]DUMMY_ARRAY + +
+           
+private  java.util.ArrayListm_holder + +
+           
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
ObjectArrayMapper() + +
+          Default constructor.
ObjectArrayMapper(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DUMMY_ARRAY

+
+private static final java.lang.Object[] DUMMY_ARRAY
+
+
+
+
+
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+
+ +

+m_holder

+
+private java.util.ArrayList m_holder
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ObjectArrayMapper

+
+public ObjectArrayMapper()
+
+
Default constructor. This just sets up for an XML representation with no + element wrapping the actual item structures. It'll be used by JiBX when + no name information is supplied by the mapping which references this + custom marshaller/unmarshaller. +

+

+
+ +

+ObjectArrayMapper

+
+public ObjectArrayMapper(java.lang.String uri,
+                         int index,
+                         java.lang.String name)
+
+
Aliased constructor. This takes a name definition for the top-level + wrapper element. It'll be used by JiBX when a name is supplied by the + mapping which references this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/JDOMWriter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/JDOMWriter.html @@ -0,0 +1,971 @@ + + + + + + +JDOMWriter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class JDOMWriter

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.extras.JDOMWriter
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
+
public class JDOMWriter
extends XMLWriterNamespaceBase
+ + +

+JDOM implementation of XML writer interface. The Document that is + created can be accessed by using getDocument(). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Andreas Brenk
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  org.jdom.ElementcurrentElement + +
+          The currently open Element that is used for add* methods.
+private  org.jdom.Documentdocument + +
+          The JDOM Document this writer is creating.
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
JDOMWriter(java.lang.String[] namespaces) + +
+          Creates a new instance with the given namespace URIs.
JDOMWriter(java.lang.String[] namespaces, + org.jdom.Document document) + +
+          Creates a new instance with the given Document as target for marshalling.
JDOMWriter(java.lang.String[] namespaces, + org.jdom.Element currentElement) + +
+          Creates a new instance with the given Element as target for marshalling.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddAttribute(int index, + java.lang.String name, + java.lang.String value) + +
+          Add attribute to current open start tag.
+ voidclose() + +
+          Does nothing.
+ voidcloseEmptyTag() + +
+          Close the current open start tag as an empty element.
+ voidcloseStartTag() + +
+          Close the current open start tag.
+protected  voiddefineNamespace(int index, + java.lang.String prefix) + +
+          Does nothing.
+ voidendTag(int index, + java.lang.String name) + +
+          Generate end tag.
+ voidflush() + +
+          Does nothing.
+ org.jdom.DocumentgetDocument() + +
+           
+private  org.jdom.NamespacegetNamespace(int index) + +
+          This will retrieve (if in existence) or create (if not) a + Namespace for the supplied namespace index.
+ voidindent() + +
+          Does nothing.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidsetIndentSpaces(int count, + java.lang.String newline, + char indent) + +
+          Does nothing.
+ voidstartTagClosed(int index, + java.lang.String name) + +
+          Generate closed start tag.
+ voidstartTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + +
+          Generate start tag for element with namespaces.
+ voidstartTagOpen(int index, + java.lang.String name) + +
+          Generate open start tag.
+protected  voidundefineNamespace(int index) + +
+          Does nothing.
+ voidwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+ voidwriteComment(java.lang.String text) + +
+          Write comment to document.
+ voidwriteDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + +
+          Write DOCTYPE declaration to document.
+ voidwriteEntityRef(java.lang.String name) + +
+          Write entity reference to document.
+ voidwritePI(java.lang.String target, + java.lang.String data) + +
+          Write processing instruction to document.
+ voidwriteTextContent(java.lang.String text) + +
+          Write ordinary character data text content to document.
+ voidwriteXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + +
+          Does nothing.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, popExtensionNamespaces, pushExtensionNamespaces, shrinkArray
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+document

+
+private org.jdom.Document document
+
+
The JDOM Document this writer is creating. +

+

+
+
+
+ +

+currentElement

+
+private org.jdom.Element currentElement
+
+
The currently open Element that is used for add* methods. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+JDOMWriter

+
+public JDOMWriter(java.lang.String[] namespaces)
+
+
Creates a new instance with the given namespace URIs. +

+

+
+ +

+JDOMWriter

+
+public JDOMWriter(java.lang.String[] namespaces,
+                  org.jdom.Document document)
+
+
Creates a new instance with the given Document as target for marshalling. +

+

+
Parameters:
document - must not be null
+
+
+ +

+JDOMWriter

+
+public JDOMWriter(java.lang.String[] namespaces,
+                  org.jdom.Element currentElement)
+
+
Creates a new instance with the given Element as target for marshalling. +

+

+
Parameters:
currentElement - must not be null
+
+ + + + + + + + +
+Method Detail
+ +

+setIndentSpaces

+
+public void setIndentSpaces(int count,
+                            java.lang.String newline,
+                            char indent)
+
+
Does nothing. +

+

+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+writeXMLDecl

+
+public void writeXMLDecl(java.lang.String version,
+                         java.lang.String encoding,
+                         java.lang.String standalone)
+                  throws java.io.IOException
+
+
Does nothing. +

+

+
Parameters:
version - XML version text
encoding - text for encoding attribute (unspecified if + null)
standalone - text for standalone attribute (unspecified if + null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagOpen

+
+public void startTagOpen(int index,
+                         java.lang.String name)
+                  throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Generate open start tag. This allows attributes and/or namespace + declarations to be added to the start tag, but must be followed by a + IXMLWriter.closeStartTag() call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagNamespaces

+
+public void startTagNamespaces(int index,
+                               java.lang.String name,
+                               int[] nums,
+                               java.lang.String[] prefs)
+                        throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Generate start tag for element with namespaces. This creates the actual + start tag, along with any necessary namespace declarations. Previously + active namespace declarations are not duplicated. The tag is + left incomplete, allowing other attributes to be added. +

+

+
Parameters:
index - namespace URI index number
name - element name
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until end of element)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+addAttribute

+
+public void addAttribute(int index,
+                         java.lang.String name,
+                         java.lang.String value)
+                  throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Add attribute to current open start tag. This is only valid after a call + to IXMLWriter.startTagOpen(int, java.lang.String) and before the corresponding call to IXMLWriter.closeStartTag(). +

+

+
Parameters:
index - namespace URI index number
name - unqualified attribute name
value - text value for attribute +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeStartTag

+
+public void closeStartTag()
+                   throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Close the current open start tag. This is only valid after a call to + IXMLWriter.startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeEmptyTag

+
+public void closeEmptyTag()
+                   throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Close the current open start tag as an empty element. This is only valid + after a call to IXMLWriter.startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagClosed

+
+public void startTagClosed(int index,
+                           java.lang.String name)
+                    throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Generate closed start tag. No attributes or namespaces can be added to a + start tag written using this call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+endTag

+
+public void endTag(int index,
+                   java.lang.String name)
+            throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Generate end tag. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeTextContent

+
+public void writeTextContent(java.lang.String text)
+                      throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write ordinary character data text content to document. +

+

+
Parameters:
text - content value text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text)
+                throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write CDATA text to document. +

+

+
Parameters:
text - content value text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeComment

+
+public void writeComment(java.lang.String text)
+                  throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write comment to document. +

+

+
Parameters:
text - comment text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeEntityRef

+
+public void writeEntityRef(java.lang.String name)
+                    throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write entity reference to document. +

+

+
Parameters:
name - entity name (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeDocType

+
+public void writeDocType(java.lang.String name,
+                         java.lang.String sys,
+                         java.lang.String pub,
+                         java.lang.String subset)
+                  throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write DOCTYPE declaration to document. +

+

+
Parameters:
name - root element name
sys - system ID (null if none, must be + non-null for public ID to be used)
pub - public ID (null if none)
subset - internal subset (null if none) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writePI

+
+public void writePI(java.lang.String target,
+                    java.lang.String data)
+             throws java.io.IOException
+
+
Description copied from interface: IXMLWriter
+
Write processing instruction to document. +

+

+
Parameters:
target - processing instruction target name (must not be + null)
data - processing instruction data (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+indent

+
+public void indent()
+            throws java.io.IOException
+
+
Does nothing. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+flush

+
+public void flush()
+           throws java.io.IOException
+
+
Does nothing. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
Does nothing. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+reset

+
+public void reset()
+
+
Description copied from class: XMLWriterNamespaceBase
+
Reset to initial state for reuse. Subclasses overriding this method need + to call this base class implementation during their processing. +

+

+
Specified by:
reset in interface IXMLWriter
Overrides:
reset in class XMLWriterNamespaceBase
+
+
+
+
+
+
+ +

+getDocument

+
+public org.jdom.Document getDocument()
+
+
+ +
Returns:
the JDOM Document this writer created.
+
+
+
+ +

+defineNamespace

+
+protected void defineNamespace(int index,
+                               java.lang.String prefix)
+                        throws java.io.IOException
+
+
Does nothing. +

+

+
Specified by:
defineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
prefix - prefix used for namespace +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+undefineNamespace

+
+protected void undefineNamespace(int index)
+
+
Does nothing. +

+

+
Specified by:
undefineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
+
+
+
+ +

+getNamespace

+
+private org.jdom.Namespace getNamespace(int index)
+
+
This will retrieve (if in existence) or create (if not) a + Namespace for the supplied namespace index. +

+

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DomFragmentMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DomFragmentMapper.html @@ -0,0 +1,431 @@ + + + + + + +DomFragmentMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DomFragmentMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.DomMapperBase
+          extended by org.jibx.extras.DomFragmentMapper
+
+
+
All Implemented Interfaces:
IMarshaller, IUnmarshaller
+
+
+
+
public class DomFragmentMapper
extends DomMapperBase
implements IMarshaller, IUnmarshaller
+ + +

+

Custom content list marshaller/unmarshaller to DOM representation. This + allows you to mix data binding and document model representations for XML + within the same application. You simply use this marshaller/unmarshaller with + a linked object type of org.w3c.dom.DocumentFragment (the actual + runtime type - the declared type is ignored and can be anything). When + unmarshalling it will create a fragment to hold any content up to the close + tag for the enclosing element in the list. When marshalling, it will simply + write out any content directly.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.extras.DomMapperBase
m_defaultNamespaceIndex, m_defaultNamespaceURI, m_document
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + +
+Constructor Summary
DomFragmentMapper() + +
+          Default constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class org.jibx.extras.DomMapperBase
marshalContent, marshalElement, marshalNode, unmarshalContent, unmarshalElement, unmarshalNode
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+DomFragmentMapper

+
+public DomFragmentMapper()
+                  throws JiBXException
+
+
Default constructor. +

+

+ +
Throws: +
JiBXException - on configuration error
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/HashMapperStringToComplex.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/HashMapperStringToComplex.html @@ -0,0 +1,615 @@ + + + + + + +HashMapperStringToComplex (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class HashMapperStringToComplex

+
+java.lang.Object
+  extended by org.jibx.extras.HashMapperStringToComplex
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class HashMapperStringToComplex
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom marshaller/unmarshaller for java.util.Map + instances. This handles mapping hash maps with simple keys and complex values + to and from XML. There are a number of limitations, though. First off, the + key objects are marshalled as simple text values, using the + toString() method to convert them to String. When + unmarshalling the keys are always treated as String values. The + corresponding values can be any complex type with a <mapping> defined in + the binding. The name of the top-level element in the XML structure can be + configured in the binding definition, but the rest of the names are + predefined and set in the code (though the namespace configured for the + top-level element will be used with all the names).

+ +

The net effect is that the XML structure will always be of the form:

+ +
<map-name size="3">
+   <entry key="38193">
+     <customer state="WA" zip="98059">
+       <name first-name="John" last-name="Smith"/>
+       <street>12345 Happy Lane</street>
+       <city>Plunk</city>
+     </customer>
+   </entry>
+   <entry key="39122">
+     <customer state="WA" zip="98094">
+       <name first-name="Sally" last-name="Port"/>
+       <street>932 Easy Street</street>
+       <city>Fort Lewis</city>
+     </customer>
+   </entry>
+   <entry key="83132">
+     <customer state="WA" zip="98059">
+       <name first-name="Mary" last-name="Smith"/>
+       <street>12345 Happy Lane</street>
+       <city>Plunk</city>
+     </customer>
+   </entry>
+ </map-name>
+ +

where "map-name" is the configured top-level element name, the "size" + attribute is the number of pairs in the hash map, and the "entry" elements + are the actual entries in the hash map.

+ +

This is obviously not intended to handle all types of hash maps, but it + should be useful as written for many applications and easily customized to + handle other requirements.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static intDEFAULT_SIZE + +
+           
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
HashMapperStringToComplex() + +
+          Default constructor.
HashMapperStringToComplex(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.StringgetEntryElementName() + +
+          Method which can be overridden to supply a different name for the element + used to represent each item in the map.
+protected  java.lang.StringgetKeyAttributeName() + +
+          Method which can be overridden to supply a different name for the + attribute defining the key value for each item in the map.
+protected  java.lang.StringgetSizeAttributeName() + +
+          Method which can be overridden to supply a different name for the wrapper + element attribute used to give the number of items present.
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DEFAULT_SIZE

+
+private static final int DEFAULT_SIZE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+HashMapperStringToComplex

+
+public HashMapperStringToComplex()
+
+
Default constructor. This uses a pre-defined name for the top-level + element. It'll be used by JiBX when no name information is supplied by + the mapping which references this custom marshaller/unmarshaller. +

+

+
+ +

+HashMapperStringToComplex

+
+public HashMapperStringToComplex(java.lang.String uri,
+                                 int index,
+                                 java.lang.String name)
+
+
Aliased constructor. This takes a name definition for the top-level + element. It'll be used by JiBX when a name is supplied by the mapping + which references this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element (also used for all + other names within the binding)
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
+
+ + + + + + + + +
+Method Detail
+ +

+getSizeAttributeName

+
+protected java.lang.String getSizeAttributeName()
+
+
Method which can be overridden to supply a different name for the wrapper + element attribute used to give the number of items present. If present, + this attribute is used when unmarshalling to set the initial size of the + hashmap. It will be generated when marshalling if the supplied name is + non-null. +

+

+
+
+
+
+
+
+
+ +

+getEntryElementName

+
+protected java.lang.String getEntryElementName()
+
+
Method which can be overridden to supply a different name for the element + used to represent each item in the map. +

+

+
+
+
+
+
+
+
+ +

+getKeyAttributeName

+
+protected java.lang.String getKeyAttributeName()
+
+
Method which can be overridden to supply a different name for the + attribute defining the key value for each item in the map. +

+

+
+
+
+
+
+
+
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/IdRefMapperBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/IdRefMapperBase.html @@ -0,0 +1,514 @@ + + + + + + +IdRefMapperBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class IdRefMapperBase

+
+java.lang.Object
+  extended by org.jibx.extras.IdRefMapperBase
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public abstract class IdRefMapperBase
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Abstract base custom marshaller/unmarshaller for an object reference. This + marshals the reference as an empty element with a single IDREF attribute, and + unmarshals an element with the same structure to create a reference to the + object with that ID value. To use this class you need to create a subclass + with a constructor using the same signature as the one provided (calling the + base class constructor from your subclass constructor) and implement the + abstract getIdValue(java.lang.Object) method in your subclass. You can also override + the provided getAttributeName() method to change the name used for the + IDREF attribute. Note that this class can only be used when the definitions + precede the references in the XML document; if a referenced ID is not defined + the unmarshaller throws an exception.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + +
+Constructor Summary
IdRefMapperBase(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor taking a name definition for the element.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.StringgetAttributeName() + +
+          Method which can be overridden to supply a different name for the ID + reference attribute.
+protected abstract  java.lang.StringgetIdValue(java.lang.Object item) + +
+          Get the ID value from object being marshalled.
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+IdRefMapperBase

+
+public IdRefMapperBase(java.lang.String uri,
+                       int index,
+                       java.lang.String name)
+
+
Aliased constructor taking a name definition for the element. The + subclass version will be used by JiBX to define the element name to be + used with this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
+
+ + + + + + + + +
+Method Detail
+ +

+getIdValue

+
+protected abstract java.lang.String getIdValue(java.lang.Object item)
+
+
Get the ID value from object being marshalled. +

+

+
+
+
+ +
Returns:
ID value
+
+
+
+ +

+getAttributeName

+
+protected java.lang.String getAttributeName()
+
+
Method which can be overridden to supply a different name for the ID + reference attribute. The attribute name used by default is just "ref". +

+

+
+
+
+
+
+
+
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DocumentComparator.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DocumentComparator.html @@ -0,0 +1,442 @@ + + + + + + +DocumentComparator (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DocumentComparator

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentComparator
+
+
+
+
public class DocumentComparator
extends java.lang.Object
+ + +

+XML document comparator. This uses XMLPull parsers to read a pair of + documents in parallel, comparing the streams of components seen from the two + documents. The comparison ignores differences in whitespace separating + elements, but treats whitespace as significant within elements with only + character data content. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  java.io.PrintStreamm_differencePrint + +
+          Print stream for reporting differences.
+protected  org.xmlpull.v1.XmlPullParserm_parserA + +
+          Parser for first document.
+protected  org.xmlpull.v1.XmlPullParserm_parserB + +
+          Parser for second document.
+  + + + + + + + + + + +
+Constructor Summary
DocumentComparator(java.io.PrintStream print) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.StringbuildPositionString(org.xmlpull.v1.XmlPullParser parser) + +
+          Build parse input position description.
+ booleancompare(java.io.Reader rdra, + java.io.Reader rdrb) + +
+          Compares a pair of documents by reading them in parallel from a pair of + parsers.
+protected  booleanmatchAttributes() + +
+          Verifies that the attributes on the current start tags match.
+protected  booleanmatchNames() + +
+          Verifies that the current start or end tag names match.
+protected  voidprintError(java.lang.String msg) + +
+          Prints error description text.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_parserA

+
+protected org.xmlpull.v1.XmlPullParser m_parserA
+
+
Parser for first document. +

+

+
+
+
+ +

+m_parserB

+
+protected org.xmlpull.v1.XmlPullParser m_parserB
+
+
Parser for second document. +

+

+
+
+
+ +

+m_differencePrint

+
+protected java.io.PrintStream m_differencePrint
+
+
Print stream for reporting differences. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DocumentComparator

+
+public DocumentComparator(java.io.PrintStream print)
+                   throws org.xmlpull.v1.XmlPullParserException
+
+
Constructor. Builds the actual parser. +

+

+
Parameters:
print - print stream for reporting differences +
Throws: +
org.xmlpull.v1.XmlPullParserException - on error creating parsers
+
+ + + + + + + + +
+Method Detail
+ +

+buildPositionString

+
+protected java.lang.String buildPositionString(org.xmlpull.v1.XmlPullParser parser)
+
+
Build parse input position description. +

+

+
Parameters:
parser - for which to build description +
Returns:
text description of current parse position
+
+
+
+ +

+printError

+
+protected void printError(java.lang.String msg)
+
+
Prints error description text. The generated text include position + information from both documents. +

+

+
Parameters:
msg - error message text
+
+
+
+ +

+matchAttributes

+
+protected boolean matchAttributes()
+
+
Verifies that the attributes on the current start tags match. +

+

+ +
Returns:
true if the attributes match, false if + not
+
+
+
+ +

+matchNames

+
+protected boolean matchNames()
+
+
Verifies that the current start or end tag names match. +

+

+ +
Returns:
true if the names match, false if not
+
+
+
+ +

+compare

+
+public boolean compare(java.io.Reader rdra,
+                       java.io.Reader rdrb)
+
+
Compares a pair of documents by reading them in parallel from a pair of + parsers. The comparison ignores differences in whitespace separating + elements, but treats whitespace as significant within elements with only + character data content. +

+

+
Parameters:
rdra - reader for first document to be compared
rdrb - reader for second document to be compared +
Returns:
true if the documents are the same, + false if they're different
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/IdDefRefMapperBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/IdDefRefMapperBase.html @@ -0,0 +1,515 @@ + + + + + + +IdDefRefMapperBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class IdDefRefMapperBase

+
+java.lang.Object
+  extended by org.jibx.extras.IdDefRefMapperBase
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public abstract class IdDefRefMapperBase
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Abstract base custom marshaller/unmarshaller for an object that may have + multiple references. The first time an object is seen when marshalling the + full XML representation is generated; successive uses of the same object then + use XML references to the object ID. To use this class you need to create a + subclass with a constructor using the same signature as the one provided + (calling the base class constructor from your subclass constructor) and + implement the abstract getIdValue(java.lang.Object) method in your subclass. You can + also override the provided getAttributeName() method to change the + name used for the IDREF attribute, which must not match the name of an + attribute used in the normal marshalled form of the object. The name used for + this marshaller/unmarshaller in the mapping definition must match the name + used for the base object type being handled.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + +
+Constructor Summary
IdDefRefMapperBase(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor taking a name definition for reference elements.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.StringgetAttributeName() + +
+          Method which can be overridden to supply a different name for the ID + reference attribute.
+protected abstract  java.lang.StringgetIdValue(java.lang.Object item) + +
+          Get the ID value from object being marshalled.
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ictx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+IdDefRefMapperBase

+
+public IdDefRefMapperBase(java.lang.String uri,
+                          int index,
+                          java.lang.String name)
+
+
Aliased constructor taking a name definition for reference elements. The + subclass version will be used by JiBX to define the element name to be + used with this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the reference element
+
+ + + + + + + + +
+Method Detail
+ +

+getIdValue

+
+protected abstract java.lang.String getIdValue(java.lang.Object item)
+
+
Get the ID value from object being marshalled. +

+

+
+
+
+ +
Returns:
ID value
+
+
+
+ +

+getAttributeName

+
+protected java.lang.String getAttributeName()
+
+
Method which can be overridden to supply a different name for the ID + reference attribute. The attribute name used by default is just "ref". +

+

+
+
+
+
+
+
+
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ictx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ictx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DomMapperBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DomMapperBase.html @@ -0,0 +1,534 @@ + + + + + + +DomMapperBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DomMapperBase

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.DomMapperBase
+
+
+
Direct Known Subclasses:
DomElementMapper, DomFragmentMapper, DomListMapper
+
+
+
+
public class DomMapperBase
extends DocumentModelMapperBase
+ + +

+

Base implementation for custom marshaller/unmarshallers to DOM + representation. This provides the basic code used for both single element and + content list handling.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  intm_defaultNamespaceIndex + +
+          Current default namespace index.
+protected  java.lang.Stringm_defaultNamespaceURI + +
+          Current default namespace URI (null if not determined).
+protected  org.w3c.dom.Documentm_document + +
+          Actual document instance (required by DOM).
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + + +
+Constructor Summary
+protected DomMapperBase() + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  intfindNamespaceIndex(java.lang.String prefix, + java.lang.String uri) + +
+          Get index number for declared namespace.
+protected  voidmarshalContent(org.w3c.dom.NodeList content) + +
+          Marshal node list.
+protected  voidmarshalElement(org.w3c.dom.Element element) + +
+          Marshal element with all attributes and content.
+protected  voidmarshalNode(org.w3c.dom.Node node) + +
+          Marshal node.
+protected  voidunmarshalContent(org.w3c.dom.Node parent) + +
+          Unmarshal node content.
+protected  org.w3c.dom.ElementunmarshalElement() + +
+          Unmarshal element with all attributes and content.
+protected  org.w3c.dom.NodeunmarshalNode() + +
+          Unmarshal single node.
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_document

+
+protected org.w3c.dom.Document m_document
+
+
Actual document instance (required by DOM). +

+

+
+
+
+ +

+m_defaultNamespaceURI

+
+protected java.lang.String m_defaultNamespaceURI
+
+
Current default namespace URI (null if not determined). +

+

+
+
+
+ +

+m_defaultNamespaceIndex

+
+protected int m_defaultNamespaceIndex
+
+
Current default namespace index. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DomMapperBase

+
+protected DomMapperBase()
+                 throws JiBXException
+
+
Constructor. Initializes the document used by this + marshaller/unmarshaller instance as the owner of all DOM components. +

+

+ +
Throws: +
JiBXException - on error creating document
+
+ + + + + + + + +
+Method Detail
+ +

+findNamespaceIndex

+
+private int findNamespaceIndex(java.lang.String prefix,
+                               java.lang.String uri)
+
+
Get index number for declared namespace. +

+

+
Parameters:
prefix - namespace prefix (null if none)
uri - namespace URI (empty string if none) +
Returns:
namespace index number, or -1 if not declared or + masked
+
+
+
+ +

+marshalNode

+
+protected void marshalNode(org.w3c.dom.Node node)
+                    throws JiBXException,
+                           java.io.IOException
+
+
Marshal node. +

+

+
Parameters:
node - node to be marshalled +
Throws: +
JiBXException - on error in marshalling +
java.io.IOException - on error writing to output
+
+
+
+ +

+marshalContent

+
+protected void marshalContent(org.w3c.dom.NodeList content)
+                       throws JiBXException,
+                              java.io.IOException
+
+
Marshal node list. +

+

+
Parameters:
content - list of nodes to marshal +
Throws: +
JiBXException - on error in marshalling +
java.io.IOException - on error writing to output
+
+
+
+ +

+marshalElement

+
+protected void marshalElement(org.w3c.dom.Element element)
+                       throws JiBXException,
+                              java.io.IOException
+
+
Marshal element with all attributes and content. +

+

+
Parameters:
element - element to be marshalled +
Throws: +
JiBXException - on error in marshalling +
java.io.IOException - on error writing to output
+
+
+
+ +

+unmarshalNode

+
+protected org.w3c.dom.Node unmarshalNode()
+                                  throws JiBXException,
+                                         java.io.IOException
+
+
Unmarshal single node. This unmarshals the next node from the input + stream, up to the close tag of the containing element. +

+

+ +
Returns:
unmarshalled node +
Throws: +
JiBXException - on error in unmarshalling +
java.io.IOException - on error reading input
+
+
+
+ +

+unmarshalContent

+
+protected void unmarshalContent(org.w3c.dom.Node parent)
+                         throws JiBXException,
+                                java.io.IOException
+
+
Unmarshal node content. This unmarshals everything up to the containing + element close tag, adding each component to the content list supplied. On + return, the parse position will always be at an END_TAG. +

+

+
Parameters:
parent - node to which children are to be added +
Throws: +
JiBXException - on error in unmarshalling +
java.io.IOException - on error reading input
+
+
+
+ +

+unmarshalElement

+
+protected org.w3c.dom.Element unmarshalElement()
+                                        throws JiBXException,
+                                               java.io.IOException
+
+
Unmarshal element with all attributes and content. This must be called + with the unmarshalling context positioned at a START_TAG event. +

+

+ +
Returns:
unmarshalled element +
Throws: +
JiBXException - on error in unmarshalling +
java.io.IOException - on error reading input
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/Dom4JListMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/Dom4JListMapper.html @@ -0,0 +1,425 @@ + + + + + + +Dom4JListMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class Dom4JListMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.Dom4JMapperBase
+          extended by org.jibx.extras.Dom4JListMapper
+
+
+
All Implemented Interfaces:
IMarshaller, IUnmarshaller
+
+
+
+
public class Dom4JListMapper
extends Dom4JMapperBase
implements IMarshaller, IUnmarshaller
+ + +

+

Custom content list marshaller/unmarshaller to dom4j representation. This + allows you to mix data binding and document model representations for XML + within the same application. You simply use this marshaller/unmarshaller with + a linked object type that implements java.util.List (the actual + runtime type - the declared type is ignored and can be anything). When + unmarshalling it will create an instance of java.util.ArrayList + if a list is not passed in and any content is present, then return all the + content up to the close tag for the enclosing element in the list. When + marshalling, it will simply write out any content directly.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.extras.Dom4JMapperBase
m_defaultNamespaceIndex, m_defaultNamespaceURI
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + +
+Constructor Summary
Dom4JListMapper() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class org.jibx.extras.Dom4JMapperBase
marshalContent, marshalElement, unmarshalContent, unmarshalElement
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Dom4JListMapper

+
+public Dom4JListMapper()
+
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/package-frame.html @@ -0,0 +1,74 @@ + + + + + + +org.jibx.extras (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.extras + + + + +
+Classes  + +
+BindingSelector +
+DiscardElementMapper +
+DiscardListMapper +
+DocumentComparator +
+DocumentModelMapperBase +
+Dom4JElementMapper +
+Dom4JListMapper +
+Dom4JMapperBase +
+DomElementMapper +
+DomFragmentMapper +
+DomListMapper +
+DomMapperBase +
+HashMapperStringToComplex +
+HashMapperStringToSchemaType +
+IdDefRefMapperBase +
+IdRefMapperBase +
+JDOMWriter +
+ObjectArrayMapper +
+QName +
+TestMultRoundtrip +
+TestRoundtrip +
+TypedArrayMapper
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/package-summary.html @@ -0,0 +1,256 @@ + + + + + + +org.jibx.extras (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.extras +

+Extra goodies for working with JiBX. +

+See: +
+          Description +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BindingSelectorBinding selector that supports versioned XML documents.
DiscardElementMapperCustom marshaller/unmarshaller for arbitrary ignored element.
DiscardListMapperCustom marshaller/unmarshaller for arbitrary ignored content to end of + element.
DocumentComparatorXML document comparator.
DocumentModelMapperBaseBase implementation for custom marshaller/unmarshallers to any document + model representation.
Dom4JElementMapperCustom element marshaller/unmarshaller to dom4j representation.
Dom4JListMapperCustom content list marshaller/unmarshaller to dom4j representation.
Dom4JMapperBaseBase implementation for custom marshaller/unmarshallers to dom4j + representation.
DomElementMapperCustom element marshaller/unmarshaller to DOM representation.
DomFragmentMapperCustom content list marshaller/unmarshaller to DOM representation.
DomListMapperCustom content list marshaller/unmarshaller to DOM representation.
DomMapperBaseBase implementation for custom marshaller/unmarshallers to DOM + representation.
HashMapperStringToComplexCustom marshaller/unmarshaller for java.util.Map + instances.
HashMapperStringToSchemaTypeCustom marshaller/unmarshaller for java.util.Map + instances.
IdDefRefMapperBaseAbstract base custom marshaller/unmarshaller for an object that may have + multiple references.
IdRefMapperBaseAbstract base custom marshaller/unmarshaller for an object reference.
JDOMWriterJDOM implementation of XML writer interface.
ObjectArrayMapperCustom marshaller/unmarshaller for Object[] instances.
QNameRepresentation of a qualified name.
TestMultRoundtripTest program for the JiBX framework.
TestRoundtripTest program for the JiBX framework.
TypedArrayMapperCustom marshaller/unmarshaller for reference arrays of a particular type.
+  + +

+

+Package org.jibx.extras Description +

+ +

+Extra goodies for working with JiBX. These are helper classes that can be useful +but are not core to the JiBX framework. +

+ +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/BindingSelector.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/BindingSelector.html @@ -0,0 +1,589 @@ + + + + + + +BindingSelector (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class BindingSelector

+
+java.lang.Object
+  extended by org.jibx.extras.BindingSelector
+
+
+
+
public class BindingSelector
extends java.lang.Object
+ + +

+Binding selector that supports versioned XML documents. This looks for a + version attribute on the root element of the document, and selects the + mapping to be used for unmarshalling based on the value. It also supports + selecting the version for marshalling based on a supplied version argument + value. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.Stringm_attributeName + +
+          Name of version selection attribute.
+private  java.lang.Stringm_attributeUri + +
+          URI of version selection attribute.
+private  UnmarshallingContextm_context + +
+          Basic unmarshalling context used to determine document version.
+private  java.lang.Stringm_outputEncoding + +
+          Encoding for output stream.
+private  intm_outputIndent + +
+          Indentation for marshalling.
+private  java.io.OutputStreamm_outputStream + +
+          Stream for marshalling output.
+private  java.io.Writerm_outputWriter + +
+          Output writer for marshalling.
+private  java.lang.String[]m_versionBindings + +
+          Array of bindings corresponding to versions.
+private  java.lang.String[]m_versionTexts + +
+          Array of version names.
+  + + + + + + + + + + +
+Constructor Summary
BindingSelector(java.lang.String uri, + java.lang.String name, + java.lang.String[] versions, + java.lang.String[] bindings) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ IUnmarshallingContextgetContext() + +
+          Get initial unmarshalling context.
+ voidmarshalVersioned(java.lang.Object obj, + java.lang.String version) + +
+          Marshal according to supplied version.
+ voidsetIndent(int indent) + +
+          Set nesting indent spaces.
+ voidsetOutput(java.io.OutputStream outs, + java.lang.String enc) + +
+          Set output stream and encoding.
+ voidsetOutput(java.io.Writer outw) + +
+          Set output writer.
+ java.lang.ObjectunmarshalVersioned(java.lang.Class clas) + +
+          Unmarshal according to document version.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_attributeUri

+
+private final java.lang.String m_attributeUri
+
+
URI of version selection attribute. +

+

+
+
+
+ +

+m_attributeName

+
+private final java.lang.String m_attributeName
+
+
Name of version selection attribute. +

+

+
+
+
+ +

+m_versionTexts

+
+private final java.lang.String[] m_versionTexts
+
+
Array of version names. +

+

+
+
+
+ +

+m_versionBindings

+
+private final java.lang.String[] m_versionBindings
+
+
Array of bindings corresponding to versions. +

+

+
+
+
+ +

+m_context

+
+private final UnmarshallingContext m_context
+
+
Basic unmarshalling context used to determine document version. +

+

+
+
+
+ +

+m_outputStream

+
+private java.io.OutputStream m_outputStream
+
+
Stream for marshalling output. +

+

+
+
+
+ +

+m_outputEncoding

+
+private java.lang.String m_outputEncoding
+
+
Encoding for output stream. +

+

+
+
+
+ +

+m_outputWriter

+
+private java.io.Writer m_outputWriter
+
+
Output writer for marshalling. +

+

+
+
+
+ +

+m_outputIndent

+
+private int m_outputIndent
+
+
Indentation for marshalling. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingSelector

+
+public BindingSelector(java.lang.String uri,
+                       java.lang.String name,
+                       java.lang.String[] versions,
+                       java.lang.String[] bindings)
+
+
Constructor. +

+

+
Parameters:
uri - version selection attribute URI (null if none)
name - version selection attribute name
versions - array of version texts (first is default)
bindings - array of binding names corresponding to versions
+
+ + + + + + + + +
+Method Detail
+ +

+getContext

+
+public IUnmarshallingContext getContext()
+
+
Get initial unmarshalling context. This gives access to the unmarshalling + context used before the specific version is determined. The document + information must be set for this context before calling unmarshalVersioned(java.lang.Class). +

+

+ +
Returns:
initial unmarshalling context
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.OutputStream outs,
+                      java.lang.String enc)
+
+
Set output stream and encoding. +

+

+
Parameters:
outs - stream for document data output
enc - document output encoding, or null for default
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.Writer outw)
+
+
Set output writer. +

+

+
Parameters:
outw - writer for document data output
+
+
+
+ +

+setIndent

+
+public void setIndent(int indent)
+
+
Set nesting indent spaces. +

+

+
Parameters:
indent - number of spaces to indent per level, or disable + indentation if negative
+
+
+
+ +

+marshalVersioned

+
+public void marshalVersioned(java.lang.Object obj,
+                             java.lang.String version)
+                      throws JiBXException
+
+
Marshal according to supplied version. +

+

+
Parameters:
obj - root object to be marshalled
version - identifier for version to be used in marshalling +
Throws: +
JiBXException - if error in marshalling
+
+
+
+ +

+unmarshalVersioned

+
+public java.lang.Object unmarshalVersioned(java.lang.Class clas)
+                                    throws JiBXException
+
+
Unmarshal according to document version. +

+

+
Parameters:
clas - expected class mapped to root element of document (used only + to look up the binding) +
Returns:
root object unmarshalled from document +
Throws: +
JiBXException - if error in unmarshalling
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DomElementMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DomElementMapper.html @@ -0,0 +1,528 @@ + + + + + + +DomElementMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DomElementMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DocumentModelMapperBase
+      extended by org.jibx.extras.DomMapperBase
+          extended by org.jibx.extras.DomElementMapper
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class DomElementMapper
extends DomMapperBase
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom element marshaller/unmarshaller to DOM representation. This allows + you to mix data binding and document model representations for XML within the + same application. You simply use this marshaller/unmarshaller with a linked + object of type org.w3c.dom.Element (the actual runtime type - + the declared type is ignored and can be anything). If a name is supplied on a + reference that element name will always be matched when unmarshalling but + will be ignored when marshalling (with the actual DOM element name used). If + no name is supplied this will unmarshal a single element with any name.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_index + +
+          Namespace URI index in binding.
+private  java.lang.Stringm_name + +
+          Root element name.
+private  java.lang.Stringm_uri + +
+          Root element namespace URI.
+ + + + + + + +
Fields inherited from class org.jibx.extras.DomMapperBase
m_defaultNamespaceIndex, m_defaultNamespaceURI, m_document
+ + + + + + + +
Fields inherited from class org.jibx.extras.DocumentModelMapperBase
m_unmarshalContext, m_xmlWriter, XML_NAMESPACE, XMLNS_NAMESPACE
+  + + + + + + + + + + + + + +
+Constructor Summary
DomElementMapper() + +
+          Default constructor.
DomElementMapper(java.lang.String uri, + int index, + java.lang.String name) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class org.jibx.extras.DomMapperBase
marshalContent, marshalElement, marshalNode, unmarshalContent, unmarshalElement, unmarshalNode
+ + + + + + + +
Methods inherited from class org.jibx.extras.DocumentModelMapperBase
accumulateText, getNamespaceUri, getNextNamespaceIndex, isWhitespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_uri

+
+private final java.lang.String m_uri
+
+
Root element namespace URI. +

+

+
+
+
+ +

+m_index

+
+private final int m_index
+
+
Namespace URI index in binding. +

+

+
+
+
+ +

+m_name

+
+private final java.lang.String m_name
+
+
Root element name. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DomElementMapper

+
+public DomElementMapper()
+                 throws JiBXException
+
+
Default constructor. +

+

+ +
Throws: +
JiBXException - on error creating document
+
+
+ +

+DomElementMapper

+
+public DomElementMapper(java.lang.String uri,
+                        int index,
+                        java.lang.String name)
+                 throws JiBXException
+
+
Aliased constructor. This takes a name definition for the element. It'll + be used by JiBX when a name is supplied by the mapping which references + this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element +
Throws: +
JiBXException - on error creating document
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/DiscardElementMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/DiscardElementMapper.html @@ -0,0 +1,369 @@ + + + + + + +DiscardElementMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class DiscardElementMapper

+
+java.lang.Object
+  extended by org.jibx.extras.DiscardElementMapper
+
+
+
All Implemented Interfaces:
IMarshaller, IUnmarshaller
+
+
+
+
public class DiscardElementMapper
extends java.lang.Object
implements IMarshaller, IUnmarshaller
+ + +

+

Custom marshaller/unmarshaller for arbitrary ignored element. This ignores + an element when unmarshalling, if one is present, and does nothing when + marshalling.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Constructor Summary
DiscardElementMapper() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+DiscardElementMapper

+
+public DiscardElementMapper()
+
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/extras/TypedArrayMapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/extras/TypedArrayMapper.html @@ -0,0 +1,535 @@ + + + + + + +TypedArrayMapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.extras +
+Class TypedArrayMapper

+
+java.lang.Object
+  extended by org.jibx.extras.TypedArrayMapper
+
+
+
All Implemented Interfaces:
IAliasable, IMarshaller, IUnmarshaller
+
+
+
+
public class TypedArrayMapper
extends java.lang.Object
implements IMarshaller, IUnmarshaller, IAliasable
+ + +

+

Custom marshaller/unmarshaller for reference arrays of a particular type. + This handles mapping arrays typed as object-type[], where the + object-type is any class name (not a primitive type). All items in the + array must be of a mapped type. If a name is specified by the mapping + definition that name is used as a wrapper around the elements representing + the items in the array; otherwise, the elements are just handled inline.

+

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.Object[]DUMMY_ARRAY + +
+           
+private  java.lang.Object[]m_baseArray + +
+           
+private  java.util.ArrayListm_holder + +
+           
+private  intm_index + +
+           
+private  java.lang.Stringm_name + +
+           
+private  java.lang.Stringm_uri + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
TypedArrayMapper(java.lang.String type) + +
+          Class only constructor.
TypedArrayMapper(java.lang.String uri, + int index, + java.lang.String name, + java.lang.String type) + +
+          Aliased constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ictx) + +
+          Marshal instance of handled class.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + +
+          Unmarshal instance of handled class.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DUMMY_ARRAY

+
+private static final java.lang.Object[] DUMMY_ARRAY
+
+
+
+
+
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
+
+
+
+ +

+m_index

+
+private int m_index
+
+
+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
+
+
+
+ +

+m_baseArray

+
+private java.lang.Object[] m_baseArray
+
+
+
+
+
+ +

+m_holder

+
+private java.util.ArrayList m_holder
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+TypedArrayMapper

+
+public TypedArrayMapper(java.lang.String uri,
+                        int index,
+                        java.lang.String name,
+                        java.lang.String type)
+
+
Aliased constructor. This takes a name definition for the top-level + wrapper element. It'll be used by JiBX when a name is supplied by the + mapping which references this custom marshaller/unmarshaller. +

+

+
Parameters:
uri - namespace URI for the top-level element
index - namespace index corresponding to the defined URI within the + marshalling context definitions
name - local name for the top-level element
type - class name for type of items in array
+
+
+ +

+TypedArrayMapper

+
+public TypedArrayMapper(java.lang.String type)
+
+
Class only constructor. This just sets up for an XML representation with + no element wrapping the actual item structures. It'll be used by JiBX + when no name information is supplied by the mapping which references this + custom marshaller/unmarshaller. +

+

+
Parameters:
type - class name for type of items in array
+
+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+public boolean isExtension(int index)
+
+
Description copied from interface: IMarshaller
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Specified by:
isExtension in interface IMarshaller
+
+
+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+public void marshal(java.lang.Object obj,
+                    IMarshallingContext ictx)
+             throws JiBXException
+
+
Description copied from interface: IMarshaller
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Specified by:
marshal in interface IMarshaller
+
+
+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ictx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+
+ +

+isPresent

+
+public boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Specified by:
isPresent in interface IUnmarshaller
+
+
+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+public java.lang.Object unmarshal(java.lang.Object obj,
+                                  IUnmarshallingContext ictx)
+                           throws JiBXException
+
+
Description copied from interface: IUnmarshaller
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Specified by:
unmarshal in interface IUnmarshaller
+
+
+
Parameters:
obj - object to be unmarshalled (may be null)
ictx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/Loader.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/Loader.html @@ -0,0 +1,599 @@ + + + + + + +Loader (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class Loader

+
+java.lang.Object
+  extended by java.lang.ClassLoader
+      extended by java.security.SecureClassLoader
+          extended by java.net.URLClassLoader
+              extended by org.jibx.binding.Loader
+
+
+
+
public class Loader
extends java.net.URLClassLoader
+ + +

+Binding classloader. This is intended to substitute for the System + classloader (i.e., the one used for loading user classes). It first processes + one or more binding definitions, caching the binary classes modified by the + bindings. It then uses these modified forms of the classes when they're + requested for loading. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  java.util.ArrayListm_bindings + +
+          Binding definitions used by loader.
+private  java.util.HashMapm_classMap + +
+          Map of classes modified by binding.
+private  booleanm_isBound + +
+          Flag for bindings compiled into class code.
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
Loader() + +
+          Default constructor.
Loader(java.net.URL[] paths) + +
+          Constructor with classpath URLs supplied.
Loader(java.net.URL[] paths, + java.lang.ClassLoader parent) + +
+          Constructor with classpath URLs and parent classloader supplied.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.ClassfindClass(java.lang.String name) + +
+          Find and load class by name.
+static java.net.URL[]getClassPaths() + +
+          Method builds an array of URL for items in the class path.
+ voidloadBinding(java.lang.String fname, + java.lang.String sname, + java.io.InputStream is, + java.net.URL url) + +
+          Load binding definition.
+ voidloadFileBinding(java.lang.String path) + +
+          Load binding definition from file path.
+ voidloadResourceBinding(java.lang.String path) + +
+          Load binding definition from file path.
+ voidprocessBindings() + +
+          Process the binding definitions.
+ voidreset() + +
+          Reset loader information.
+ + + + + + + +
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
+ + + + + + + +
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
+ + + + + + + +
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_bindings

+
+private java.util.ArrayList m_bindings
+
+
Binding definitions used by loader. +

+

+
+
+
+ +

+m_isBound

+
+private boolean m_isBound
+
+
Flag for bindings compiled into class code. +

+

+
+
+
+ +

+m_classMap

+
+private java.util.HashMap m_classMap
+
+
Map of classes modified by binding. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Loader

+
+public Loader(java.net.URL[] paths,
+              java.lang.ClassLoader parent)
+
+
Constructor with classpath URLs and parent classloader supplied. Sets up + the paths for both actual classloading and finding classes to be bound. +

+

+
Parameters:
paths - array of classpath URLs
parent - classloader used for delegation loading
+
+
+ +

+Loader

+
+public Loader(java.net.URL[] paths)
+
+
Constructor with classpath URLs supplied. This uses the supplied + classpaths, delegating directly to the parent classloader of the normal + System classloader. +

+

+
Parameters:
paths - array of classpath URLs
+
+
+ +

+Loader

+
+public Loader()
+       throws java.net.MalformedURLException
+
+
Default constructor. This reads the standard class path and uses it for + locating classes used by the binding, delegating directly to the parent + classloader of the normal System classloader. +

+

+ +
Throws: +
java.net.MalformedURLException - on error in classpath URLs
+
+ + + + + + + + +
+Method Detail
+ +

+reset

+
+public void reset()
+
+
Reset loader information. This discards all prior bindings and clears the + internal state in preparation for loading a different set of bindings. It + is not possible to clear the loaded classes, though, so any new bindings + must refer to different classes from those previously loaded. +

+

+
+
+
+
+ +

+getClassPaths

+
+public static java.net.URL[] getClassPaths()
+                                    throws java.net.MalformedURLException
+
+
Method builds an array of URL for items in the class path. +

+

+ +
Returns:
array of classpath URLs +
Throws: +
java.net.MalformedURLException
+
+
+
+ +

+loadBinding

+
+public void loadBinding(java.lang.String fname,
+                        java.lang.String sname,
+                        java.io.InputStream is,
+                        java.net.URL url)
+                 throws JiBXException,
+                        java.io.IOException
+
+
Load binding definition. This may be called multiple times to load + multiple bindings, but only prior to the bindings being compiled. The + reader form of the call is generally preferred, since the document + encoding may not be properly interpreted from a stream. +

+

+
Parameters:
fname - binding definition full name
sname - short form of name to use as the default name of the binding
is - input stream for binding definition document
url - URL for binding definition (null if not + available) +
Throws: +
java.lang.IllegalStateException - if called after bindings have been + compiled +
java.io.IOException - if error reading the binding +
JiBXException - if error in processing the binding definition
+
+
+
+ +

+loadFileBinding

+
+public void loadFileBinding(java.lang.String path)
+                     throws JiBXException,
+                            java.io.IOException
+
+
Load binding definition from file path. This may be called multiple times + to load multiple bindings, but only prior to the bindings being compiled. +

+

+
Parameters:
path - binding definition file path +
Throws: +
java.lang.IllegalStateException - if called after bindings have been + compiled +
java.io.IOException - if error reading the file +
JiBXException - if error in processing the binding definition
+
+
+
+ +

+loadResourceBinding

+
+public void loadResourceBinding(java.lang.String path)
+                         throws JiBXException,
+                                java.io.IOException
+
+
Load binding definition from file path. This may be called multiple times + to load multiple bindings, but only prior to the bindings being compiled. +

+

+
Parameters:
path - binding definition file path +
Throws: +
java.lang.IllegalStateException - if called after bindings have been + compiled +
java.io.IOException - if error reading the file +
JiBXException - if error in processing the binding definition
+
+
+
+ +

+processBindings

+
+public void processBindings()
+                     throws JiBXException
+
+
Process the binding definitions. This compiles the bindings into the + classes, saving the modified classes for loading when needed. +

+

+ +
Throws: +
JiBXException - if error in processing the binding definition
+
+
+
+ +

+findClass

+
+protected java.lang.Class findClass(java.lang.String name)
+                             throws java.lang.ClassNotFoundException
+
+
Find and load class by name. If the named class has been modified by a + binding this loads the modified binary class; otherwise, it just uses the + base class implementation to do the loading. If bindings haven't been + compiled prior to this call they will be compiled automatically when this + method is called. +

+

+
Overrides:
findClass in class java.net.URLClassLoader
+
+
+
Parameters:
name - fully qualified package and class name to be found +
Returns:
the loaded class +
Throws: +
java.lang.ClassNotFoundException - if the class cannot be found
See Also:
ClassLoader.findClass(java.lang.String)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/Compile.DirectLoader.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/Compile.DirectLoader.html @@ -0,0 +1,286 @@ + + + + + + +Compile.DirectLoader (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class Compile.DirectLoader

+
+java.lang.Object
+  extended by java.lang.ClassLoader
+      extended by java.security.SecureClassLoader
+          extended by java.net.URLClassLoader
+              extended by org.jibx.binding.Compile.DirectLoader
+
+
+
Enclosing class:
Compile
+
+
+
+
private static class Compile.DirectLoader
extends java.net.URLClassLoader
+ + +

+Direct class loader. This is optionally used for test loading the + modified class files to make sure they're still valid. +

+ +

+


+ +

+ + + + + + + + + + + + +
+Constructor Summary
+protected Compile.DirectLoader(java.net.URL[] urls) + +
+           
+  + + + + + + + + + + + +
+Method Summary
+protected  java.lang.Classload(java.lang.String name, + byte[] data) + +
+           
+ + + + + + + +
Methods inherited from class java.net.URLClassLoader
addURL, definePackage, findClass, findResource, findResources, getPermissions, getURLs, newInstance, newInstance
+ + + + + + + +
Methods inherited from class java.security.SecureClassLoader
defineClass, defineClass
+ + + + + + + +
Methods inherited from class java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findLibrary, findLoadedClass, findSystemClass, getPackage, getPackages, getParent, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+Compile.DirectLoader

+
+protected Compile.DirectLoader(java.net.URL[] urls)
+
+
+ + + + + + + + +
+Method Detail
+ +

+load

+
+protected java.lang.Class load(java.lang.String name,
+                               byte[] data)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/Run.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/Run.html @@ -0,0 +1,340 @@ + + + + + + +Run (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class Run

+
+java.lang.Object
+  extended by org.jibx.binding.Run
+
+
+
+
public class Run
extends java.lang.Object
+ + +

+Bind-on-load class runner. This uses a binding loader to compile a binding, + then loads and calls the main execution class for an application substituting + the classes modified by the binding. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringBINDING_LIST_RESOURCE + +
+           
+private static java.lang.StringDEFAULT_BINDING_RESOURCE + +
+           
+  + + + + + + + + + + + +
+Constructor Summary
+private Run() + +
+           
+  + + + + + + + + + + + + + + + +
+Method Summary
+private static voidaddBindings(java.io.InputStream is, + java.util.ArrayList bindings) + +
+          Accumulate list of bindings from stream.
+static voidmain(java.lang.String[] args) + +
+          Main method for bind-on-load handling.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+BINDING_LIST_RESOURCE

+
+private static final java.lang.String BINDING_LIST_RESOURCE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_BINDING_RESOURCE

+
+private static final java.lang.String DEFAULT_BINDING_RESOURCE
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+Run

+
+private Run()
+
+
+ + + + + + + + +
+Method Detail
+ +

+addBindings

+
+private static void addBindings(java.io.InputStream is,
+                                java.util.ArrayList bindings)
+                         throws java.io.IOException
+
+
Accumulate list of bindings from stream. +

+

+
Parameters:
is - stream to be read for list of bindings (one per line)
bindings - accumulated collection of bindings +
Throws: +
java.io.IOException
+
+
+
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
Main method for bind-on-load handling. +

+

+
Parameters:
args - command line arguments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/Utility.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/Utility.html @@ -0,0 +1,492 @@ + + + + + + +Utility (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class Utility

+
+java.lang.Object
+  extended by org.jibx.binding.Utility
+
+
+
+
public class Utility
extends java.lang.Object
+ + +

+Binding compiler support class. Supplies common methods for use in compiling + binding definitions. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private static intCOPY_BUFFER_SIZE + +
+           
+  + + + + + + + + + + + +
+Constructor Summary
+private Utility() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.lang.StringconvertName(java.lang.String name) + +
+          Generate binding name.
+static java.lang.StringfileName(java.lang.String path) + +
+          Extract base file name from a full path.
+static java.lang.String[]getClassPaths() + +
+          Method builds a string array of items in the class path.
+private static byte[]getStreamData(java.io.InputStream is) + +
+          Read contents of stream into byte array.
+static BindingDefinitionloadBinding(java.lang.String fname, + java.lang.String sname, + java.io.InputStream istrm, + java.net.URL url, + boolean test) + +
+          Load validated binding definition.
+static BindingDefinitionloadFileBinding(java.lang.String path, + boolean valid) + +
+          Load binding definition from file.
+private static voidrecursePathJars(java.lang.String path, + java.util.ArrayList paths) + +
+          Recurse through jar file path component, adding all jars referenced from + the original jar to the path collection.
+static org.jibx.binding.model.BindingElementvalidateBinding(java.lang.String name, + java.net.URL url, + java.io.InputStream is) + +
+          Validate binding definition.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+COPY_BUFFER_SIZE

+
+private static final int COPY_BUFFER_SIZE
+
+
+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Constructor Detail
+ +

+Utility

+
+private Utility()
+
+
+ + + + + + + + +
+Method Detail
+ +

+getStreamData

+
+private static byte[] getStreamData(java.io.InputStream is)
+                             throws java.io.IOException
+
+
Read contents of stream into byte array. +

+

+
Parameters:
is - input stream to be read +
Returns:
array of bytes containing all data from stream +
Throws: +
java.io.IOException - on stream access error
+
+
+
+ +

+recursePathJars

+
+private static void recursePathJars(java.lang.String path,
+                                    java.util.ArrayList paths)
+
+
Recurse through jar file path component, adding all jars referenced from + the original jar to the path collection. Silently ignores problems + loading jar files. +

+

+
Parameters:
path - jar path component
paths - set of paths processed (added to by call)
+
+
+
+ +

+getClassPaths

+
+public static java.lang.String[] getClassPaths()
+
+
Method builds a string array of items in the class path. +

+

+ +
Returns:
array of classpath components
+
+
+
+ +

+convertName

+
+public static java.lang.String convertName(java.lang.String name)
+
+
Generate binding name. This takes a base name (such as a file name with + extension stripped off) and converts it to legal form by substituting '_' + characters for illegal characters in the base name. +

+

+
Parameters:
name - base binding name +
Returns:
converted binding name
+
+
+
+ +

+fileName

+
+public static java.lang.String fileName(java.lang.String path)
+
+
Extract base file name from a full path. +

+

+
Parameters:
path - full file path +
Returns:
file name component from path
+
+
+
+ +

+validateBinding

+
+public static org.jibx.binding.model.BindingElement validateBinding(java.lang.String name,
+                                                                    java.net.URL url,
+                                                                    java.io.InputStream is)
+
+
Validate binding definition. If issues are found in the binding the + issues are printed directly to the console. +

+

+
Parameters:
name - identifier for binding definition
url - URL for binding definition (null if not + available)
is - input stream for reading binding definition +
Returns:
root element of binding model if binding is valid, + null if one or more errors in binding
+
+
+
+ +

+loadBinding

+
+public static BindingDefinition loadBinding(java.lang.String fname,
+                                            java.lang.String sname,
+                                            java.io.InputStream istrm,
+                                            java.net.URL url,
+                                            boolean test)
+                                     throws JiBXException,
+                                            java.io.IOException
+
+
Load validated binding definition. This first reads the input stream into + a memory buffer, then parses the data once for validation and a second + time for the actual binding definition construction. If any errors are + found in the binding definition validation the construction is skipped + and an exception is thrown. +

+

+
Parameters:
fname - binding definition full name
sname - short form of name to use as the default name of the binding
istrm - input stream for binding definition document
url - URL for binding definition (null if not + available)
test - validate binding flag +
Returns:
constructed binding definition +
Throws: +
java.io.FileNotFoundException - if path cannot be accessed +
JiBXException - if error in processing the binding definition +
java.io.IOException
+
+
+
+ +

+loadFileBinding

+
+public static BindingDefinition loadFileBinding(java.lang.String path,
+                                                boolean valid)
+                                         throws JiBXException,
+                                                java.io.IOException
+
+
Load binding definition from file. +

+

+
Parameters:
path - file path for binding definition
valid - validate binding flag +
Returns:
constructed binding definition +
Throws: +
java.io.IOException - if error accessing file +
JiBXException - if error in processing the binding definition
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/SchemaGenerator.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/SchemaGenerator.html @@ -0,0 +1,952 @@ + + + + + + +SchemaGenerator (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class SchemaGenerator

+
+java.lang.Object
+  extended by org.jibx.binding.SchemaGenerator
+
+
+
+
public class SchemaGenerator
extends java.lang.Object
+ + +

+Binding generator. This loads the specified input classes and processes them + to generate a default binding definition. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringCURRENT_VERSION + +
+          Generator version.
+private  org.jibx.binding.model.IClassLocatorm_classLocator + +
+          Locator for finding classes referenced by binding.
+private  org.w3c.dom.Documentm_document + +
+          Document used for all schema definitions.
+private  java.lang.Stringm_indentSequence + +
+          Indentation sequence per level of nesting.
+private  booleanm_isAttributeQualified + +
+          Use qualified attributes default in schema flag.
+private  booleanm_isElementQualified + +
+          Use qualified elements default in schema flag.
+private  java.util.HashMapm_schemaMap + +
+          Map from namespaces to schemas.
+private  org.jibx.binding.util.ObjectStackm_structureStack + +
+          Stack of structure definitions in progress (used to detect cycles).
+private  booleanm_verbose + +
+          Show verbose output flag.
+private static java.util.HashMaps_objectTypeMap + +
+          Set of object types mapped to schema types.
+private static java.util.HashMaps_primitiveTypeMap + +
+          Set of primitive types mapped to schema types.
+static java.lang.StringXML_URI + +
+          Fixed XML namespace.
+static java.lang.StringXMLNS_URI + +
+          Fixed XML namespace namespace.
+private static java.lang.StringXSD_URI + +
+          Schema namespace URI.
+  + + + + + + + + + + + + + +
+Constructor Summary
SchemaGenerator(java.util.ArrayList paths) + +
+          Constructor with only paths supplied.
SchemaGenerator(boolean verbose, + boolean equal, + boolean aqual, + java.util.ArrayList paths) + +
+          Constructor with settings specified.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  org.w3c.dom.ElementaddChildElement(org.w3c.dom.Element parent, + java.lang.String name) + +
+          Add child element with appropriate indentation.
+private  voidaddComment(org.w3c.dom.Element parent, + java.lang.String text) + +
+          Add comment with appropriate indentation.
+private  voiddefineEmptyStructureComponent(org.jibx.binding.model.StructureElementBase comp, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup) + +
+          Process a structure component (structure or collection element) with no + name and no child components.
+private  voiddefineList(java.util.ArrayList comps, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup, + boolean mult) + +
+          Create the schema definition list for a binding component list.
+private  org.w3c.dom.ElementdefineNestedStructure(org.jibx.binding.model.ContainerElementBase container, + org.w3c.dom.Element parent) + +
+          Create the schema definition for a nested structure.
+private  voiddefineStructureComponent(org.jibx.binding.model.StructureElementBase comp, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup, + boolean mult) + +
+          Process a structure component (structure or collection element) within a + list of child components.
+ voidgenerate(org.jibx.binding.model.BindingElement binding) + +
+          Process a binding definition for schema generation.
+private  voidgenerateSchema(org.jibx.binding.model.BindingElement binding) + +
+          Generate a schema from a binding using supplied classpaths.
+ org.jibx.binding.model.DefinitionContextgetDefinitions() + +
+          Get innermost containing definition context.
+ org.w3c.dom.Element[]getSchemas() + +
+          Get array of generated schemas.
+private  voidindentForClose(org.w3c.dom.Element parent) + +
+          Generate indentation to proper depth for current item.
+static voidmain(java.lang.String[] args) + +
+          Main method for running compiler as application.
+ voidsetAttributeQualified(boolean qual) + +
+          Set control flag for attribute qualified default schema.
+ voidsetElementQualified(boolean qual) + +
+          Set control flag for element qualified default schema.
+ voidsetVerbose(boolean verbose) + +
+          Set control flag for verbose processing reports.
+private  java.lang.StringsimpleClassName(java.lang.String cname) + +
+          Get simple class name.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+CURRENT_VERSION

+
+private static java.lang.String CURRENT_VERSION
+
+
Generator version. +

+

+
+
+
+ +

+XSD_URI

+
+private static final java.lang.String XSD_URI
+
+
Schema namespace URI. +

+

+
See Also:
Constant Field Values
+
+
+ +

+XML_URI

+
+public static final java.lang.String XML_URI
+
+
Fixed XML namespace. +

+

+
See Also:
Constant Field Values
+
+
+ +

+XMLNS_URI

+
+public static final java.lang.String XMLNS_URI
+
+
Fixed XML namespace namespace. +

+

+
See Also:
Constant Field Values
+
+
+ +

+s_objectTypeMap

+
+private static java.util.HashMap s_objectTypeMap
+
+
Set of object types mapped to schema types. +

+

+
+
+
+ +

+s_primitiveTypeMap

+
+private static java.util.HashMap s_primitiveTypeMap
+
+
Set of primitive types mapped to schema types. +

+

+
+
+
+ +

+m_verbose

+
+private boolean m_verbose
+
+
Show verbose output flag. +

+

+
+
+
+ +

+m_isElementQualified

+
+private boolean m_isElementQualified
+
+
Use qualified elements default in schema flag. +

+

+
+
+
+ +

+m_isAttributeQualified

+
+private boolean m_isAttributeQualified
+
+
Use qualified attributes default in schema flag. +

+

+
+
+
+ +

+m_indentSequence

+
+private java.lang.String m_indentSequence
+
+
Indentation sequence per level of nesting. +

+

+
+
+
+ +

+m_schemaMap

+
+private java.util.HashMap m_schemaMap
+
+
Map from namespaces to schemas. +

+

+
+
+
+ +

+m_classLocator

+
+private org.jibx.binding.model.IClassLocator m_classLocator
+
+
Locator for finding classes referenced by binding. +

+

+
+
+
+ +

+m_document

+
+private org.w3c.dom.Document m_document
+
+
Document used for all schema definitions. +

+

+
+
+
+ +

+m_structureStack

+
+private org.jibx.binding.util.ObjectStack m_structureStack
+
+
Stack of structure definitions in progress (used to detect cycles). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+SchemaGenerator

+
+public SchemaGenerator(java.util.ArrayList paths)
+
+
Constructor with only paths supplied. This just initializes all other + options disabled. +

+

+
Parameters:
paths - class paths to be checked for classes referenced by bindings
+
+
+ +

+SchemaGenerator

+
+public SchemaGenerator(boolean verbose,
+                       boolean equal,
+                       boolean aqual,
+                       java.util.ArrayList paths)
+
+
Constructor with settings specified. +

+

+
Parameters:
verbose - report binding details and results
equal - use element form default qualified flag
aqual - use attribute form default qualified flag
paths - class paths to be checked for classes referenced by bindings
+
+ + + + + + + + +
+Method Detail
+ +

+setVerbose

+
+public void setVerbose(boolean verbose)
+
+
Set control flag for verbose processing reports. +

+

+
Parameters:
verbose - report verbose information in processing bindings flag
+
+
+
+ +

+setElementQualified

+
+public void setElementQualified(boolean qual)
+
+
Set control flag for element qualified default schema. +

+

+
Parameters:
qual - element qualified default schemas flag
+
+
+
+ +

+setAttributeQualified

+
+public void setAttributeQualified(boolean qual)
+
+
Set control flag for attribute qualified default schema. +

+

+
Parameters:
qual - attribute qualified default schemas flag
+
+
+
+ +

+getSchemas

+
+public org.w3c.dom.Element[] getSchemas()
+
+
Get array of generated schemas. +

+

+ +
Returns:
array of schema elements
+
+
+
+ +

+indentForClose

+
+private void indentForClose(org.w3c.dom.Element parent)
+
+
Generate indentation to proper depth for current item. This creates the + indentation text and appends it to the supplied parent. The generated + indentation is appropriate for the close tag of the parent element; if + a child element is to be added following this indentation it needs to + use an additional leading indent. +

+

+
Parameters:
parent - element to contain indented child item
+
+
+
+ +

+addComment

+
+private void addComment(org.w3c.dom.Element parent,
+                        java.lang.String text)
+
+
Add comment with appropriate indentation. +

+

+
Parameters:
parent - element to contain indented child item
text - comment text
+
+
+
+ +

+addChildElement

+
+private org.w3c.dom.Element addChildElement(org.w3c.dom.Element parent,
+                                            java.lang.String name)
+
+
Add child element with appropriate indentation. This generates and + returns the child element after adding it to the supplied parent, + allowing further modification of the new child element. +

+

+
Parameters:
parent - element to contain indented child item
name - child element name
+
+
+
+ +

+getDefinitions

+
+public org.jibx.binding.model.DefinitionContext getDefinitions()
+
+
Get innermost containing definition context. +

+

+ +
Returns:
innermost definition context containing this element
+
+
+
+ +

+defineEmptyStructureComponent

+
+private void defineEmptyStructureComponent(org.jibx.binding.model.StructureElementBase comp,
+                                           org.w3c.dom.Element egroup,
+                                           org.w3c.dom.Element agroup)
+
+
Process a structure component (structure or collection element) with no + name and no child components. This adds the appropriate type of element + or any definition to the container schema element. +

+

+
Parameters:
comp - structure component to be processed
egroup - schema element to contain element definitions
agroup - schema element to contain attribute definitions
+
+
+
+ +

+defineStructureComponent

+
+private void defineStructureComponent(org.jibx.binding.model.StructureElementBase comp,
+                                      org.w3c.dom.Element egroup,
+                                      org.w3c.dom.Element agroup,
+                                      boolean mult)
+
+
Process a structure component (structure or collection element) within a + list of child components. This adds the appropriate type of element or + any definition to the container, if necessary calling other methods for + recursive handling of nested child components. +

+

+
Parameters:
comp - structure component to be processed
egroup - schema element to contain element definitions
agroup - schema element to contain attribute definitions
mult - allow any number of occurrences of components flag
+
+
+
+ +

+defineList

+
+private void defineList(java.util.ArrayList comps,
+                        org.w3c.dom.Element egroup,
+                        org.w3c.dom.Element agroup,
+                        boolean mult)
+
+
Create the schema definition list for a binding component list. This + builds the sequence of elements and attributes defined by the binding + components, including nested complex types for elements with structure. +

+

+
Parameters:
comps - binding component list
egroup - schema element to contain element definitions
agroup - schema element to contain attribute definitions
mult - allow any number of occurrences of components flag
+
+
+
+ +

+defineNestedStructure

+
+private org.w3c.dom.Element defineNestedStructure(org.jibx.binding.model.ContainerElementBase container,
+                                                  org.w3c.dom.Element parent)
+
+
Create the schema definition for a nested structure. This defines a + complex type, if necessary calling itself recursively for elements which + are themselves complex types. In the special case where the container + element is a mapping which extends an abstract base class this generates + the complex type as an extension of the base class complex type. +

+

+
Parameters:
container - binding definition element containing nested structure
parent - schema element to hold the definition +
Returns:
constructed complex type
+
+
+
+ +

+generateSchema

+
+private void generateSchema(org.jibx.binding.model.BindingElement binding)
+
+
Generate a schema from a binding using supplied classpaths. If the schema + for the binding namespace (or default namespace) already exists the + definitions from this binding are added to the existing schema; otherwise + a new schema is created and added to the collection defined. +

+

+
Parameters:
binding - root element of binding
+
+
+
+ +

+generate

+
+public void generate(org.jibx.binding.model.BindingElement binding)
+              throws JiBXException
+
+
Process a binding definition for schema generation. This first validates + the binding definition, and if it is valid then handles schema generation + from the binding. +

+

+
Parameters:
binding - root element of binding +
Throws: +
JiBXException - if error in generating the schema
+
+
+
+ +

+simpleClassName

+
+private java.lang.String simpleClassName(java.lang.String cname)
+
+
Get simple class name. +

+

+
Parameters:
cname - class name with full package specification +
Returns:
class name only
+
+
+
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
Main method for running compiler as application. +

+

+
Parameters:
args - command line arguments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/BindingGenerator.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/BindingGenerator.html @@ -0,0 +1,893 @@ + + + + + + +BindingGenerator (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class BindingGenerator

+
+java.lang.Object
+  extended by org.jibx.binding.BindingGenerator
+
+
+
+
public class BindingGenerator
extends java.lang.Object
+ + +

+Binding generator. This loads the specified input classes and processes them + to generate a default binding definition. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringCURRENT_VERSION + +
+          Generator version.
+private  java.util.HashMapm_beanNames + +
+          Class names to properties list map.
+private  java.util.HashMapm_enumerationNames + +
+          Class names to deserializers map for typesafe enumerations.
+private  java.util.HashSetm_ignoreNames + +
+          Class names to be treated like interfaces (not mapped directly).
+private  java.util.HashMapm_mappedNames + +
+          Class names to mapped element names map.
+private  booleanm_mixedCase + +
+          Use camel case for XML names flag.
+private  java.lang.Stringm_namespaceUri + +
+          Namespace URI for elements.
+private  java.util.HashSetm_structureNames + +
+          Class names bound as nested structures.
+private  org.jibx.binding.util.ObjectStackm_structureStack + +
+          Stack of structure definitions in progress (used to detect cycles).
+private  booleanm_verbose + +
+          Show verbose output flag.
+private static java.util.HashSets_objectPrimitiveSet + +
+          Set of objects treated as primitives.
+  + + + + + + + + + + + + + +
+Constructor Summary
BindingGenerator() + +
+          Default constructor.
BindingGenerator(boolean verbose, + boolean mixed, + java.lang.String uri) + +
+          Constructor with settings specified.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  java.lang.StringconvertName(java.lang.String base) + +
+          Convert class or unprefixed field name to element or attribute name.
+private  org.jibx.binding.model.MappingElementcreateMapping(ClassFile cf, + boolean abstr) + +
+          Create the mapping element for a particular class.
+private  org.jibx.binding.model.StructureElementcreateStructure(ClassFile cf, + java.lang.String fname) + +
+          Create the structure element for a particular class.
+private  voiddefineFields(ClassFile cf, + org.jibx.binding.model.ContainerElementBase contain) + +
+          Construct the list of child binding components that define the binding + structure for fields of a particular class.
+private  voiddefineProperties(ClassFile cf, + java.util.ArrayList props, + boolean internal, + org.jibx.binding.model.ContainerElementBase contain) + +
+          Construct the list of child binding components that define the binding + structure corresponding to properties of a particular class.
+private  voiddefineStructure(ClassFile cf, + org.jibx.binding.model.ContainerElementBase contain) + +
+          Construct the list of child binding components that define the binding + structure corresponding to a particular class.
+ java.lang.StringelementName(java.lang.String cname) + +
+          Generate structure element name from class name using set conversions.
+static voidfindClassesUsed(java.lang.String cname, + java.util.ArrayList mnames, + java.util.HashSet dataset, + java.util.HashSet exceptset) + +
+          Get the set of data classes passed to or returned by a list of methods + within a class.
+ org.jibx.binding.model.BindingElementgenerate(java.util.ArrayList names, + java.util.HashSet abstracts, + java.util.HashMap customs, + java.util.HashMap beans, + java.util.HashMap enums, + java.util.ArrayList ignores) + +
+          Generate a set of bindings using supplied classpaths and class names.
+private static booleanisMappable(java.lang.String cname) + +
+           
+static voidmain(java.lang.String[] args) + +
+          Main method for running compiler as application.
+private  voidnestingIndent(java.io.PrintStream pw) + +
+          Indent to proper depth for current item.
+ voidsetCamelCase(boolean camel) + +
+          Set control flag for camel case element naming.
+ voidsetVerbose(boolean verbose) + +
+          Set control flag for verbose processing reports.
+private  java.lang.StringvalueName(java.lang.String fname) + +
+          Generate structure element name from class name using set conversions.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+CURRENT_VERSION

+
+private static java.lang.String CURRENT_VERSION
+
+
Generator version. +

+

+
+
+
+ +

+s_objectPrimitiveSet

+
+private static java.util.HashSet s_objectPrimitiveSet
+
+
Set of objects treated as primitives. +

+

+
+
+
+ +

+m_verbose

+
+private boolean m_verbose
+
+
Show verbose output flag. +

+

+
+
+
+ +

+m_mixedCase

+
+private boolean m_mixedCase
+
+
Use camel case for XML names flag. +

+

+
+
+
+ +

+m_namespaceUri

+
+private java.lang.String m_namespaceUri
+
+
Namespace URI for elements. +

+

+
+
+
+ +

+m_mappedNames

+
+private java.util.HashMap m_mappedNames
+
+
Class names to mapped element names map. +

+

+
+
+
+ +

+m_beanNames

+
+private java.util.HashMap m_beanNames
+
+
Class names to properties list map. +

+

+
+
+
+ +

+m_enumerationNames

+
+private java.util.HashMap m_enumerationNames
+
+
Class names to deserializers map for typesafe enumerations. +

+

+
+
+
+ +

+m_structureStack

+
+private org.jibx.binding.util.ObjectStack m_structureStack
+
+
Stack of structure definitions in progress (used to detect cycles). +

+

+
+
+
+ +

+m_structureNames

+
+private java.util.HashSet m_structureNames
+
+
Class names bound as nested structures. +

+

+
+
+
+ +

+m_ignoreNames

+
+private java.util.HashSet m_ignoreNames
+
+
Class names to be treated like interfaces (not mapped directly). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingGenerator

+
+public BindingGenerator()
+
+
Default constructor. This just initializes all options disabled. +

+

+
+ +

+BindingGenerator

+
+public BindingGenerator(boolean verbose,
+                        boolean mixed,
+                        java.lang.String uri)
+
+
Constructor with settings specified. +

+

+
Parameters:
verbose - report binding details and results
mixed - use camel case in element names
uri - namespace URI for element bindings
+
+ + + + + + + + +
+Method Detail
+ +

+setVerbose

+
+public void setVerbose(boolean verbose)
+
+
Set control flag for verbose processing reports. +

+

+
Parameters:
verbose - report verbose information in processing bindings flag
+
+
+
+ +

+setCamelCase

+
+public void setCamelCase(boolean camel)
+
+
Set control flag for camel case element naming. +

+

+
Parameters:
camel - use camel case element naming flag
+
+
+
+ +

+nestingIndent

+
+private void nestingIndent(java.io.PrintStream pw)
+
+
Indent to proper depth for current item. +

+

+
Parameters:
pw - output print stream to be indented
+
+
+
+ +

+convertName

+
+private java.lang.String convertName(java.lang.String base)
+
+
Convert class or unprefixed field name to element or attribute name. +

+

+
Parameters:
base - class or simple field name to be converted +
Returns:
element or attribute name
+
+
+
+ +

+elementName

+
+public java.lang.String elementName(java.lang.String cname)
+
+
Generate structure element name from class name using set conversions. +

+

+
Parameters:
cname - class name to be converted +
Returns:
element name for instances of class
+
+
+
+ +

+valueName

+
+private java.lang.String valueName(java.lang.String fname)
+
+
Generate structure element name from class name using set conversions. +

+

+
Parameters:
fname - field name to be converted +
Returns:
element name for instances of class
+
+
+
+ +

+defineFields

+
+private void defineFields(ClassFile cf,
+                          org.jibx.binding.model.ContainerElementBase contain)
+                   throws JiBXException
+
+
Construct the list of child binding components that define the binding + structure for fields of a particular class. This binds all + non-final/non-static/non-transient fields of the class, if necessary + creating nested structure elements for unmapped classes referenced by the + fields. +

+

+
Parameters:
cf - class information
contain - binding structure container element +
Throws: +
JiBXException - on error in binding generation
+
+
+
+ +

+defineProperties

+
+private void defineProperties(ClassFile cf,
+                              java.util.ArrayList props,
+                              boolean internal,
+                              org.jibx.binding.model.ContainerElementBase contain)
+                       throws JiBXException
+
+
Construct the list of child binding components that define the binding + structure corresponding to properties of a particular class. This binds + the specified properties of the class, using get/set methods, if + necessary creating nested structure elements for unmapped classes + referenced by the properties. +

+

+
Parameters:
cf - class information
props - list of properties specified for class
internal - allow private get/set methods flag
contain - binding structure container element +
Throws: +
JiBXException - on error in binding generation
+
+
+
+ +

+defineStructure

+
+private void defineStructure(ClassFile cf,
+                             org.jibx.binding.model.ContainerElementBase contain)
+                      throws JiBXException
+
+
Construct the list of child binding components that define the binding + structure corresponding to a particular class. This binds all + non-final/non-static/non-transient fields of the class, if necessary + creating nested structure elements for unmapped classes referenced by the + fields. +

+

+
Parameters:
cf - class information
contain - binding structure container element +
Throws: +
JiBXException - on error in binding generation
+
+
+
+ +

+createStructure

+
+private org.jibx.binding.model.StructureElement createStructure(ClassFile cf,
+                                                                java.lang.String fname)
+                                                         throws JiBXException
+
+
Create the structure element for a particular class. This maps all + non-final/non-static/non-transient fields of the class, if necessary + creating nested structures. +

+

+
Parameters:
cf - class information
fname - name of field supplying reference +
Throws: +
JiBXException - on error in binding generation
+
+
+
+ +

+createMapping

+
+private org.jibx.binding.model.MappingElement createMapping(ClassFile cf,
+                                                            boolean abstr)
+                                                     throws JiBXException
+
+
Create the mapping element for a particular class. This maps all + non-final/non-static/non-transient fields of the class, if necessary + creating nested structures. +

+

+
Parameters:
cf - class information
abstr - force abstract mapping flag +
Throws: +
JiBXException - on error in binding generation
+
+
+
+ +

+isMappable

+
+private static boolean isMappable(java.lang.String cname)
+
+
+
+
+
+
+ +

+findClassesUsed

+
+public static void findClassesUsed(java.lang.String cname,
+                                   java.util.ArrayList mnames,
+                                   java.util.HashSet dataset,
+                                   java.util.HashSet exceptset)
+                            throws JiBXException
+
+
Get the set of data classes passed to or returned by a list of methods + within a class. The classes returned exclude primitive types, wrappers, + java.lang.String, and java.lang.Object. + Exception classes thrown by the methods are also optionally accumulated. +

+

+
Parameters:
cname - target class name
mnames - method names to be checked
dataset - set for accumulation of data classes (optional, data + classes not recorded if null)
exceptset - set for accumulation of exception classes (optional, + data classes not recorded if null) +
Throws: +
JiBXException - on error in loading class information
+
+
+
+ +

+generate

+
+public org.jibx.binding.model.BindingElement generate(java.util.ArrayList names,
+                                                      java.util.HashSet abstracts,
+                                                      java.util.HashMap customs,
+                                                      java.util.HashMap beans,
+                                                      java.util.HashMap enums,
+                                                      java.util.ArrayList ignores)
+                                               throws JiBXException
+
+
Generate a set of bindings using supplied classpaths and class names. +

+

+
Parameters:
names - list of class names to be included in binding
abstracts - set of classes to be handled with abstract mappings in + binding
customs - map of customized class names to marshaller/unmarshaller + class names
beans - map of class names to supplied lists of properties
enums - map of typesafe enumeration classes to deserializer methods
ignores - list of non-interface classes to be treated as interfaces + (no mapping, but mapped subclasses are used at runtime) +
Throws: +
JiBXException - if error in generating the binding definition
+
+
+
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
Main method for running compiler as application. +

+

+
Parameters:
args - command line arguments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/Compile.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/Compile.html @@ -0,0 +1,592 @@ + + + + + + +Compile (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding +
+Class Compile

+
+java.lang.Object
+  extended by org.jibx.binding.Compile
+
+
+
+
public class Compile
extends java.lang.Object
+ + +

+Binding compiler. This version checks the modified and generated classes + by loading them and listing method information. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+private static classCompile.DirectLoader + +
+          Direct class loader.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_errorOverride + +
+           
+private  booleanm_load + +
+           
+private  booleanm_skipValidate + +
+           
+private  booleanm_trackBranches + +
+           
+private  booleanm_verbose + +
+           
+private  booleanm_verify + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
Compile() + +
+          Default constructor.
Compile(boolean verbose, + boolean load, + boolean verify, + boolean track, + boolean over) + +
+          Constructor with settings specified.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidcompile(java.lang.String[] paths, + java.lang.String[] files) + +
+          Compile a set of bindings using supplied classpaths.
+private  voidhandleOutput(java.lang.String[] paths) + +
+          Output all generated and modified class files.
+static voidmain(java.lang.String[] args) + +
+          Main method for running compiler as application.
+ voidsetLoad(boolean load) + +
+          Set control flag for test loading generated/modified classes.
+ voidsetSkipValidate(boolean skip) + +
+          Set control flag for skipping binding validation.
+ voidsetVerbose(boolean verbose) + +
+          Set control flag for verbose processing reports.
+ voidsetVerify(boolean verify) + +
+          Set control flag for verifying generated/modified classes with BCEL.
+private  booleanverifyBCEL(ClassFile file) + +
+          Verify generated and modified files using BCEL verifier.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_verbose

+
+private boolean m_verbose
+
+
+
+
+
+ +

+m_load

+
+private boolean m_load
+
+
+
+
+
+ +

+m_verify

+
+private boolean m_verify
+
+
+
+
+
+ +

+m_trackBranches

+
+private boolean m_trackBranches
+
+
+
+
+
+ +

+m_errorOverride

+
+private boolean m_errorOverride
+
+
+
+
+
+ +

+m_skipValidate

+
+private boolean m_skipValidate
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Compile

+
+public Compile()
+
+
Default constructor. This just initializes all options disabled. +

+

+
+ +

+Compile

+
+public Compile(boolean verbose,
+               boolean load,
+               boolean verify,
+               boolean track,
+               boolean over)
+
+
Constructor with settings specified. +

+

+
Parameters:
verbose - report binding details and results
load - test load modified classes to validate
verify - use BCEL validation of modified classes
track - keep tracking information for source of branch generation
over - override code generation error handling
+
+ + + + + + + + +
+Method Detail
+ +

+verifyBCEL

+
+private boolean verifyBCEL(ClassFile file)
+
+
Verify generated and modified files using BCEL verifier. This provides a + more comprehensive listing of errors than just loading a class in the + JVM. +

+

+
Parameters:
file - information for class to be verified +
Returns:
true if successfully verified, false if + problem found (automatically reported)
+
+
+
+ +

+handleOutput

+
+private void handleOutput(java.lang.String[] paths)
+                   throws JiBXException,
+                          java.io.IOException
+
+
Output all generated and modified class files. Writes the actual files, + and optionally verifies and/or reports the changes. +

+

+
Parameters:
paths - array of paths used for loading files +
Throws: +
JiBXException - if error in processing the binding definition +
java.io.IOException - if path cannot be accessed
+
+
+
+ +

+setLoad

+
+public void setLoad(boolean load)
+
+
Set control flag for test loading generated/modified classes. +

+

+
Parameters:
load - test load generated/modified classes flag
+
+
+
+ +

+setVerbose

+
+public void setVerbose(boolean verbose)
+
+
Set control flag for verbose processing reports. +

+

+
Parameters:
verbose - report verbose information in processing bindings flag
+
+
+
+ +

+setVerify

+
+public void setVerify(boolean verify)
+
+
Set control flag for verifying generated/modified classes with BCEL. +

+

+
Parameters:
verify - use BCEL verification for generated/modified classes flag
+
+
+
+ +

+setSkipValidate

+
+public void setSkipValidate(boolean skip)
+
+
Set control flag for skipping binding validation. This flag is intended + only for use while processing the binding model components within JiBX. + Otherwise it'd be impossible to correct errors in the binding validation. +

+

+
Parameters:
skip - test load generated/modified classes flag
+
+
+
+ +

+compile

+
+public void compile(java.lang.String[] paths,
+                    java.lang.String[] files)
+             throws JiBXException
+
+
Compile a set of bindings using supplied classpaths. +

+

+
Parameters:
paths - list of paths for loading classes
files - list of binding definition files +
Throws: +
JiBXException - if error in processing the binding definition
+
+
+
+ +

+main

+
+public static void main(java.lang.String[] args)
+
+
Main method for running compiler as application. +

+

+
Parameters:
args - command line arguments
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/package-frame.html @@ -0,0 +1,44 @@ + + + + + + +org.jibx.binding (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.binding + + + + +
+Classes  + +
+BindingGenerator +
+Compile +
+Compile.DirectLoader +
+Loader +
+Run +
+SchemaGenerator +
+Utility
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/package-summary.html @@ -0,0 +1,173 @@ + + + + + + +org.jibx.binding (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.binding +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BindingGeneratorBinding generator.
CompileBinding compiler.
Compile.DirectLoaderDirect class loader.
LoaderBinding classloader.
RunBind-on-load class runner.
SchemaGeneratorBinding generator.
UtilityBinding compiler support class.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/IMapping.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/IMapping.html @@ -0,0 +1,585 @@ + + + + + + +IMapping (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Interface IMapping

+
+
All Superinterfaces:
IComponent
+
+
+
All Known Implementing Classes:
MappingBase, MappingDefinition, MappingDirect
+
+
+
+
public interface IMapping
extends IComponent
+ + +

+Interface for mapping definitions. This defines the additional access methods + used with mappings (beyond those used with ordinary components). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddExtension(MappingDefinition mdef) + +
+          Add extension to abstract mapping.
+ voidaddNamespace(NamespaceDefinition ns) + +
+          Add namespace.
+ IComponentbuildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + +
+          Build reference to mapping.
+ voidgenerateCode(boolean force) + +
+          Generate required code for mapping.
+ java.lang.StringgetBoundType() + +
+          Get class name handled by mapping.
+ IComponentgetImplComponent() + +
+          Get binding component implementing mapping.
+ intgetIndex() + +
+          Get mapped class index number.
+ ClassFilegetMarshaller() + +
+          Get marshaller class used for mapping.
+ NameDefinitiongetName() + +
+          Get mapped element name.
+ java.lang.StringgetReferenceType() + +
+          Get class name of type to be assumed for references to this mapping.
+ java.lang.StringgetTypeName() + +
+          Get type name.
+ ClassFilegetUnmarshaller() + +
+          Get unmarshaller class used for mapping.
+ booleanisAbstract() + +
+          Check if mapping is abstract.
+ booleanisBase() + +
+          Check if mapping has extensions.
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, print, setLinkages
+  +

+ + + + + + + + +
+Method Detail
+ +

+getBoundType

+
+java.lang.String getBoundType()
+
+
Get class name handled by mapping. +

+

+
+
+
+ +
Returns:
name of class bound by mapping
+
+
+
+ +

+getReferenceType

+
+java.lang.String getReferenceType()
+
+
Get class name of type to be assumed for references to this mapping. +

+

+
+
+
+ +
Returns:
reference type class name name
+
+
+
+ +

+getImplComponent

+
+IComponent getImplComponent()
+
+
Get binding component implementing mapping. This call is only valid for + mappings with child components, not for mappings defined using + marshallers or unmarshallers. +

+

+
+
+
+ +
Returns:
binding component implementing this mapping
+
+
+
+ +

+getMarshaller

+
+ClassFile getMarshaller()
+                        throws JiBXException
+
+
Get marshaller class used for mapping. +

+

+
+
+
+ +
Returns:
marshaller class information +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getUnmarshaller

+
+ClassFile getUnmarshaller()
+                          throws JiBXException
+
+
Get unmarshaller class used for mapping. +

+

+
+
+
+ +
Returns:
unmarshaller class information +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getName

+
+NameDefinition getName()
+
+
Get mapped element name. +

+

+
+
+
+ +
Returns:
mapped element name information (may be null if no + element name defined for mapping)
+
+
+
+ +

+getTypeName

+
+java.lang.String getTypeName()
+
+
Get type name. +

+

+
+
+
+ +
Returns:
type name (null if unnamed)
+
+
+
+ +

+getIndex

+
+int getIndex()
+
+
Get mapped class index number. +

+

+
+
+
+ +
Returns:
mapped class index number in context
+
+
+
+ +

+addNamespace

+
+void addNamespace(NamespaceDefinition ns)
+                  throws JiBXException
+
+
Add namespace. This adds a namespace definition to those active for the + mapping. +

+

+
+
+
+
Parameters:
ns - namespace definition to be added +
Throws: +
JiBXException - if error in defining namespace
+
+
+
+ +

+isAbstract

+
+boolean isAbstract()
+
+
Check if mapping is abstract. +

+

+
+
+
+ +
Returns:
true if an abstract mapping, false if + not
+
+
+
+ +

+isBase

+
+boolean isBase()
+
+
Check if mapping has extensions. +

+

+
+
+
+ +
Returns:
true if one or more mappings extend this mapping, + false if not
+
+
+
+ +

+addExtension

+
+void addExtension(MappingDefinition mdef)
+                  throws JiBXException
+
+
Add extension to abstract mapping. This call is only valid for abstract + mappings. +

+

+
+
+
+
Parameters:
mdef - extension mapping definition +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+buildRef

+
+IComponent buildRef(IContainer parent,
+                    IContextObj objc,
+                    java.lang.String type,
+                    PropertyDefinition prop)
+                    throws JiBXException
+
+
Build reference to mapping. Constructs and returns the component for + handling the mapping. +

+

+
+
+
+
Parameters:
parent - containing binding definition structure
objc - current object context
type - mapped value type
prop - property definition (may be null) +
Returns:
constructed mapping reference component +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+generateCode

+
+void generateCode(boolean force)
+                  throws JiBXException
+
+
Generate required code for mapping. +

+

+
+
+
+
Parameters:
force - add marshaller/unmarshaller classes for abstract non-base + mappings flag (not passed on to children) +
Throws: +
JiBXException - if error in transformation
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/BaseMappingWrapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/BaseMappingWrapper.html @@ -0,0 +1,453 @@ + + + + + + +BaseMappingWrapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class BaseMappingWrapper

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.BaseMappingWrapper
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class BaseMappingWrapper
extends PassThroughComponent
+ + +

+Component decorator for abstract base mapping from extension mapping. This + just handles necessary glue code generation. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
BaseMappingWrapper(IComponent wrap) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ voidprint(int depth) + +
+           
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttrPresentTest, genContentPresentTest, genLoadId, getType, hasAttribute, hasContent, hasId, isOptional, setLinkages, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+BaseMappingWrapper

+
+public BaseMappingWrapper(IComponent wrap)
+
+
Constructor. +

+

+
Parameters:
wrap - wrapped binding component
+
+ + + + + + + + +
+Method Detail
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
Overrides:
genAttributeUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
Overrides:
genContentUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
Overrides:
genNewInstance in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/IComponent.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/IComponent.html @@ -0,0 +1,613 @@ + + + + + + +IComponent (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Interface IComponent

+
+
All Known Subinterfaces:
IMapping
+
+
+
All Known Implementing Classes:
BaseMappingWrapper, ComponentProperty, DirectGeneric, DirectObject, DirectProperty, ElementWrapper, LinkableBase, MappingBase, MappingDefinition, MappingDirect, MappingReference, NestedBase, NestedCollection, NestedStructure, ObjectBinding, OptionalStructureWrapper, PassThroughComponent, StructureReference, ValueChild
+
+
+
+
public interface IComponent
+ + +

+Child component (attribute or content) interface definition. This interface + provides the basic hooks for generating code from the binding definition. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+  +

+ + + + + + + + +
+Method Detail
+ +

+isOptional

+
+boolean isOptional()
+
+
Check if component is an optional item. +

+

+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+boolean hasAttribute()
+
+
Check if component defines one or more attribute values of the + containing element. +

+

+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+void genAttrPresentTest(ContextMethodBuilder mb)
+                        throws JiBXException
+
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genAttributeUnmarshal

+
+void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasContent

+
+boolean hasContent()
+
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to setLinkages(). +

+

+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+void genNewInstance(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getType

+
+java.lang.String getType()
+
+
Get type expected by component. +

+

+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+boolean hasId()
+
+
Check if component defines an ID value for instances of context object. +

+

+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+void setLinkages()
+                 throws JiBXException
+
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+void print(int depth)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/DirectObject.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/DirectObject.html @@ -0,0 +1,1658 @@ + + + + + + +DirectObject (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class DirectObject

+
+java.lang.Object
+  extended by org.jibx.binding.def.DirectObject
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class DirectObject
extends java.lang.Object
implements IComponent
+ + +

+Linkage to object with supplied marshaller and unmarshaller. This provides + methods used to generate code for calling the supplied classes. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringABSTRACTMARSHAL_METHOD + +
+           
+private static java.lang.StringABSTRACTMARSHAL_SIGNATURE + +
+           
+private static java.lang.StringABSTRACTMARSHALLER_INTERFACE + +
+           
+private static java.lang.StringALIASABLE_INTERFACETYPE + +
+           
+private static java.lang.StringANY_INIT_SIG + +
+           
+private static java.lang.StringANY_INITCLASS_SIG + +
+           
+private static java.lang.StringGETMARSHALLER_METHOD + +
+           
+private static java.lang.StringGETMARSHALLER_SIGNATURE + +
+           
+private static java.lang.StringGETUNMARSHALLER_METHOD + +
+           
+private static java.lang.StringGETUNMARSHALLER_SIGNATURE + +
+           
+private  DefinitionContextm_defContext + +
+          Definition context for resolving names.
+private  booleanm_isAbstract + +
+          Abstract mapping flag.
+private  booleanm_isSlotSet + +
+          Flag for marshaller/unmarshaller slot defined.
+private  ClassFilem_marshaller + +
+          Marshaller class (lazy create on first use if name supplied).
+private  ClassFilem_marshallerBase + +
+          Marshaller base class.
+private  intm_mumSlot + +
+          Marshaller/unmarshaller slot number.
+private  NameDefinitionm_name + +
+          Element name information (null if no bound element).
+private  IContainerm_parent + +
+          Containing binding definition structure.
+private  ClassFilem_targetClass + +
+          Class handled by this binding.
+private  ClassFilem_unmarshaller + +
+          Unmarshaller class (lazy create on first use if name supplied).
+private  ClassFilem_unmarshallerBase + +
+          Unmarshaller base class.
+private static java.lang.StringMARSHALLER_MARSHAL_METHOD + +
+           
+private static java.lang.StringMARSHALLER_MARSHAL_SIGNATURE + +
+           
+private static java.lang.StringMARSHALONLY_INIT_SIG + +
+           
+private static java.lang.StringMARSHALONLY_INITCLASS_SIG + +
+           
+private static java.lang.StringMARSHALUNMARSHAL_INIT_SIG + +
+           
+private static java.lang.StringMARSHALUNMARSHAL_INITCLASS_SIG + +
+           
+private static java.lang.StringUNMARSHALLER_TESTPRESENT_METHOD + +
+           
+private static java.lang.StringUNMARSHALLER_TESTPRESENT_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHALLER_UNMARSHAL_METHOD + +
+           
+private static java.lang.StringUNMARSHALLER_UNMARSHAL_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHALONLY_INIT_SIG + +
+           
+private static java.lang.StringUNMARSHALONLY_INITCLASS_SIG + +
+           
+  + + + + + + + + + + +
+Constructor Summary
DirectObject(IContainer parent, + DefinitionContext defc, + ClassFile target, + boolean abs, + ClassFile mcf, + ClassFile ucf, + int slot, + NameDefinition name) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+private  voidcreateSubclass(boolean out) + +
+          Create aliased subclass for marshaller or unmarshaller with element name + defined by binding.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+private  voidgenLoadSlot(ContextMethodBuilder mb) + +
+          Load marshaller/unmarshaller index.
+ voidgenMarshal(ContextMethodBuilder mb) + +
+          Generate marshalling code for this mapping.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ voidgenTestPresent(ContextMethodBuilder mb) + +
+          Generate presence test code for this mapping.
+ voidgenUnmarshal(ContextMethodBuilder mb) + +
+          Generate unmarshalling code for this mapping.
+ ClassFilegetMarshaller() + +
+          Get marshaller class used for mapping.
+ NameDefinitiongetName() + +
+          Get mapped element name.
+private  intgetSlot() + +
+          Get marshaller/unmarshaller index.
+ ClassFilegetTargetClass() + +
+          Get target class for mapping.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ ClassFilegetUnmarshaller() + +
+          Get unmarshaller class used for mapping.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+GETUNMARSHALLER_METHOD

+
+private static final java.lang.String GETUNMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETUNMARSHALLER_SIGNATURE

+
+private static final java.lang.String GETUNMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETMARSHALLER_METHOD

+
+private static final java.lang.String GETMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETMARSHALLER_SIGNATURE

+
+private static final java.lang.String GETMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLER_MARSHAL_METHOD

+
+private static final java.lang.String MARSHALLER_MARSHAL_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLER_MARSHAL_SIGNATURE

+
+private static final java.lang.String MARSHALLER_MARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_TESTPRESENT_METHOD

+
+private static final java.lang.String UNMARSHALLER_TESTPRESENT_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_TESTPRESENT_SIGNATURE

+
+private static final java.lang.String UNMARSHALLER_TESTPRESENT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_UNMARSHAL_METHOD

+
+private static final java.lang.String UNMARSHALLER_UNMARSHAL_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_UNMARSHAL_SIGNATURE

+
+private static final java.lang.String UNMARSHALLER_UNMARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ABSTRACTMARSHALLER_INTERFACE

+
+private static final java.lang.String ABSTRACTMARSHALLER_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ABSTRACTMARSHAL_METHOD

+
+private static final java.lang.String ABSTRACTMARSHAL_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ABSTRACTMARSHAL_SIGNATURE

+
+private static final java.lang.String ABSTRACTMARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ALIASABLE_INTERFACETYPE

+
+private static final java.lang.String ALIASABLE_INTERFACETYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ANY_INIT_SIG

+
+private static final java.lang.String ANY_INIT_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ANY_INITCLASS_SIG

+
+private static final java.lang.String ANY_INITCLASS_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALUNMARSHAL_INIT_SIG

+
+private static final java.lang.String MARSHALUNMARSHAL_INIT_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALONLY_INIT_SIG

+
+private static final java.lang.String MARSHALONLY_INIT_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALONLY_INIT_SIG

+
+private static final java.lang.String UNMARSHALONLY_INIT_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALUNMARSHAL_INITCLASS_SIG

+
+private static final java.lang.String MARSHALUNMARSHAL_INITCLASS_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALONLY_INITCLASS_SIG

+
+private static final java.lang.String MARSHALONLY_INITCLASS_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALONLY_INITCLASS_SIG

+
+private static final java.lang.String UNMARSHALONLY_INITCLASS_SIG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_parent

+
+private final IContainer m_parent
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_defContext

+
+private final DefinitionContext m_defContext
+
+
Definition context for resolving names. +

+

+
+
+
+ +

+m_isAbstract

+
+private final boolean m_isAbstract
+
+
Abstract mapping flag. If this is set the marshalling code will call the + special interface method used to verify the type of a passed object and + marshal it with the proper handling. +

+

+
+
+
+ +

+m_name

+
+private final NameDefinition m_name
+
+
Element name information (null if no bound element). +

+

+
+
+
+ +

+m_isSlotSet

+
+private boolean m_isSlotSet
+
+
Flag for marshaller/unmarshaller slot defined. This is done during code + generation, rather than during linking, so that all mapped bindings can be + defined with lower index numbers than for marshallers/unmarshallers used + only in a specific context. +

+

+
+
+
+ +

+m_mumSlot

+
+private int m_mumSlot
+
+
Marshaller/unmarshaller slot number. +

+

+
+
+
+ +

+m_targetClass

+
+private final ClassFile m_targetClass
+
+
Class handled by this binding. +

+

+
+
+
+ +

+m_marshallerBase

+
+private final ClassFile m_marshallerBase
+
+
Marshaller base class. +

+

+
+
+
+ +

+m_unmarshallerBase

+
+private final ClassFile m_unmarshallerBase
+
+
Unmarshaller base class. +

+

+
+
+
+ +

+m_marshaller

+
+private ClassFile m_marshaller
+
+
Marshaller class (lazy create on first use if name supplied). +

+

+
+
+
+ +

+m_unmarshaller

+
+private ClassFile m_unmarshaller
+
+
Unmarshaller class (lazy create on first use if name supplied). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DirectObject

+
+public DirectObject(IContainer parent,
+                    DefinitionContext defc,
+                    ClassFile target,
+                    boolean abs,
+                    ClassFile mcf,
+                    ClassFile ucf,
+                    int slot,
+                    NameDefinition name)
+             throws JiBXException
+
+
Constructor. +

+

+
Parameters:
parent - containing binding definition structure
target - class handled by this binding
abs - abstract mapping flag
mcf - marshaller class information (null if input only + binding)
ucf - unmarshaller class information (null if output + only binding)
slot - marshaller/unmarshaller slot number (-1 if to be + defined later)
name - element name information (null if no element + name) +
Throws: +
JiBXException - if configuration error
+
+ + + + + + + + +
+Method Detail
+ +

+getSlot

+
+private int getSlot()
+             throws JiBXException
+
+
Get marshaller/unmarshaller index. This is the index into the tables of + marshaller and unmarshaller instances maintained by the respective + contexts. On the first time call this gets the index number from the + binding definition, then the index number is reused on subsequent calls. +

+

+
+
+
+ +
Returns:
slot number for binding +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+genLoadSlot

+
+private void genLoadSlot(ContextMethodBuilder mb)
+                  throws JiBXException
+
+
Load marshaller/unmarshaller index. This is assigned by the binding + definition and used thereafter. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException
+
+
+
+ +

+createSubclass

+
+private void createSubclass(boolean out)
+                     throws JiBXException
+
+
Create aliased subclass for marshaller or unmarshaller with element name + defined by binding. If the same aliasable superclass is defined for use + as both a marshaller and an unmarshaller a single subclass is generated + to handle both uses. +

+

+
+
+
+
Parameters:
out - true if alias needed for marshalling, + false if for unmarshalling +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+genTestPresent

+
+public void genTestPresent(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Generate presence test code for this mapping. The generated code finds + the unmarshaller and calls the test method, leaving the result on the + stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+genUnmarshal

+
+public void genUnmarshal(ContextMethodBuilder mb)
+                  throws JiBXException
+
+
Generate unmarshalling code for this mapping. The generated code finds + and calls the unmarshaller with the object to be unmarshaller (which + needs to be loaded on the stack by the code prior to this call, but may + be null). The unmarshalled object (or null in + the case of a missing optional item) is left on the stack after this + call. The calling method generally needs to cast this object reference to + the appropriate type before using it. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+genMarshal

+
+public void genMarshal(ContextMethodBuilder mb)
+                throws JiBXException
+
+
Generate marshalling code for this mapping. The generated code finds + and calls the marshaller, passing the object to be marshalled (which + should have been loaded to the stack by the prior generated code).. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getTargetClass

+
+public ClassFile getTargetClass()
+
+
Get target class for mapping. +

+

+
+
+
+ +
Returns:
target class information
+
+
+
+ +

+getName

+
+public NameDefinition getName()
+
+
Get mapped element name. +

+

+
+
+
+ +
Returns:
mapped element name information (may be null if no + element name defined for mapping)
+
+
+
+ +

+getMarshaller

+
+public ClassFile getMarshaller()
+                        throws JiBXException
+
+
Get marshaller class used for mapping. If a name has been supplied the + actual marshaller class is created by extending the base class the first + time this method is called. +

+

+
+
+
+ +
Returns:
marshaller class information +
Throws: +
JiBXException - if error in transformation
+
+
+
+ +

+getUnmarshaller

+
+public ClassFile getUnmarshaller()
+                          throws JiBXException
+
+
Get unmarshaller class used for mapping. If a name has been supplied the + actual unmarshaller class is created by extending the base class the + first time this method is called. +

+

+
+
+
+ +
Returns:
unmarshaller class information +
Throws: +
JiBXException - if error in transformation
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/ElementWrapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/ElementWrapper.html @@ -0,0 +1,1396 @@ + + + + + + +ElementWrapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class ElementWrapper

+
+java.lang.Object
+  extended by org.jibx.binding.def.ElementWrapper
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class ElementWrapper
extends java.lang.Object
implements IComponent
+ + +

+Component decorator for element definition. This associates an element name + with a component. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  IComponentm_component + +
+          Property value binding component.
+private  DefinitionContextm_defContext + +
+          Binding definition context.
+private  booleanm_directAccess + +
+          Flag for value from collection (TODO: fix this in update).
+private  NameDefinitionm_name + +
+          Element name information.
+private  booleanm_optionalIgnored + +
+          Flag for optional ignored element (TODO: fix this in update).
+private  booleanm_optionalNormal + +
+          Flag for optional normal element (TODO: fix this in update).
+private  booleanm_structureObject + +
+          Flag for optional structure object (TODO: fix this in update).
+private static java.lang.StringMARSHAL_CLOSESTARTCONTENT + +
+           
+private static java.lang.StringMARSHAL_CLOSESTARTEMPTY + +
+           
+private static java.lang.StringMARSHAL_CLOSESTARTSIGNATURE + +
+           
+private static java.lang.StringMARSHAL_STARTNAMESPACESSIGNATURE + +
+           
+private static java.lang.StringMARSHAL_WRITEENDMETHOD + +
+           
+private static java.lang.StringMARSHAL_WRITEENDSIGNATURE + +
+           
+private static java.lang.StringMARSHAL_WRITESTARTATTRIBUTES + +
+           
+private static java.lang.StringMARSHAL_WRITESTARTNAMESPACES + +
+           
+private static java.lang.StringMARSHAL_WRITESTARTNOATTRIBUTES + +
+           
+private static java.lang.StringMARSHAL_WRITESTARTSIGNATURE + +
+           
+private static java.lang.StringMARSHALLING_CONTEXT + +
+           
+private static java.lang.StringUNMARSHAL_ISATMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_ISATSIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_PARSEENDMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_PARSEENDSIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_PARSEPASTSTART + +
+           
+private static java.lang.StringUNMARSHAL_PARSESTARTATTRIBUTES + +
+           
+private static java.lang.StringUNMARSHAL_PARSESTARTNOATTRIBUTES + +
+           
+private static java.lang.StringUNMARSHAL_PARSESTARTSIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_SKIPELEMENTMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_SKIPELEMENTSIGNATURE + +
+           
+private static java.lang.StringUNMARSHALLING_CONTEXT + +
+           
+  + + + + + + + + + + +
+Constructor Summary
ElementWrapper(DefinitionContext defc, + NameDefinition name, + IComponent wrap) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetDirect(boolean direct) + +
+          Set the direct access flag.
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ voidsetOptionalIgnored(boolean opt) + +
+          Set flag for an optional ignored element.
+ voidsetOptionalNormal(boolean opt) + +
+          Set flag for an optional normal element.
+ voidsetStructureObject(boolean opt) + +
+          Set flag for an optional structure object.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+UNMARSHAL_PARSESTARTATTRIBUTES

+
+private static final java.lang.String UNMARSHAL_PARSESTARTATTRIBUTES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARSESTARTNOATTRIBUTES

+
+private static final java.lang.String UNMARSHAL_PARSESTARTNOATTRIBUTES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARSEPASTSTART

+
+private static final java.lang.String UNMARSHAL_PARSEPASTSTART
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARSESTARTSIGNATURE

+
+private static final java.lang.String UNMARSHAL_PARSESTARTSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARSEENDMETHOD

+
+private static final java.lang.String UNMARSHAL_PARSEENDMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARSEENDSIGNATURE

+
+private static final java.lang.String UNMARSHAL_PARSEENDSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_ISATMETHOD

+
+private static final java.lang.String UNMARSHAL_ISATMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_ISATSIGNATURE

+
+private static final java.lang.String UNMARSHAL_ISATSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_SKIPELEMENTMETHOD

+
+private static final java.lang.String UNMARSHAL_SKIPELEMENTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_SKIPELEMENTSIGNATURE

+
+private static final java.lang.String UNMARSHAL_SKIPELEMENTSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITESTARTNAMESPACES

+
+private static final java.lang.String MARSHAL_WRITESTARTNAMESPACES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_STARTNAMESPACESSIGNATURE

+
+private static final java.lang.String MARSHAL_STARTNAMESPACESSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITESTARTATTRIBUTES

+
+private static final java.lang.String MARSHAL_WRITESTARTATTRIBUTES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITESTARTNOATTRIBUTES

+
+private static final java.lang.String MARSHAL_WRITESTARTNOATTRIBUTES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITESTARTSIGNATURE

+
+private static final java.lang.String MARSHAL_WRITESTARTSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_CLOSESTARTCONTENT

+
+private static final java.lang.String MARSHAL_CLOSESTARTCONTENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_CLOSESTARTEMPTY

+
+private static final java.lang.String MARSHAL_CLOSESTARTEMPTY
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_CLOSESTARTSIGNATURE

+
+private static final java.lang.String MARSHAL_CLOSESTARTSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITEENDMETHOD

+
+private static final java.lang.String MARSHAL_WRITEENDMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_WRITEENDSIGNATURE

+
+private static final java.lang.String MARSHAL_WRITEENDSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLING_CONTEXT

+
+private static final java.lang.String MARSHALLING_CONTEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_CONTEXT

+
+private static final java.lang.String UNMARSHALLING_CONTEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_component

+
+private final IComponent m_component
+
+
Property value binding component. +

+

+
+
+
+ +

+m_defContext

+
+private final DefinitionContext m_defContext
+
+
Binding definition context. +

+

+
+
+
+ +

+m_name

+
+private final NameDefinition m_name
+
+
Element name information. +

+

+
+
+
+ +

+m_directAccess

+
+private boolean m_directAccess
+
+
Flag for value from collection (TODO: fix this in update). +

+

+
+
+
+ +

+m_optionalIgnored

+
+private boolean m_optionalIgnored
+
+
Flag for optional ignored element (TODO: fix this in update). +

+

+
+
+
+ +

+m_optionalNormal

+
+private boolean m_optionalNormal
+
+
Flag for optional normal element (TODO: fix this in update). +

+

+
+
+
+ +

+m_structureObject

+
+private boolean m_structureObject
+
+
Flag for optional structure object (TODO: fix this in update). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ElementWrapper

+
+public ElementWrapper(DefinitionContext defc,
+                      NameDefinition name,
+                      IComponent wrap)
+
+
Constructor. +

+

+
Parameters:
defc - definition context for this component
name - element name definition
wrap - wrapped binding component (may be null, in the + case of a throwaway component)
+
+ + + + + + + + +
+Method Detail
+ +

+setDirect

+
+public void setDirect(boolean direct)
+
+
Set the direct access flag. This controls a variation in the code + generation to handle values loaded from a collection. +

+

+
+
+
+
Parameters:
direct - true if direct access from collection, + false if not
+
+
+
+ +

+setOptionalIgnored

+
+public void setOptionalIgnored(boolean opt)
+
+
Set flag for an optional ignored element. +

+

+
+
+
+
Parameters:
opt - true if optional ignored element, + false if not
+
+
+
+ +

+setStructureObject

+
+public void setStructureObject(boolean opt)
+
+
Set flag for an optional structure object. +

+

+
+
+
+
Parameters:
opt - true if optional structure object, + false if not
+
+
+
+ +

+setOptionalNormal

+
+public void setOptionalNormal(boolean opt)
+
+
Set flag for an optional normal element. +

+

+
+
+
+
Parameters:
opt - true if optional normal element, + false if not
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/ObjectStringConversion.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/ObjectStringConversion.html @@ -0,0 +1,758 @@ + + + + + + +ObjectStringConversion (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class ObjectStringConversion

+
+java.lang.Object
+  extended by org.jibx.binding.def.StringConversion
+      extended by org.jibx.binding.def.ObjectStringConversion
+
+
+
+
public class ObjectStringConversion
extends StringConversion
+ + +

+Object string conversion handling. Defines serialization handling for + converting objects to and from a String value. The default is + to just use the object toString() method for serialization and + a constructor from a String value for deserialization. + java.lang.String itself is a special case, with no added code + used by default for either serializing or deserializing. + java.lang.Object is also a special case, with no added code + used by default for deserializing (the String value is used + directly). Other classes must either implement toString() and + a constructor from String, or use custom serializers and/or + deserializers. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringFROMSTRING_SIGNATURE + +
+           
+private  ClassItemm_initFromString + +
+          Initializer used for creating instance from String + (only used if no conversion needed and no deserializer supplied; + may be null)
+private  ClassItemm_instToString + +
+          toString() method for converting instance to + String (only used if conversion needed and no serializer + supplied; may be null)
+private  booleanm_needDeserialize + +
+          Flag for conversion from String needed (type is anything + other than String or Object)
+private  booleanm_needSerialize + +
+          Flag for conversion to String needed (type is anything + other than String)
+private static java.lang.StringTOSTRING_METHOD + +
+           
+private static java.lang.StringTOSTRING_SIGNATURE + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.StringConversion
COMPARE_OBJECTS_METHOD, COMPARE_OBJECTS_SIGNATURE, DESERIALIZER_SIGNATURES, m_default, m_deserializer, m_formatName, m_serializer, m_typeName, m_typeSignature, MARSHAL_ATTRIBUTE, MARSHAL_ELEMENT, MARSHAL_NAME_VALUES, MARSHAL_SIGNATURE, UNMARSHAL_OPT_ATTRIBUTE, UNMARSHAL_OPT_ELEMENT, UNMARSHAL_OPT_SIGNATURE, UNMARSHAL_REQ_ATTRIBUTE, UNMARSHAL_REQ_ELEMENT, UNMARSHAL_REQ_SIGNATURE
+  + + + + + + + + + + + + + +
+Constructor Summary
ObjectStringConversion(java.lang.Object dflt, + java.lang.String ser, + java.lang.String deser, + java.lang.String type) + +
+          Constructor.
ObjectStringConversion(java.lang.String type, + ObjectStringConversion inherit) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.ObjectconvertDefault(java.lang.String text) + +
+          Convert text representation into default value object.
+ StringConversionderive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + +
+          Derive from existing formatting information.
+ voidgenFromText(ContextMethodBuilder mb) + +
+          Generate code to convert String representation.
+ voidgenParseOptional(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert optional attribute or element.
+ voidgenParseRequired(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert required attribute or element.
+protected  BranchWrappergenToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + +
+          Generate code to check if an optional value is not equal to the default.
+ voidgenToText(java.lang.String type, + ContextMethodBuilder mb) + +
+          Shared code generation for converting instance of type to + String.
+private  voidinitMethods() + +
+          Initialize methods used for conversion of types without serializer or + deserializer.
+ booleanisPrimitive() + +
+          Check if the type handled by this conversion is of a primitive type.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.StringConversion
genPopValues, genWriteOptional, genWriteRequired, genWriteText, getTypeName, setDeserializer, setSerializer
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+TOSTRING_METHOD

+
+private static final java.lang.String TOSTRING_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TOSTRING_SIGNATURE

+
+private static final java.lang.String TOSTRING_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FROMSTRING_SIGNATURE

+
+private static final java.lang.String FROMSTRING_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_needDeserialize

+
+private boolean m_needDeserialize
+
+
Flag for conversion from String needed (type is anything + other than String or Object) +

+

+
+
+
+ +

+m_initFromString

+
+private ClassItem m_initFromString
+
+
Initializer used for creating instance from String + (only used if no conversion needed and no deserializer supplied; + may be null) +

+

+
+
+
+ +

+m_needSerialize

+
+private boolean m_needSerialize
+
+
Flag for conversion to String needed (type is anything + other than String) +

+

+
+
+
+ +

+m_instToString

+
+private ClassItem m_instToString
+
+
toString() method for converting instance to + String (only used if conversion needed and no serializer + supplied; may be null) +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ObjectStringConversion

+
+ObjectStringConversion(java.lang.String type,
+                       ObjectStringConversion inherit)
+                 throws JiBXException
+
+
Constructor. Initializes conversion handling based on the supplied + inherited handling. +

+

+
Parameters:
type - fully qualified name of class handled by conversion
inherit - conversion information inherited by this conversion +
Throws: +
JiBXException - if error in configuration
+
+
+ +

+ObjectStringConversion

+
+ObjectStringConversion(java.lang.Object dflt,
+                       java.lang.String ser,
+                       java.lang.String deser,
+                       java.lang.String type)
+
+
Constructor. Initializes conversion handling based on argument values. + This form is only used for constructing the default set of conversions. + Because of this, it throws an unchecked exception on error. +

+

+
Parameters:
dflt - default value object (wrapped value for primitive types, + otherwise String)
ser - fully qualified name of serialization method
deser - fully qualified name of deserialization method
type - fully qualified name of class handled by conversion
+
+ + + + + + + + +
+Method Detail
+ +

+initMethods

+
+private void initMethods()
+                  throws JiBXException
+
+
Initialize methods used for conversion of types without serializer or + deserializer. Sets flags for types needed, with errors thrown at time + of attempted use rather than at definition time. That offers the + advantages of simpler handling (we don't need to know which directions + are supported in a binding) and more flexibility (can support nested + partial definitions cleanly). +

+

+ +
Throws: +
JiBXException
+
+
+
+ +

+genFromText

+
+public void genFromText(ContextMethodBuilder mb)
+                 throws JiBXException
+
+
Generate code to convert String representation. The + code generated by this method assumes that the String + value has already been pushed on the stack. It consumes this and + leaves the converted value on the stack. +

+

+
Specified by:
genFromText in class StringConversion
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseOptional

+
+public void genParseOptional(boolean attr,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to parse and convert optional attribute or element. The + code generated by this method assumes that the unmarshalling context + and name information for the attribute or element have already + been pushed on the stack. It consumes these and leaves the converted + value (or converted default value, if the item itself is missing) on + the stack. +

+

+
Specified by:
genParseOptional in class StringConversion
+
+
+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseRequired

+
+public void genParseRequired(boolean attr,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to parse and convert required attribute or element. The + code generated by this method assumes that the unmarshalling context and + name information for the attribute or element have already been pushed + on the stack. It consumes these and leaves the converted value on the + stack. +

+

+
Specified by:
genParseRequired in class StringConversion
+
+
+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genToText

+
+public void genToText(java.lang.String type,
+                      ContextMethodBuilder mb)
+               throws JiBXException
+
+
Shared code generation for converting instance of type to + String. This override of the base class method checks for + serialization using the toString method and implements that + case directly, while calling the base class method for normal handling. + The code generated by this method assumes that the reference to the + instance to be converted is on the stack. It consumes the reference, + replacing it with the corresponding String value. +

+

+
Overrides:
genToText in class StringConversion
+
+
+
Parameters:
type - fully qualified class name for value on stack
mb - marshal method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genToOptionalText

+
+protected BranchWrapper genToOptionalText(java.lang.String type,
+                                          ContextMethodBuilder mb,
+                                          int extra)
+                                   throws JiBXException
+
+
Generate code to check if an optional value is not equal to the default. + The code generated by this method assumes that the actual value to be + converted has already been pushed on the stack. It consumes this, + leaving the converted text reference on the stack if it's not equal to + the default value. +

+

+
Specified by:
genToOptionalText in class StringConversion
+
+
+
Parameters:
type - fully qualified class name for value on stack
mb - method builder
extra - count of extra values to be popped from stack if missing +
Returns:
handle for branch taken when value is equal to the default + (target must be set by caller) +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+isPrimitive

+
+public boolean isPrimitive()
+
+
Check if the type handled by this conversion is of a primitive type. +

+

+
Specified by:
isPrimitive in class StringConversion
+
+
+ +
Returns:
false to indicate object type
+
+
+
+ +

+convertDefault

+
+protected java.lang.Object convertDefault(java.lang.String text)
+                                   throws JiBXException
+
+
Convert text representation into default value object. For object types + this just returns the text value. +

+

+
Specified by:
convertDefault in class StringConversion
+
+
+
Parameters:
text - value representation to be converted +
Returns:
converted default value object +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+derive

+
+public StringConversion derive(java.lang.String type,
+                               java.lang.String ser,
+                               java.lang.String dser,
+                               java.lang.String dflt)
+                        throws JiBXException
+
+
Derive from existing formatting information. This allows constructing + a new instance from an existing format of the same or an ancestor + type, with the properties of the existing format copied to the new + instance except where overridden by the supplied values. +

+

+
Specified by:
derive in class StringConversion
+
+
+
Parameters:
type - fully qualified name of class handled by conversion
ser - fully qualified name of serialization method + (null if inherited)
dser - fully qualified name of deserialization method + (null if inherited)
dflt - default value text (null if inherited) +
Returns:
new instance initialized from existing one +
Throws: +
JiBXException - if error in configuration information
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/BindingBuilder.ContainerBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/BindingBuilder.ContainerBase.html @@ -0,0 +1,447 @@ + + + + + + +BindingBuilder.ContainerBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class BindingBuilder.ContainerBase

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder.ContainerBase
+
+
+
Direct Known Subclasses:
BindingDefinition, NestedBase
+
+
+
Enclosing class:
BindingBuilder
+
+
+
+
static class BindingBuilder.ContainerBase
extends java.lang.Object
+ + +

+Base class for containers. This just handles unmarshalling and checking + the values of attributes used by all containers. The container class + should set the appropriate default values for all these attributes in its + constructor, using -1 (for int values) and + null (for String values) if the default is to + simply use setting inherited from a containing component. The binding + definition root object must always define actual values as the defaults, + since otherwise the code will fall off the end of the chain of ancestors. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  intm_accessLevel + +
+          Access level for default mappings.
+protected  intm_autoLink + +
+          Auto-link style for default mappings.
+protected  IContainerm_container + +
+          Containing binding component.
+protected  intm_nameStyle + +
+          Style used for generating element or attribute names.
+protected  java.lang.Stringm_stripPrefix + +
+          Prefix text to be stripped from names.
+protected  java.lang.Stringm_stripSuffix + +
+          Suffix text to be stripped from names.
+protected  intm_styleDefault + +
+          Default style for value expression.
+  + + + + + + + + + + +
+Constructor Summary
BindingBuilder.ContainerBase(IContainer parent) + +
+          Constructor.
+  + + + + + + + + + + + + + + + +
+Method Summary
+ intgetStyleDefault() + +
+           
+ voidunmarshal(UnmarshallingContext ctx) + +
+          Unmarshal common container attributes.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_container

+
+protected IContainer m_container
+
+
Containing binding component. +

+

+
+
+
+ +

+m_styleDefault

+
+protected int m_styleDefault
+
+
Default style for value expression. +

+

+
+
+
+ +

+m_autoLink

+
+protected int m_autoLink
+
+
Auto-link style for default mappings. +

+

+
+
+
+ +

+m_accessLevel

+
+protected int m_accessLevel
+
+
Access level for default mappings. +

+

+
+
+
+ +

+m_stripPrefix

+
+protected java.lang.String m_stripPrefix
+
+
Prefix text to be stripped from names. +

+

+
+
+
+ +

+m_stripSuffix

+
+protected java.lang.String m_stripSuffix
+
+
Suffix text to be stripped from names. +

+

+
+
+
+ +

+m_nameStyle

+
+protected int m_nameStyle
+
+
Style used for generating element or attribute names. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingBuilder.ContainerBase

+
+public BindingBuilder.ContainerBase(IContainer parent)
+
+
Constructor. +

+

+
Parameters:
parent - containing binding definition context
+
+ + + + + + + + +
+Method Detail
+ +

+unmarshal

+
+public void unmarshal(UnmarshallingContext ctx)
+               throws JiBXException
+
+
Unmarshal common container attributes. +

+

+
Parameters:
ctx - unmarshalling context information +
Throws: +
JiBXException - if error in unmarshalling
+
+
+
+ +

+getStyleDefault

+
+public int getStyleDefault()
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.CollectionLoad.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.CollectionLoad.html @@ -0,0 +1,321 @@ + + + + + + +NestedCollection.CollectionLoad (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.CollectionLoad

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionLoad
+
+
+
Direct Known Subclasses:
NestedCollection.ArrayLoad, NestedCollection.IndexedLoad, NestedCollection.IteratorLoad
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
abstract static class NestedCollection.CollectionLoad
extends java.lang.Object
+ + +

+Base class for collection item load strategy. The implementation class + must handle the appropriate form of code generation for the type of + collection being used. +

+ +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
NestedCollection.CollectionLoad() + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenLoadDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after loading items from collection.
+protected  voidgenLoadInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for loading items.
+protected abstract  BranchWrappergenLoadItem(ContextMethodBuilder mb) + +
+          Generate code to load next item from collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.CollectionLoad

+
+NestedCollection.CollectionLoad()
+
+
+ + + + + + + + +
+Method Detail
+ +

+genLoadInit

+
+protected void genLoadInit(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Generate code to initialize collection for loading items. This + generates the necessary code for handling the initialization. It + must be called before attempting to call the genLoadItem(org.jibx.binding.classes.ContextMethodBuilder) + method. The base class implementation does nothing. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadItem

+
+protected abstract BranchWrapper genLoadItem(ContextMethodBuilder mb)
+                                      throws JiBXException
+
+
Generate code to load next item from collection. This generates the + necessary code for handling the load operation, leaving the item on + the stack. The genLoadInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before + calling this method, and the genLoadDone(org.jibx.binding.classes.ContextMethodBuilder) method must be + called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Parameters:
mb - method builder +
Returns:
branch wrapper for case of done with collection +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadDone

+
+protected void genLoadDone(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Generate code to clean up after loading items from collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to genLoadItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.IndexedLoad.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.IndexedLoad.html @@ -0,0 +1,394 @@ + + + + + + +NestedCollection.IndexedLoad (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.IndexedLoad

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionLoad
+      extended by org.jibx.binding.def.NestedCollection.IndexedLoad
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.IndexedLoad
extends NestedCollection.CollectionLoad
+ + +

+Collection item load strategy for collection with items accessed by + index number. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  ClassItemm_getMethod + +
+          Method used to get items by index from collection.
+private  ClassItemm_sizeMethod + +
+          Method used to get count of items in collection.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.IndexedLoad(ClassItem size, + ClassItem get) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenLoadDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after loading items from collection.
+protected  voidgenLoadInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for loading items.
+protected  BranchWrappergenLoadItem(ContextMethodBuilder mb) + +
+          Generate code to load next item from collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_sizeMethod

+
+private final ClassItem m_sizeMethod
+
+
Method used to get count of items in collection. +

+

+
+
+
+ +

+m_getMethod

+
+private final ClassItem m_getMethod
+
+
Method used to get items by index from collection. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.IndexedLoad

+
+NestedCollection.IndexedLoad(ClassItem size,
+                             ClassItem get)
+
+
Constructor. +

+

+
Parameters:
size - method used to get count of items in collection
get - method used to retrieve items by index from collection
+
+ + + + + + + + +
+Method Detail
+ +

+genLoadInit

+
+protected void genLoadInit(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to initialize collection for loading items. This + generates the necessary code for handling the initialization. It + must be called before attempting to call the NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder) + method. The base class implementation does nothing. +

+

+
Overrides:
genLoadInit in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadItem

+
+protected BranchWrapper genLoadItem(ContextMethodBuilder mb)
+                             throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to load next item from collection. This generates the + necessary code for handling the load operation, leaving the item on + the stack. The NestedCollection.CollectionLoad.genLoadInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before + calling this method, and the NestedCollection.CollectionLoad.genLoadDone(org.jibx.binding.classes.ContextMethodBuilder) method must be + called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genLoadItem in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Returns:
branch wrapper for case of done with collection +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadDone

+
+protected void genLoadDone(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to clean up after loading items from collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Overrides:
genLoadDone in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.ArrayLoad.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.ArrayLoad.html @@ -0,0 +1,391 @@ + + + + + + +NestedCollection.ArrayLoad (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.ArrayLoad

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionLoad
+      extended by org.jibx.binding.def.NestedCollection.ArrayLoad
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.ArrayLoad
extends NestedCollection.CollectionLoad
+ + +

+Collection item load strategy for array. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.Stringm_itemType + +
+          Array item type.
+private  java.lang.Objectm_slotHandle + +
+          Handle for referencing loop counter local variable.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.ArrayLoad(java.lang.String itype) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenLoadDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after loading items from collection.
+protected  voidgenLoadInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for loading items.
+protected  BranchWrappergenLoadItem(ContextMethodBuilder mb) + +
+          Generate code to load next item from collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_itemType

+
+private final java.lang.String m_itemType
+
+
Array item type. +

+

+
+
+
+ +

+m_slotHandle

+
+private java.lang.Object m_slotHandle
+
+
Handle for referencing loop counter local variable. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.ArrayLoad

+
+NestedCollection.ArrayLoad(java.lang.String itype)
+
+
Constructor. +

+

+
Parameters:
itype - array item type
+
+ + + + + + + + +
+Method Detail
+ +

+genLoadInit

+
+protected void genLoadInit(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to initialize collection for loading items. This + generates the necessary code for handling the initialization. It + must be called before attempting to call the NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder) + method. The base class implementation does nothing. +

+

+
Overrides:
genLoadInit in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadItem

+
+protected BranchWrapper genLoadItem(ContextMethodBuilder mb)
+                             throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to load next item from collection. This generates the + necessary code for handling the load operation, leaving the item on + the stack. The NestedCollection.CollectionLoad.genLoadInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before + calling this method, and the NestedCollection.CollectionLoad.genLoadDone(org.jibx.binding.classes.ContextMethodBuilder) method must be + called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genLoadItem in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Returns:
branch wrapper for case of done with collection +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadDone

+
+protected void genLoadDone(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to clean up after loading items from collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Overrides:
genLoadDone in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/StringConversion.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/StringConversion.html @@ -0,0 +1,1106 @@ + + + + + + +StringConversion (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class StringConversion

+
+java.lang.Object
+  extended by org.jibx.binding.def.StringConversion
+
+
+
Direct Known Subclasses:
ObjectStringConversion, PrimitiveStringConversion
+
+
+
+
public abstract class StringConversion
extends java.lang.Object
+ + +

+String conversion handling. Defines serialization handling for converting + to and from a String value. This uses an inheritance approach, + where each serialization definition is initialized based on the handling + set for the containing definition of the same (or parent class) type. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static java.lang.StringCOMPARE_OBJECTS_METHOD + +
+           
+protected static java.lang.StringCOMPARE_OBJECTS_SIGNATURE + +
+           
+protected static java.lang.String[]DESERIALIZER_SIGNATURES + +
+           
+protected  java.lang.Objectm_default + +
+          Default value used for this type (wrapper for primitives, otherwise + String or null).
+protected  ClassItemm_deserializer + +
+          Deserializer method information.
+protected  java.lang.Stringm_formatName + +
+          Name of format.
+protected  ClassItemm_serializer + +
+          Serializer method information.
+protected  java.lang.Stringm_typeName + +
+          Fully qualified name of class handled by conversion.
+protected  java.lang.Stringm_typeSignature + +
+          Signature of class handled by conversion.
+protected static java.lang.StringMARSHAL_ATTRIBUTE + +
+           
+protected static java.lang.StringMARSHAL_ELEMENT + +
+           
+static intMARSHAL_NAME_VALUES + +
+           
+protected static java.lang.StringMARSHAL_SIGNATURE + +
+           
+protected static java.lang.StringUNMARSHAL_OPT_ATTRIBUTE + +
+           
+protected static java.lang.StringUNMARSHAL_OPT_ELEMENT + +
+           
+protected static java.lang.StringUNMARSHAL_OPT_SIGNATURE + +
+           
+protected static java.lang.StringUNMARSHAL_REQ_ATTRIBUTE + +
+           
+protected static java.lang.StringUNMARSHAL_REQ_ELEMENT + +
+           
+protected static java.lang.StringUNMARSHAL_REQ_SIGNATURE + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
+(package private)StringConversion(java.lang.Object dflt, + java.lang.String ser, + java.lang.String deser, + java.lang.String type) + +
+          Constructor.
+private StringConversion(java.lang.String type) + +
+          Constructor.
+protected StringConversion(java.lang.String type, + StringConversion inherit) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected abstract  java.lang.ObjectconvertDefault(java.lang.String text) + +
+          Convert text representation into default value object.
+abstract  StringConversionderive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + +
+          Derive from existing formatting information.
+abstract  voidgenFromText(ContextMethodBuilder mb) + +
+          Generate code to convert String representation.
+abstract  voidgenParseOptional(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert optional attribute or element.
+abstract  voidgenParseRequired(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert required attribute or element.
+ voidgenPopValues(int count, + ContextMethodBuilder mb) + +
+          Generate code to pop values from stack.
+protected abstract  BranchWrappergenToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + +
+          Generate code to check if an optional value is not equal to the default.
+ voidgenToText(java.lang.String type, + ContextMethodBuilder mb) + +
+          Generate code to convert value to a String.
+ voidgenWriteOptional(boolean attr, + java.lang.String type, + ContextMethodBuilder mb) + +
+          Generate code to convert and write optional value to generated document.
+ voidgenWriteRequired(boolean attr, + java.lang.String type, + ContextMethodBuilder mb) + +
+          Generate code to convert and write required value to generated document.
+ voidgenWriteText(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to write String value to generated document.
+ java.lang.StringgetTypeName() + +
+          Get name of type handled by this conversion.
+abstract  booleanisPrimitive() + +
+          Check if the type handled by this conversion is of a primitive type.
+protected  voidsetDeserializer(java.lang.String deser) + +
+          Set deserializer for conversion.
+protected  voidsetSerializer(java.lang.String ser) + +
+          Set serializer for conversion.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+UNMARSHAL_OPT_ATTRIBUTE

+
+protected static final java.lang.String UNMARSHAL_OPT_ATTRIBUTE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_OPT_ELEMENT

+
+protected static final java.lang.String UNMARSHAL_OPT_ELEMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_OPT_SIGNATURE

+
+protected static final java.lang.String UNMARSHAL_OPT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_REQ_ATTRIBUTE

+
+protected static final java.lang.String UNMARSHAL_REQ_ATTRIBUTE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_REQ_ELEMENT

+
+protected static final java.lang.String UNMARSHAL_REQ_ELEMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_REQ_SIGNATURE

+
+protected static final java.lang.String UNMARSHAL_REQ_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_ATTRIBUTE

+
+protected static final java.lang.String MARSHAL_ATTRIBUTE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_ELEMENT

+
+protected static final java.lang.String MARSHAL_ELEMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_SIGNATURE

+
+protected static final java.lang.String MARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+COMPARE_OBJECTS_METHOD

+
+protected static final java.lang.String COMPARE_OBJECTS_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+COMPARE_OBJECTS_SIGNATURE

+
+protected static final java.lang.String COMPARE_OBJECTS_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DESERIALIZER_SIGNATURES

+
+protected static final java.lang.String[] DESERIALIZER_SIGNATURES
+
+
+
+
+
+ +

+MARSHAL_NAME_VALUES

+
+public static final int MARSHAL_NAME_VALUES
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_formatName

+
+protected java.lang.String m_formatName
+
+
Name of format. +

+

+
+
+
+ +

+m_default

+
+protected java.lang.Object m_default
+
+
Default value used for this type (wrapper for primitives, otherwise + String or null). +

+

+
+
+
+ +

+m_serializer

+
+protected ClassItem m_serializer
+
+
Serializer method information. +

+

+
+
+
+ +

+m_deserializer

+
+protected ClassItem m_deserializer
+
+
Deserializer method information. +

+

+
+
+
+ +

+m_typeName

+
+protected java.lang.String m_typeName
+
+
Fully qualified name of class handled by conversion. +

+

+
+
+
+ +

+m_typeSignature

+
+protected java.lang.String m_typeSignature
+
+
Signature of class handled by conversion. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+StringConversion

+
+private StringConversion(java.lang.String type)
+
+
Constructor. This internal form only initializes the type information. +

+

+
Parameters:
type - fully qualified name of class handled by conversion
+
+
+ +

+StringConversion

+
+protected StringConversion(java.lang.String type,
+                           StringConversion inherit)
+
+
Constructor. Initializes conversion handling based on the supplied + inherited handling. +

+

+
Parameters:
type - fully qualified name of class handled by conversion
inherit - conversion information inherited by this conversion
+
+
+ +

+StringConversion

+
+StringConversion(java.lang.Object dflt,
+                 java.lang.String ser,
+                 java.lang.String deser,
+                 java.lang.String type)
+
+
Constructor. Initializes conversion handling based on argument values. + This form is only used for constructing the default set of conversions. + Because of this, it throws an unchecked exception on error. +

+

+
Parameters:
dflt - default value object (wrapped value for primitive types, + otherwise String)
ser - fully qualified name of serialization method
deser - fully qualified name of deserialization method
type - fully qualified name of class handled by conversion
+
+ + + + + + + + +
+Method Detail
+ +

+getTypeName

+
+public java.lang.String getTypeName()
+
+
Get name of type handled by this conversion. +

+

+ +
Returns:
fully qualified class name of type handled by conversion
+
+
+
+ +

+genFromText

+
+public abstract void genFromText(ContextMethodBuilder mb)
+                          throws JiBXException
+
+
Generate code to convert String representation. The + code generated by this method assumes that the String + value has already been pushed on the stack. It consumes this and + leaves the converted value on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseOptional

+
+public abstract void genParseOptional(boolean attr,
+                                      ContextMethodBuilder mb)
+                               throws JiBXException
+
+
Generate code to parse and convert optional attribute or element. This + abstract base class method must be implemented by every subclass. The + code generated by this method assumes that the unmarshalling context + and name information for the attribute or element have already + been pushed on the stack. It consumes these and leaves the converted + value (or converted default value, if the item itself is missing) on + the stack. +

+

+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseRequired

+
+public abstract void genParseRequired(boolean attr,
+                                      ContextMethodBuilder mb)
+                               throws JiBXException
+
+
Generate code to parse and convert required attribute or element. This + abstract base class method must be implemented by every subclass. The + code generated by this method assumes that the unmarshalling context and + name information for the attribute or element have already been pushed + on the stack. It consumes these and leaves the converted value on the + stack. +

+

+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genWriteText

+
+public void genWriteText(boolean attr,
+                         ContextMethodBuilder mb)
+
+
Generate code to write String value to generated document. + The code generated by this method assumes that the marshalling context, + the name information, and the actual value to be converted have already + been pushed on the stack. It consumes these, leaving the marshalling + context on the stack. +

+

+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder
+
+
+
+ +

+genPopValues

+
+public void genPopValues(int count,
+                         ContextMethodBuilder mb)
+
+
Generate code to pop values from stack. +

+

+
Parameters:
count - number of values to be popped
mb - method builder
+
+
+
+ +

+genToOptionalText

+
+protected abstract BranchWrapper genToOptionalText(java.lang.String type,
+                                                   ContextMethodBuilder mb,
+                                                   int extra)
+                                            throws JiBXException
+
+
Generate code to check if an optional value is not equal to the default. + This abstract base class method must be implemented by every subclass. + The code generated by this method assumes that the actual value to be + converted has already been pushed on the stack. It consumes this, + leaving the converted text reference on the stack if it's not equal to + the default value. +

+

+
Parameters:
type - fully qualified class name for value on stack
mb - method builder
extra - count of extra words to be popped from stack if missing +
Returns:
handle for branch taken when value is equal to the default + (target must be set by caller) +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genToText

+
+public void genToText(java.lang.String type,
+                      ContextMethodBuilder mb)
+               throws JiBXException
+
+
Generate code to convert value to a String. The code + generated by this method assumes that the actual value to be converted + has already been pushed on the stack. It consumes this, leaving the + converted text reference on the stack. +

+

+
Parameters:
type - fully qualified class name for value on stack
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genWriteOptional

+
+public void genWriteOptional(boolean attr,
+                             java.lang.String type,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to convert and write optional value to generated document. + The generated code first tests if the value is the same as the supplied + default, and if so skips writing. The code assumes that the marshalling + context, the name information, and the actual value to be converted have + already been pushed on the stack. It consumes these, leaving only the + marshalling context on the stack. +

+

+
Parameters:
attr - item is an attribute (vs element) flag
type - fully qualified class name for value on stack
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genWriteRequired

+
+public void genWriteRequired(boolean attr,
+                             java.lang.String type,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to convert and write required value to generated document. + The code generated by this method assumes that the marshalling context, + the name information, and the actual value to be converted have already + been pushed on the stack. It consumes these, leaving the returned + marshalling context on the stack. +

+

+
Parameters:
attr - item is an attribute (vs element) flag
type - fully qualified class name for value on stack
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+isPrimitive

+
+public abstract boolean isPrimitive()
+
+
Check if the type handled by this conversion is of a primitive type. +

+

+ +
Returns:
true if a primitive type, false if an + object type
+
+
+
+ +

+setSerializer

+
+protected void setSerializer(java.lang.String ser)
+                      throws JiBXException
+
+
Set serializer for conversion. This finds the named static method and + sets it as the serializer to be used for this conversion. The serializer + method is expected to take a single argument of either the handled + type or a superclass or interface of the handled type, and to return a + String result. +

+

+
Parameters:
ser - fully qualified class and method name of serializer +
Throws: +
JiBXException - if serializer not found or not usable
+
+
+
+ +

+setDeserializer

+
+protected void setDeserializer(java.lang.String deser)
+                        throws JiBXException
+
+
Set deserializer for conversion. This finds the named static method and + sets it as the deserializer to be used for this conversion. The + deserializer method is expected to take a single argument of type + String, and to return a value of the handled type or a + subtype of that type. +

+

+
Parameters:
deser - fully qualified class and method name of deserializer +
Throws: +
JiBXException - if deserializer not found or not usable
+
+
+
+ +

+convertDefault

+
+protected abstract java.lang.Object convertDefault(java.lang.String text)
+                                            throws JiBXException
+
+
Convert text representation into default value object. Each subclass + must implement this with the appropriate conversion handling. +

+

+
Parameters:
text - value representation to be converted +
Returns:
converted default value object +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+derive

+
+public abstract StringConversion derive(java.lang.String type,
+                                        java.lang.String ser,
+                                        java.lang.String dser,
+                                        java.lang.String dflt)
+                                 throws JiBXException
+
+
Derive from existing formatting information. This abstract base class + method must be implemented by every subclass. It allows constructing + a new instance from an existing format of the same or an ancestor + type, with the properties of the existing format copied to the new + instance except where overridden by the supplied values. +

+

+
Parameters:
type - fully qualified name of class handled by conversion
ser - fully qualified name of serialization method + (null if inherited)
dser - fully qualified name of deserialization method + (null if inherited)
dflt - default value text (null if inherited) +
Returns:
new instance initialized from existing one +
Throws: +
JiBXException - if error in configuration information
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/ValueChild.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/ValueChild.html @@ -0,0 +1,1761 @@ + + + + + + +ValueChild (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class ValueChild

+
+java.lang.Object
+  extended by org.jibx.binding.def.ValueChild
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class ValueChild
extends java.lang.Object
implements IComponent
+ + +

+Attribute or simple content value definition from binding. This organizes + information for anything that can be converted to and from a simple + String. Content values include both elements with only character + data content and text, as character data content or CDATA sections. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+(package private) static intATTRIBUTE_STYLE + +
+           
+(package private) static intAUTO_IDENT + +
+           
+private static java.lang.String[]BACKFILL_INTERFACES + +
+           
+private static org.apache.bcel.generic.Type[]BACKFILL_METHODARGS + +
+           
+private static java.lang.StringBACKFILL_METHODNAME + +
+           
+private static java.lang.StringBACKFILL_SUFFIX + +
+          Prefix used for backfill classes.
+private static java.lang.StringBOUNDREF_NAME + +
+           
+(package private) static intCDATA_STYLE + +
+           
+private static java.lang.StringCHECK_ATTRIBUTE_NAME + +
+           
+private static java.lang.StringCHECK_ELEMENT_NAME + +
+           
+private static java.lang.StringCHECK_SIGNATURE + +
+           
+(package private) static intDEF_IDENT + +
+           
+private static java.lang.StringDEFINE_ID_NAME + +
+           
+private static java.lang.StringDEFINE_ID_SIGNATURE + +
+           
+(package private) static intDIRECT_IDENT + +
+           
+(package private) static intELEMENT_STYLE + +
+           
+private  java.lang.Stringm_constantValue + +
+          Constant value.
+private  IContainerm_container + +
+          Containing binding definition structure.
+private  StringConversionm_conversion + +
+          Conversion handling for value.
+private  intm_identType + +
+          Ident type code.
+private  IMappingm_idRefMap + +
+          Mapping definition for object class supplying identifier.
+private  NameDefinitionm_name + +
+          Attribute or element name information.
+private  IContextObjm_objContext + +
+          Containing object context.
+private  PropertyDefinitionm_property + +
+          Linked property information.
+private  java.lang.Stringm_type + +
+          Fully qualified name of type.
+private  intm_valueStyle + +
+          Value style code.
+protected static java.lang.StringMARSHAL_ATTRIBUTE + +
+           
+private static java.lang.StringMARSHAL_CDATA_NAME + +
+           
+protected static java.lang.StringMARSHAL_ELEMENT + +
+           
+protected static java.lang.StringMARSHAL_SIGNATURE + +
+           
+private static java.lang.StringMARSHAL_TEXT_NAME + +
+           
+private static java.lang.StringMARSHAL_TEXT_SIGNATURE + +
+           
+(package private) static intREF_IDENT + +
+           
+private static java.lang.StringREGISTER_BACKFILL_NAME + +
+           
+private static java.lang.StringREGISTER_BACKFILL_SIGNATURE + +
+           
+(package private) static intTEXT_STYLE + +
+           
+private static java.lang.StringUNMARSHAL_DEFREF_ATTR_NAME + +
+           
+private static java.lang.StringUNMARSHAL_DEFREF_ELEM_NAME + +
+           
+private static java.lang.StringUNMARSHAL_DEFREF_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_FWDREF_ATTR_NAME + +
+           
+private static java.lang.StringUNMARSHAL_FWDREF_ELEM_NAME + +
+           
+private static java.lang.StringUNMARSHAL_TEXT_NAME + +
+           
+private static java.lang.StringUNMARSHAL_TEXT_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHALLING_THROWEXCEPTION_METHOD + +
+           
+private static java.lang.StringUNMARSHALLING_THROWEXCEPTION_SIGNATURE + +
+           
+  + + + + + + + + + + +
+Constructor Summary
ValueChild(IContainer contain, + IContextObj objc, + NameDefinition name, + PropertyDefinition prop, + StringConversion conv, + int style, + int ident, + java.lang.String constant) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+private  ClassFilecreateBackfillClass() + +
+          Create backfill handler class if it does not already exist.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenIfPresentTest(UnmarshalBuilder mb) + +
+          Generate test if present code.
+ voidgenLoadId(ContextMethodBuilder mub) + +
+          Generate code to load ID value of instance to stack.
+private  voidgenMarshal(ContextMethodBuilder mb) + +
+          Generate marshalling code.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+private  voidgenParseIdRef(ContextMethodBuilder mb) + +
+          Generate unmarshalling code for object identifier reference.
+private  voidgenUnmarshal(ContextMethodBuilder mb) + +
+          Generate unmarshalling code.
+ java.lang.StringgetPropertyName() + +
+          Get property name.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DIRECT_IDENT

+
+static final int DIRECT_IDENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+AUTO_IDENT

+
+static final int AUTO_IDENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEF_IDENT

+
+static final int DEF_IDENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REF_IDENT

+
+static final int REF_IDENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ATTRIBUTE_STYLE

+
+static final int ATTRIBUTE_STYLE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ELEMENT_STYLE

+
+static final int ELEMENT_STYLE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TEXT_STYLE

+
+static final int TEXT_STYLE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CDATA_STYLE

+
+static final int CDATA_STYLE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BACKFILL_SUFFIX

+
+private static final java.lang.String BACKFILL_SUFFIX
+
+
Prefix used for backfill classes. +

+

+
See Also:
Constant Field Values
+
+
+ +

+BACKFILL_INTERFACES

+
+private static final java.lang.String[] BACKFILL_INTERFACES
+
+
+
+
+
+ +

+BACKFILL_METHODNAME

+
+private static final java.lang.String BACKFILL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BACKFILL_METHODARGS

+
+private static final org.apache.bcel.generic.Type[] BACKFILL_METHODARGS
+
+
+
+
+
+ +

+BOUNDREF_NAME

+
+private static final java.lang.String BOUNDREF_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECK_ELEMENT_NAME

+
+private static final java.lang.String CHECK_ELEMENT_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECK_ATTRIBUTE_NAME

+
+private static final java.lang.String CHECK_ATTRIBUTE_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECK_SIGNATURE

+
+private static final java.lang.String CHECK_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_DEFREF_ATTR_NAME

+
+private static final java.lang.String UNMARSHAL_DEFREF_ATTR_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_DEFREF_ELEM_NAME

+
+private static final java.lang.String UNMARSHAL_DEFREF_ELEM_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_FWDREF_ATTR_NAME

+
+private static final java.lang.String UNMARSHAL_FWDREF_ATTR_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_FWDREF_ELEM_NAME

+
+private static final java.lang.String UNMARSHAL_FWDREF_ELEM_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_DEFREF_SIGNATURE

+
+private static final java.lang.String UNMARSHAL_DEFREF_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REGISTER_BACKFILL_NAME

+
+private static final java.lang.String REGISTER_BACKFILL_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REGISTER_BACKFILL_SIGNATURE

+
+private static final java.lang.String REGISTER_BACKFILL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFINE_ID_NAME

+
+private static final java.lang.String DEFINE_ID_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFINE_ID_SIGNATURE

+
+private static final java.lang.String DEFINE_ID_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_TEXT_NAME

+
+private static final java.lang.String UNMARSHAL_TEXT_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_TEXT_SIGNATURE

+
+private static final java.lang.String UNMARSHAL_TEXT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_TEXT_NAME

+
+private static final java.lang.String MARSHAL_TEXT_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_CDATA_NAME

+
+private static final java.lang.String MARSHAL_CDATA_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_TEXT_SIGNATURE

+
+private static final java.lang.String MARSHAL_TEXT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_THROWEXCEPTION_METHOD

+
+private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_THROWEXCEPTION_SIGNATURE

+
+private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_ATTRIBUTE

+
+protected static final java.lang.String MARSHAL_ATTRIBUTE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_ELEMENT

+
+protected static final java.lang.String MARSHAL_ELEMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_SIGNATURE

+
+protected static final java.lang.String MARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_objContext

+
+private final IContextObj m_objContext
+
+
Containing object context. +

+

+
+
+
+ +

+m_valueStyle

+
+private final int m_valueStyle
+
+
Value style code. +

+

+
+
+
+ +

+m_constantValue

+
+private final java.lang.String m_constantValue
+
+
Constant value. +

+

+
+
+
+ +

+m_identType

+
+private final int m_identType
+
+
Ident type code. +

+

+
+
+
+ +

+m_name

+
+private final NameDefinition m_name
+
+
Attribute or element name information. +

+

+
+
+
+ +

+m_type

+
+private final java.lang.String m_type
+
+
Fully qualified name of type. +

+

+
+
+
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Linked property information. +

+

+
+
+
+ +

+m_conversion

+
+private final StringConversion m_conversion
+
+
Conversion handling for value. +

+

+
+
+
+ +

+m_idRefMap

+
+private IMapping m_idRefMap
+
+
Mapping definition for object class supplying identifier. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ValueChild

+
+public ValueChild(IContainer contain,
+                  IContextObj objc,
+                  NameDefinition name,
+                  PropertyDefinition prop,
+                  StringConversion conv,
+                  int style,
+                  int ident,
+                  java.lang.String constant)
+
+
Constructor. Saves the context information for later use. +

+

+
Parameters:
contain - containing binding definition structure
objc - containing object context
name - element or attribute name information (may be + null)
prop - property reference information
conv - string conversion handler
style - value style code
ident - identifier type code
constant - value for constant
+
+ + + + + + + + +
+Method Detail
+ +

+createBackfillClass

+
+private ClassFile createBackfillClass()
+                               throws JiBXException
+
+
Create backfill handler class if it does not already exist. This either + looks up the existing backfill handler class or creates a new one + specifically for this value. +

+

+
+
+
+ +
Returns:
backfill handler class for value +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseIdRef

+
+private void genParseIdRef(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Generate unmarshalling code for object identifier reference. The code + generated by this method assumes the unmarshalling context and name have + already been loaded to the stack, and these are consumed by the code. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genIfPresentTest

+
+public void genIfPresentTest(UnmarshalBuilder mb)
+                      throws JiBXException
+
+
Generate test if present code. This generates code that tests if the + child is present, leaving the result of the test (zero if missing, + nonzero if present) on the stack. +

+

+
+
+
+
Parameters:
mb - unmarshal method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genUnmarshal

+
+private void genUnmarshal(ContextMethodBuilder mb)
+                   throws JiBXException
+
+
Generate unmarshalling code. This internal method generates the + necessary code for handling the unmarshalling operation. The code + generated by this method restores the stack to the original state + when done. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genMarshal

+
+private void genMarshal(ContextMethodBuilder mb)
+                 throws JiBXException
+
+
Generate marshalling code. This internal method generates the + necessary code for handling the marshalling operation. The code + generated by this method restores the stack to the original state + when done. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getPropertyName

+
+public java.lang.String getPropertyName()
+
+
Get property name. If the child has an associated property this returns + the name of that property. +

+

+
+
+
+ +
Returns:
name for child property
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+                        throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mub)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mub - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/OptionalStructureWrapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/OptionalStructureWrapper.html @@ -0,0 +1,412 @@ + + + + + + +OptionalStructureWrapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class OptionalStructureWrapper

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.OptionalStructureWrapper
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class OptionalStructureWrapper
extends PassThroughComponent
+ + +

+Component decorator for optional structure with associated property. This + just handles necessary glue code generation for the marshalling operations, + where the presence of the structure needs to be tested before actually + handling tag generation. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_loadMarshal + +
+          Load object for marshalling code generation flag.
+private  PropertyDefinitionm_property + +
+          Property definition.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
OptionalStructureWrapper(IComponent wrap, + PropertyDefinition prop, + boolean load) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidprint(int depth) + +
+           
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeUnmarshal, genAttrPresentTest, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setLinkages, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Property definition. +

+

+
+
+
+ +

+m_loadMarshal

+
+private final boolean m_loadMarshal
+
+
Load object for marshalling code generation flag. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+OptionalStructureWrapper

+
+public OptionalStructureWrapper(IComponent wrap,
+                                PropertyDefinition prop,
+                                boolean load)
+
+
Constructor. +

+

+
Parameters:
wrap - wrapped binding component
load - flag for need to load object for marshalling code
+
+ + + + + + + + +
+Method Detail
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/DirectProperty.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/DirectProperty.html @@ -0,0 +1,781 @@ + + + + + + +DirectProperty (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class DirectProperty

+
+java.lang.Object
+  extended by org.jibx.binding.def.DirectProperty
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class DirectProperty
extends java.lang.Object
implements IComponent
+ + +

+Property reference with marshaller and unmarshaller. This handles loading + and storing the property value, calling the supplied marshaller and + unmarshaller for all else. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  DirectObjectm_direct + +
+          Property value direct binding.
+private  PropertyDefinitionm_property + +
+          Property definition.
+  + + + + + + + + + + +
+Constructor Summary
DirectProperty(PropertyDefinition prop, + DirectObject direct) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Property definition. +

+

+
+
+
+ +

+m_direct

+
+private final DirectObject m_direct
+
+
Property value direct binding. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DirectProperty

+
+public DirectProperty(PropertyDefinition prop,
+                      DirectObject direct)
+
+
Constructor. +

+

+
Parameters:
prop - property definition
direct - object direct binding information
+
+ + + + + + + + +
+Method Detail
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+                        throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/DefinitionContext.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/DefinitionContext.html @@ -0,0 +1,1151 @@ + + + + + + +DefinitionContext (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class DefinitionContext

+
+java.lang.Object
+  extended by org.jibx.binding.def.DefinitionContext
+
+
+
+
public class DefinitionContext
extends java.lang.Object
+ + +

+Nesting level for definitions in binding. This tracks namespace and mapping + definitions that apply to all enclosed items. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  NamespaceDefinitionm_attributeDefault + +
+          Namespace used by default at this level for attributes.
+private  org.jibx.binding.util.ArrayMapm_classMap + +
+          Mapping from fully qualified class name to mapping index (lazy + create).
+private  IContainerm_container + +
+          Containing binding definition component.
+private  DefinitionContextm_context + +
+          Containing definition context.
+private  java.util.HashMapm_convertMap + +
+          Map from signatures to String conversions.
+private  NamespaceDefinitionm_elementDefault + +
+          Namespace used by default at this level for elements.
+private  java.util.HashMapm_formatMap + +
+          Map from format names to String conversions.
+private  java.util.ArrayListm_mappings + +
+          Class mappings defined at level (lazy create).
+private  java.util.HashMapm_namedStructureMap + +
+          Named binding components (only for root context of a binding).
+private  java.util.ArrayListm_namespaces + +
+          Namespaces defined at level (lazy create).
+private  java.util.HashMapm_prefixMap + +
+          Mapping from prefix to namespace definition (lazy create).
+private  java.util.HashMapm_uriMap + +
+          Mapping from URI to namespace definition (lazy create).
+  + + + + + + + + + + +
+Constructor Summary
DefinitionContext(IContainer contain) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddConversion(java.lang.String name, + StringConversion conv) + +
+          Add named conversion.
+ voidaddMapping(IMapping def) + +
+          Add class mapping to set defined at this level.
+ voidaddNamedStructure(java.lang.String name, + IComponent comp) + +
+          Add named structure component to set defined at this level.
+ voidaddNamespace(NamespaceDefinition def) + +
+          Add namespace to set defined at this level.
+ voidgenerateCode(boolean verbose, + boolean force) + +
+          Generate code.
+private  voidgenFillNamespaceIndexes(java.util.ArrayList nss, + MethodBuilder mb) + +
+          Internal method to generate code to fill array with namespace indexes.
+private  voidgenFillNamespacePrefixes(java.util.ArrayList nss, + MethodBuilder mb) + +
+          Internal method to generate code to fill array with namespace prefixes.
+ voidgenLoadNamespaces(MethodBuilder mb) + +
+          Generate code for loading namespace index and URI arrays.
+ IMappinggetClassMapping(java.lang.String name) + +
+          Get mapping definition for class.
+ StringConversiongetConversion(ClassFile clas) + +
+          Get conversion definition for class.
+ intgetDefaultIndex(boolean attr) + +
+          Get the default namespace index for a contained name.
+private  NamespaceDefinitiongetDefaultNamespace(boolean attr) + +
+          Get the default namespace for a contained name.
+ java.lang.StringgetDefaultURI(boolean attr) + +
+          Get the default namespace URI for a contained name.
+ IMappinggetMappingAtLevel(java.lang.String name) + +
+          Get mapping definition for class if defined at this level.
+ java.util.ArrayListgetMappings() + +
+          Get mapping definitions at level.
+ StringConversiongetNamedConversion(java.lang.String name) + +
+          Get named conversion definition.
+ IComponentgetNamedStructure(java.lang.String name) + +
+          Get nested structure by name.
+ intgetNamespaceIndex(java.lang.String uri, + boolean attr) + +
+          Get namespace index for a given URI.
+ StringConversiongetSpecificConversion(java.lang.String name) + +
+          Get specific conversion definition for type.
+ booleanhasNamespace() + +
+          Check if one or more namespaces are defined in this context.
+ voidlinkMappings() + +
+          Links extension mappings to their base mappings.
+ voidprint(int depth) + +
+           
+ voidsetConversion(StringConversion conv) + +
+          Set specific conversion definition for type.
+ voidsetDefaultConversion(java.lang.String name, + StringConversion conv) + +
+          Sets a conversion definition by both type and name.
+ voidsetLinkages() + +
+          Set linkages between binding components.
+ voidsetNamedConversion(java.lang.String name, + StringConversion conv) + +
+          Sets a named conversion definition.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding definition component. +

+

+
+
+
+ +

+m_context

+
+private final DefinitionContext m_context
+
+
Containing definition context. +

+

+
+
+
+ +

+m_attributeDefault

+
+private NamespaceDefinition m_attributeDefault
+
+
Namespace used by default at this level for attributes. +

+

+
+
+
+ +

+m_elementDefault

+
+private NamespaceDefinition m_elementDefault
+
+
Namespace used by default at this level for elements. +

+

+
+
+
+ +

+m_namespaces

+
+private java.util.ArrayList m_namespaces
+
+
Namespaces defined at level (lazy create). +

+

+
+
+
+ +

+m_prefixMap

+
+private java.util.HashMap m_prefixMap
+
+
Mapping from prefix to namespace definition (lazy create). +

+

+
+
+
+ +

+m_uriMap

+
+private java.util.HashMap m_uriMap
+
+
Mapping from URI to namespace definition (lazy create). +

+

+
+
+
+ +

+m_classMap

+
+private org.jibx.binding.util.ArrayMap m_classMap
+
+
Mapping from fully qualified class name to mapping index (lazy + create). +

+

+
+
+
+ +

+m_mappings

+
+private java.util.ArrayList m_mappings
+
+
Class mappings defined at level (lazy create). +

+

+
+
+
+ +

+m_convertMap

+
+private java.util.HashMap m_convertMap
+
+
Map from signatures to String conversions. +

+

+
+
+
+ +

+m_formatMap

+
+private java.util.HashMap m_formatMap
+
+
Map from format names to String conversions. +

+

+
+
+
+ +

+m_namedStructureMap

+
+private java.util.HashMap m_namedStructureMap
+
+
Named binding components (only for root context of a binding). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DefinitionContext

+
+public DefinitionContext(IContainer contain)
+
+
Constructor. Uses the containing context to establish the hierarchy for + resolving namespaces and class mappings. +

+

+
Parameters:
contain - containing binding definition component
+
+ + + + + + + + +
+Method Detail
+ +

+addNamespace

+
+public void addNamespace(NamespaceDefinition def)
+                  throws JiBXException
+
+
Add namespace to set defined at this level. If the new namespace + conflicts with an existing namespace at this level (in terms of default + usage or prefix) this throws an exception. +

+

+
Parameters:
def - namespace definition to be added +
Throws: +
JiBXException - on namespace definition conflict
+
+
+
+ +

+addMapping

+
+public void addMapping(IMapping def)
+                throws JiBXException
+
+
Add class mapping to set defined at this level. If the new mapping + conflicts with an existing one at this level it throws an exception. +

+

+
Parameters:
def - mapping definition to be added +
Throws: +
JiBXException - on mapping definition conflict
+
+
+
+ +

+addNamedStructure

+
+public void addNamedStructure(java.lang.String name,
+                              IComponent comp)
+                       throws JiBXException
+
+
Add named structure component to set defined at this level. If the name + conflicts with an existing one at this level it throws an exception. +

+

+
Parameters:
name - component name to be set
comp - named component +
Throws: +
JiBXException - on mapping definition conflict
+
+
+
+ +

+getDefaultNamespace

+
+private NamespaceDefinition getDefaultNamespace(boolean attr)
+
+
Get the default namespace for a contained name. Elements and attributes + are treated separately, since namespace handling differs between the two. +

+

+
Parameters:
attr - flag for attribute name +
Returns:
default namespace URI, or null if none
+
+
+
+ +

+getDefaultURI

+
+public java.lang.String getDefaultURI(boolean attr)
+
+
Get the default namespace URI for a contained name. Elements and + attributes are treated separately, since namespace handling differs + between the two. +

+

+
Parameters:
attr - flag for attribute name +
Returns:
default namespace URI, or null if none
+
+
+
+ +

+getDefaultIndex

+
+public int getDefaultIndex(boolean attr)
+
+
Get the default namespace index for a contained name. Elements and + attributes are treated separately, since namespace handling differs + between the two. +

+

+
Parameters:
attr - flag for attribute name +
Returns:
default namespace index
+
+
+
+ +

+getNamespaceIndex

+
+public int getNamespaceIndex(java.lang.String uri,
+                             boolean attr)
+                      throws JiBXException
+
+
Get namespace index for a given URI. Finds the prefix for a URI in a + name contained by this level, throwing an exception if the URI is not + found or does not have a prefix. +

+

+
Parameters:
uri - namespace URI to be found
attr - flag for attribute name +
Returns:
namespace index for URI +
Throws: +
JiBXException - if URI not defined or not usable
+
+
+
+ +

+getMappingAtLevel

+
+public IMapping getMappingAtLevel(java.lang.String name)
+
+
Get mapping definition for class if defined at this level. +

+

+
Parameters:
name - fully qualified class name +
Returns:
mapping definition for class, or null if not defined
+
+
+
+ +

+getClassMapping

+
+public IMapping getClassMapping(java.lang.String name)
+
+
Get mapping definition for class. Finds the mapping for a fully + qualified class name, throwing an exception if no mapping is defined. + This can only be used during the linkage phase. +

+

+
Parameters:
name - fully qualified class name +
Returns:
mapping definition for class, or null if not defined
+
+
+
+ +

+getNamedStructure

+
+public IComponent getNamedStructure(java.lang.String name)
+                             throws JiBXException
+
+
Get nested structure by name. Finds the nested structure with the given + name, throwing an exception if no component with that name is defined. +

+

+
Parameters:
name - component name to be found +
Returns:
component with given name +
Throws: +
JiBXException - if name not defined
+
+
+
+ +

+getMappings

+
+public java.util.ArrayList getMappings()
+
+
Get mapping definitions at level. +

+

+ +
Returns:
mapping definitions, null if none defined at level
+
+
+
+ +

+getSpecificConversion

+
+public StringConversion getSpecificConversion(java.lang.String name)
+
+
Get specific conversion definition for type. Finds with an exact match + on the class name, checking the containing definitions if a conversion + is not found at this level. +

+

+
Parameters:
name - fully qualified class name to be converted +
Returns:
conversion definition for class, or null if not + found
+
+
+
+ +

+getConversion

+
+public StringConversion getConversion(ClassFile clas)
+
+
Get conversion definition for class. Finds the conversion based on a + fully qualified class name. If a specific conversion for the actual + class is not found (either in this or a containing level) this returns + the generic object conversion. +

+

+
Parameters:
clas - information for target conversion class +
Returns:
conversion definition for class
+
+
+
+ +

+getNamedConversion

+
+public StringConversion getNamedConversion(java.lang.String name)
+
+
Get named conversion definition. Finds the conversion with the supplied + name, checking the containing definitions if the conversion is not found + at this level. +

+

+
Parameters:
name - conversion name to be found +
Returns:
conversion definition for class
+
+
+
+ +

+addConversion

+
+public void addConversion(java.lang.String name,
+                          StringConversion conv)
+                   throws JiBXException
+
+
Add named conversion. Checks for duplicate conversions defined within + a level with the same name. +

+

+
Parameters:
name - format name for this conversion
conv - conversion definition for class +
Throws: +
JiBXException - if duplicate conversion definition
+
+
+
+ +

+setConversion

+
+public void setConversion(StringConversion conv)
+                   throws JiBXException
+
+
Set specific conversion definition for type. Sets the conversion based + on a type signature, checking for duplicate conversions defined within + a level. +

+

+
Parameters:
conv - conversion definition for class +
Throws: +
JiBXException - if duplicate conversion definition
+
+
+
+ +

+setNamedConversion

+
+public void setNamedConversion(java.lang.String name,
+                               StringConversion conv)
+                        throws JiBXException
+
+
Sets a named conversion definition. +

+

+
Parameters:
name - format name for this conversion
conv - conversion definition for class +
Throws: +
JiBXException - if duplicate conversion definition
+
+
+
+ +

+setDefaultConversion

+
+public void setDefaultConversion(java.lang.String name,
+                                 StringConversion conv)
+                          throws JiBXException
+
+
Sets a conversion definition by both type and name. Both the type and + name are checked for duplicate conversions defined within a level. +

+

+
Parameters:
name - format name for this conversion
conv - conversion definition for class +
Throws: +
JiBXException - if duplicate conversion definition
+
+
+
+ +

+hasNamespace

+
+public boolean hasNamespace()
+
+
Check if one or more namespaces are defined in this context. +

+

+ +
Returns:
true if namespaces are defined, false + if not
+
+
+
+ +

+genFillNamespaceIndexes

+
+private void genFillNamespaceIndexes(java.util.ArrayList nss,
+                                     MethodBuilder mb)
+
+
Internal method to generate code to fill array with namespace indexes. + The code generated to this point must have the array reference on the + stack. +

+

+
Parameters:
nss - namespaces to be handled
mb - method builder for generated code
+
+
+
+ +

+genFillNamespacePrefixes

+
+private void genFillNamespacePrefixes(java.util.ArrayList nss,
+                                      MethodBuilder mb)
+
+
Internal method to generate code to fill array with namespace prefixes. + The code generated to this point must have the array reference on the + stack. +

+

+
Parameters:
nss - namespaces to be handled
mb - method builder for generated code
+
+
+
+ +

+genLoadNamespaces

+
+public void genLoadNamespaces(MethodBuilder mb)
+
+
Generate code for loading namespace index and URI arrays. The code + creates the arrays and leaves the references on the stack. +

+

+
Parameters:
mb - method builder for generated code
+
+
+
+ +

+generateCode

+
+public void generateCode(boolean verbose,
+                         boolean force)
+                  throws JiBXException
+
+
Generate code. Executes code generation for each top-level mapping + defined in this binding, which in turn propagates the code generation + all the way down. +

+

+
Parameters:
verbose - flag for verbose output
force - create marshaller/unmarshaller even for abstract non-base + mappings flag +
Throws: +
JiBXException - if error in transformation
+
+
+
+ +

+linkMappings

+
+public void linkMappings()
+                  throws JiBXException
+
+
Links extension mappings to their base mappings. This must be done before + the more general linking step in order to determine which abstract + mappings are standalone and which are extended by other mappings +

+

+ +
Throws: +
JiBXException - if error in linking
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Set linkages between binding components. This is called after all the + basic information has been set up. All linkage to higher level + components should be done by this method, in order to prevent problems + due to the order of definitions between components. For the definition + context this calls the same method on all mappings defined in this + context. +

+

+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/BindingDefinition.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/BindingDefinition.html @@ -0,0 +1,2522 @@ + + + + + + +BindingDefinition (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class BindingDefinition

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder.ContainerBase
+      extended by org.jibx.binding.def.BindingDefinition
+
+
+
All Implemented Interfaces:
IContainer
+
+
+
+
public class BindingDefinition
extends BindingBuilder.ContainerBase
implements IContainer
+ + +

+Binding definition. This is the root of the object graph for a binding. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringCLASSES_ARRAYNAME + +
+           
+private static java.lang.StringCREATEMARSHAL_METHODNAME + +
+           
+private static java.lang.StringCREATEUNMARSHAL_METHODNAME + +
+           
+static java.lang.StringCURRENT_VERSION_NAME + +
+          Current distribution file name.
+(package private) static java.lang.StringDEFAULT_AUTOPREFIX + +
+          Default prefix for automatic ID generation.
+private static intFACTORY_INSTACCESS + +
+           
+private static java.lang.StringFACTORY_INSTNAME + +
+           
+private static java.lang.StringFACTORY_INTERFACE + +
+           
+private static java.lang.String[]FACTORY_INTERFACES + +
+           
+private static java.lang.StringFACTORY_SUFFIX + +
+           
+static java.lang.StringGENERATE_PREFIX + +
+          Prefix used in all code generation for methods and classes.
+private static java.lang.StringGETCLASSES_METHODNAME + +
+           
+private static java.lang.StringGETDEFINEDNSS_METHODNAME + +
+           
+private static java.lang.StringGETDEFINEDPREFS_METHODNAME + +
+           
+private static java.lang.StringGETDISTRIB_METHODNAME + +
+           
+private static java.lang.StringGETELEMENTNAMES_METHODNAME + +
+           
+private static java.lang.StringGETELEMENTNSS_METHODNAME + +
+           
+private static java.lang.StringGETINST_METHODNAME + +
+           
+private static java.lang.StringGETTYPEINDEX_METHODNAME + +
+           
+private static java.lang.StringGETVERSION_METHODNAME + +
+           
+private static java.lang.StringGNAMES_ARRAYNAME + +
+           
+private static java.lang.StringGURIS_ARRAYNAME + +
+           
+private static java.lang.StringIDNAMES_ARRAYNAME + +
+           
+private  DefinitionContextm_activeContext + +
+          Inner definition context constructed for binding.
+private  java.util.ArrayListm_extraClasses + +
+          Classes handled by in-line marshaller/unmarshaller references.
+private  java.util.ArrayListm_extraMarshallers + +
+          Marshaller classes used in-line.
+private  java.util.ArrayListm_extraUnmarshallers + +
+          Unmarshaller classes used in-line.
+private  intm_index + +
+          Index number of this binding.
+private  booleanm_isForceClasses + +
+          Generate marshaller/unmarshaller classes for top-level non-base abstract + mappings flag.
+private  booleanm_isForwards + +
+          Support forward references to IDs flag.
+private  booleanm_isIdGlobal + +
+          Use global ID values flag.
+private  booleanm_isInput + +
+          Input binding flag.
+private  booleanm_isMappedDone + +
+          Flag for done assigning indexes to mapped classes.
+private  booleanm_isOutput + +
+          Output binding flag.
+private  booleanm_isTrackSource + +
+          Generate souce tracking interface flag.
+private  intm_mumIndex + +
+          Next index number for marshaller/unmarshaller slots used in-line.
+private  java.lang.Stringm_name + +
+          Binding name.
+private  java.util.ArrayListm_namespacePrefixes + +
+          Original prefixes for namespaces.
+private  org.jibx.binding.util.ArrayMapm_namespaceUris + +
+          Namespaces URIs included in binding.
+private  DefinitionContextm_outerContext + +
+          Outer definition context with default definitions.
+private  java.lang.Stringm_targetPackage + +
+          Package for generated context factory.
+private  java.io.Filem_targetRoot + +
+          File root for generated context factory.
+private  org.jibx.binding.util.ArrayMapm_uniqueIds + +
+          Classes using unique (per class) identifiers.
+private static java.lang.StringMARSHALCONTEXT_IMPLEMENTATION + +
+           
+private static java.lang.StringMARSHALCONTEXT_INTERFACE + +
+           
+private static java.lang.StringMARSHALCONTEXTINIT_SIGNATURE + +
+           
+private static java.lang.StringMARSHALLER_ARRAYNAME + +
+           
+private static java.lang.StringPREFIXES_ARRAYNAME + +
+           
+static StringConversions_base64Conversion + +
+           
+private static java.util.ArrayLists_bindings + +
+          Table of defined bindings.
+private static byte[]s_blanks + +
+           
+private static StringConversions_booleanConversion + +
+           
+private static StringConversions_byteConversion + +
+           
+private static StringConversions_charConversion + +
+           
+private static StringConversions_dateConversion + +
+           
+private static StringConversions_doubleConversion + +
+           
+private static StringConversions_floatConversion + +
+           
+private static StringConversions_intConversion + +
+           
+private static StringConversions_longConversion + +
+           
+private static org.jibx.binding.util.ArrayMaps_mappedClasses + +
+          Classes included in any binding.
+static StringConversions_objectConversion + +
+           
+private static StringConversions_shortConversion + +
+           
+private static StringConversions_sqlDateConversion + +
+           
+private static StringConversions_sqlTimeConversion + +
+           
+static StringConversions_stringConversion + +
+           
+private static StringConversions_timestampConversion + +
+           
+private static java.lang.StringSTRING_ARRAYTYPE + +
+           
+private static java.lang.StringSTRINGINT_MAPTYPE + +
+           
+private static java.lang.StringSTRINGINTADD_METHOD + +
+           
+private static java.lang.StringSTRINGINTADD_SIGNATURE + +
+           
+private static java.lang.StringSTRINGINTGET_METHOD + +
+           
+private static java.lang.StringSTRINGINTGET_SIGNATURE + +
+           
+private static java.lang.StringSTRINGINTINIT_SIGNATURE + +
+           
+private static intTYPEMAP_MINIMUM_SIZE + +
+          Minimum size to use map for index from type name.
+private static java.lang.StringTYPEMAP_NAME + +
+           
+private static java.lang.StringUNMARSHALCONTEXT_IMPLEMENTATION + +
+           
+private static java.lang.StringUNMARSHALCONTEXT_INTERFACE + +
+           
+private static java.lang.StringUNMARSHALCONTEXTINIT_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHALLER_ARRAYNAME + +
+           
+private static java.lang.StringUNSUPPORTED_EXCEPTION_CLASS + +
+           
+private static java.lang.StringURIS_ARRAYNAME + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault
+  + + + + + + + + + + +
+Constructor Summary
BindingDefinition(java.lang.String name, + boolean ibind, + boolean obind, + java.lang.String tpack, + boolean glob, + boolean forward, + boolean source, + boolean force) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenerateCode(boolean verbose) + +
+          Generate code.
+static BindingDefinitiongetBinding(int index) + +
+          Get indexed binding.
+ BindingDefinitiongetBindingRoot() + +
+          Get root of binding definition.
+ BoundClassgetBoundClass() + +
+          Get class linked to binding element.
+ java.lang.StringgetDefaultPackage() + +
+          Get default package used for code generation.
+ java.io.FilegetDefaultRoot() + +
+          Get root directory for default code generation package.
+ DefinitionContextgetDefinitionContext() + +
+          Get definition context for binding element.
+ intgetIdClassIndex(java.lang.String name) + +
+          Get index for ID'ed class from binding.
+ intgetIndex() + +
+          Get index number of binding.
+ intgetMappedClassIndex(java.lang.String name) + +
+          Get index for mapped class from binding.
+ intgetMarshallerUnmarshallerIndex(java.lang.String clas) + +
+          Get marshaller/unmarshaller slot index in binding.
+ intgetNamespaceUriIndex(java.lang.String uri, + java.lang.String prefix) + +
+          Get index for namespace URI in binding.
+ java.lang.StringgetPrefix() + +
+          Get prefix for method or class generation.
+ intgetStyleDefault() + +
+          Get default style for value expression.
+ booleanhasNamespaces() + +
+           
+static voidindent(int depth) + +
+           
+ booleanisContentOrdered() + +
+          Check if content children are ordered.
+ booleanisForwards() + +
+          Check if forward ids are supported by unmarshalling binding.
+ booleanisIdGlobal() + +
+          Check if global ids are used by binding.
+ booleanisInput() + +
+          Check if binding is defined for unmarshalling.
+ booleanisOutput() + +
+          Check if binding is defined for marshalling.
+ booleanisTrackSource() + +
+          Check if source tracking is supported by unmarshalling binding.
+ voidprint() + +
+           
+static voidreset() + +
+          Discard cached information and reset in preparation for a new binding + run.
+ voidsetFactoryLocation(java.lang.String tpack, + java.io.File root) + +
+          Set location for binding factory class generation.
+ booleansetIdChild(IComponent child) + +
+          Set ID property.
+ voidsetMarshallerUnmarshallerClasses(int slot, + java.lang.String mclas, + java.lang.String uclas) + +
+          Set marshaller and unmarshaller class names for slot.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
unmarshal
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+CURRENT_VERSION_NAME

+
+public static final java.lang.String CURRENT_VERSION_NAME
+
+
Current distribution file name. This is filled in by the Ant build + process to match the current distribution. +

+

+
See Also:
Constant Field Values
+
+
+ +

+GENERATE_PREFIX

+
+public static final java.lang.String GENERATE_PREFIX
+
+
Prefix used in all code generation for methods and classes. +

+

+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_AUTOPREFIX

+
+static final java.lang.String DEFAULT_AUTOPREFIX
+
+
Default prefix for automatic ID generation. +

+

+
See Also:
Constant Field Values
+
+
+ +

+TYPEMAP_MINIMUM_SIZE

+
+private static final int TYPEMAP_MINIMUM_SIZE
+
+
Minimum size to use map for index from type name. +

+

+
See Also:
Constant Field Values
+
+
+ +

+s_bindings

+
+private static java.util.ArrayList s_bindings
+
+
Table of defined bindings. +

+

+
+
+
+ +

+s_mappedClasses

+
+private static org.jibx.binding.util.ArrayMap s_mappedClasses
+
+
Classes included in any binding. +

+

+
+
+
+ +

+s_byteConversion

+
+private static StringConversion s_byteConversion
+
+
+
+
+
+ +

+s_charConversion

+
+private static StringConversion s_charConversion
+
+
+
+
+
+ +

+s_doubleConversion

+
+private static StringConversion s_doubleConversion
+
+
+
+
+
+ +

+s_floatConversion

+
+private static StringConversion s_floatConversion
+
+
+
+
+
+ +

+s_intConversion

+
+private static StringConversion s_intConversion
+
+
+
+
+
+ +

+s_longConversion

+
+private static StringConversion s_longConversion
+
+
+
+
+
+ +

+s_shortConversion

+
+private static StringConversion s_shortConversion
+
+
+
+
+
+ +

+s_booleanConversion

+
+private static StringConversion s_booleanConversion
+
+
+
+
+
+ +

+s_dateConversion

+
+private static StringConversion s_dateConversion
+
+
+
+
+
+ +

+s_sqlDateConversion

+
+private static StringConversion s_sqlDateConversion
+
+
+
+
+
+ +

+s_sqlTimeConversion

+
+private static StringConversion s_sqlTimeConversion
+
+
+
+
+
+ +

+s_timestampConversion

+
+private static StringConversion s_timestampConversion
+
+
+
+
+
+ +

+s_base64Conversion

+
+public static StringConversion s_base64Conversion
+
+
+
+
+
+ +

+s_stringConversion

+
+public static StringConversion s_stringConversion
+
+
+
+
+
+ +

+s_objectConversion

+
+public static StringConversion s_objectConversion
+
+
+
+
+
+ +

+FACTORY_SUFFIX

+
+private static final java.lang.String FACTORY_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FACTORY_INTERFACE

+
+private static final java.lang.String FACTORY_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FACTORY_INTERFACES

+
+private static final java.lang.String[] FACTORY_INTERFACES
+
+
+
+
+
+ +

+FACTORY_INSTNAME

+
+private static final java.lang.String FACTORY_INSTNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FACTORY_INSTACCESS

+
+private static final int FACTORY_INSTACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLER_ARRAYNAME

+
+private static final java.lang.String MARSHALLER_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_ARRAYNAME

+
+private static final java.lang.String UNMARSHALLER_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRING_ARRAYTYPE

+
+private static final java.lang.String STRING_ARRAYTYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CLASSES_ARRAYNAME

+
+private static final java.lang.String CLASSES_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+URIS_ARRAYNAME

+
+private static final java.lang.String URIS_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PREFIXES_ARRAYNAME

+
+private static final java.lang.String PREFIXES_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GNAMES_ARRAYNAME

+
+private static final java.lang.String GNAMES_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GURIS_ARRAYNAME

+
+private static final java.lang.String GURIS_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+IDNAMES_ARRAYNAME

+
+private static final java.lang.String IDNAMES_ARRAYNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TYPEMAP_NAME

+
+private static final java.lang.String TYPEMAP_NAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CREATEMARSHAL_METHODNAME

+
+private static final java.lang.String CREATEMARSHAL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALCONTEXT_INTERFACE

+
+private static final java.lang.String MARSHALCONTEXT_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALCONTEXT_IMPLEMENTATION

+
+private static final java.lang.String MARSHALCONTEXT_IMPLEMENTATION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALCONTEXTINIT_SIGNATURE

+
+private static final java.lang.String MARSHALCONTEXTINIT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CREATEUNMARSHAL_METHODNAME

+
+private static final java.lang.String CREATEUNMARSHAL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALCONTEXT_INTERFACE

+
+private static final java.lang.String UNMARSHALCONTEXT_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALCONTEXT_IMPLEMENTATION

+
+private static final java.lang.String UNMARSHALCONTEXT_IMPLEMENTATION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALCONTEXTINIT_SIGNATURE

+
+private static final java.lang.String UNMARSHALCONTEXTINIT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETINST_METHODNAME

+
+private static final java.lang.String GETINST_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNSUPPORTED_EXCEPTION_CLASS

+
+private static final java.lang.String UNSUPPORTED_EXCEPTION_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETVERSION_METHODNAME

+
+private static final java.lang.String GETVERSION_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETDISTRIB_METHODNAME

+
+private static final java.lang.String GETDISTRIB_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETDEFINEDNSS_METHODNAME

+
+private static final java.lang.String GETDEFINEDNSS_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETDEFINEDPREFS_METHODNAME

+
+private static final java.lang.String GETDEFINEDPREFS_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETCLASSES_METHODNAME

+
+private static final java.lang.String GETCLASSES_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETELEMENTNSS_METHODNAME

+
+private static final java.lang.String GETELEMENTNSS_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETELEMENTNAMES_METHODNAME

+
+private static final java.lang.String GETELEMENTNAMES_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETTYPEINDEX_METHODNAME

+
+private static final java.lang.String GETTYPEINDEX_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINT_MAPTYPE

+
+private static final java.lang.String STRINGINT_MAPTYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINTINIT_SIGNATURE

+
+private static final java.lang.String STRINGINTINIT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINTADD_METHOD

+
+private static final java.lang.String STRINGINTADD_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINTADD_SIGNATURE

+
+private static final java.lang.String STRINGINTADD_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINTGET_METHOD

+
+private static final java.lang.String STRINGINTGET_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+STRINGINTGET_SIGNATURE

+
+private static final java.lang.String STRINGINTGET_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_name

+
+private final java.lang.String m_name
+
+
Binding name. +

+

+
+
+
+ +

+m_index

+
+private final int m_index
+
+
Index number of this binding. +

+

+
+
+
+ +

+m_isInput

+
+private final boolean m_isInput
+
+
Input binding flag. +

+

+
+
+
+ +

+m_isOutput

+
+private final boolean m_isOutput
+
+
Output binding flag. +

+

+
+
+
+ +

+m_isIdGlobal

+
+private final boolean m_isIdGlobal
+
+
Use global ID values flag. +

+

+
+
+
+ +

+m_isForwards

+
+private final boolean m_isForwards
+
+
Support forward references to IDs flag. +

+

+
+
+
+ +

+m_isTrackSource

+
+private final boolean m_isTrackSource
+
+
Generate souce tracking interface flag. +

+

+
+
+
+ +

+m_isForceClasses

+
+private final boolean m_isForceClasses
+
+
Generate marshaller/unmarshaller classes for top-level non-base abstract + mappings flag. +

+

+
+
+
+ +

+m_targetPackage

+
+private java.lang.String m_targetPackage
+
+
Package for generated context factory. +

+

+
+
+
+ +

+m_targetRoot

+
+private java.io.File m_targetRoot
+
+
File root for generated context factory. +

+

+
+
+
+ +

+m_uniqueIds

+
+private org.jibx.binding.util.ArrayMap m_uniqueIds
+
+
Classes using unique (per class) identifiers. This is null + and unused when using global ID values. +

+

+
+
+
+ +

+m_namespaceUris

+
+private org.jibx.binding.util.ArrayMap m_namespaceUris
+
+
Namespaces URIs included in binding. +

+

+
+
+
+ +

+m_namespacePrefixes

+
+private java.util.ArrayList m_namespacePrefixes
+
+
Original prefixes for namespaces. +

+

+
+
+
+ +

+m_outerContext

+
+private DefinitionContext m_outerContext
+
+
Outer definition context with default definitions. +

+

+
+
+
+ +

+m_activeContext

+
+private DefinitionContext m_activeContext
+
+
Inner definition context constructed for binding. +

+

+
+
+
+ +

+m_isMappedDone

+
+private boolean m_isMappedDone
+
+
Flag for done assigning indexes to mapped classes. +

+

+
+
+
+ +

+m_mumIndex

+
+private int m_mumIndex
+
+
Next index number for marshaller/unmarshaller slots used in-line. +

+

+
+
+
+ +

+m_extraClasses

+
+private java.util.ArrayList m_extraClasses
+
+
Classes handled by in-line marshaller/unmarshaller references. +

+

+
+
+
+ +

+m_extraMarshallers

+
+private java.util.ArrayList m_extraMarshallers
+
+
Marshaller classes used in-line. +

+

+
+
+
+ +

+m_extraUnmarshallers

+
+private java.util.ArrayList m_extraUnmarshallers
+
+
Unmarshaller classes used in-line. +

+

+
+
+
+ +

+s_blanks

+
+private static byte[] s_blanks
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingDefinition

+
+public BindingDefinition(java.lang.String name,
+                         boolean ibind,
+                         boolean obind,
+                         java.lang.String tpack,
+                         boolean glob,
+                         boolean forward,
+                         boolean source,
+                         boolean force)
+                  throws JiBXException
+
+
Constructor. Sets all defaults, including the default name provided, and + initializes the definition context for the outermost level of the + binding. +

+

+
Parameters:
name - binding name
ibind - input binding flag
obind - output binding flag
tpack - target package
glob - global IDs flag
forward - support forward referenced IDs flag
source - add source tracking for unmarshalled objects flag
force - create marshaller/unmarshaller classes for top-level + non-base mappings +
Throws: +
JiBXException - if error in transformation
+
+ + + + + + + + +
+Method Detail
+ +

+getBoundClass

+
+public BoundClass getBoundClass()
+
+
Get class linked to binding element. Implementation of + IContainer interface, just returns + null in this case. +

+

+
+
+
+ +
Returns:
information for class linked by binding
+
+
+
+ +

+getStyleDefault

+
+public int getStyleDefault()
+
+
Get default style for value expression. Implementation of + IContainer interface. +

+

+
Specified by:
getStyleDefault in interface IContainer
Overrides:
getStyleDefault in class BindingBuilder.ContainerBase
+
+
+ +
Returns:
default style type for values
+
+
+
+ +

+setIdChild

+
+public boolean setIdChild(IComponent child)
+
+
Set ID property. This parent binding component interface method should + never be called for the binding definition, and will throw a runtime + exception if it is called. +

+

+
+
+
+
Parameters:
child - child defining the ID property +
Returns:
false
+
+
+
+ +

+getDefaultPackage

+
+public java.lang.String getDefaultPackage()
+
+
Get default package used for code generation. +

+

+
+
+
+ +
Returns:
default code generation package
+
+
+
+ +

+getDefaultRoot

+
+public java.io.File getDefaultRoot()
+
+
Get root directory for default code generation package. +

+

+
+
+
+ +
Returns:
root for default code generation
+
+
+
+ +

+setFactoryLocation

+
+public void setFactoryLocation(java.lang.String tpack,
+                               java.io.File root)
+
+
Set location for binding factory class generation. +

+

+
+
+
+
Parameters:
tpack - target package for generated context factory
root - target root for generated context factory
+
+
+
+ +

+getIndex

+
+public int getIndex()
+
+
Get index number of binding. +

+

+
+
+
+ +
Returns:
index number for this binding definition
+
+
+
+ +

+isInput

+
+public boolean isInput()
+
+
Check if binding is defined for unmarshalling. +

+

+
+
+
+ +
Returns:
true if defined, false if not
+
+
+
+ +

+isOutput

+
+public boolean isOutput()
+
+
Check if binding is defined for marshalling. +

+

+
+
+
+ +
Returns:
true if defined, false if not
+
+
+
+ +

+isIdGlobal

+
+public boolean isIdGlobal()
+
+
Check if global ids are used by binding. +

+

+
+
+
+ +
Returns:
true if defined, false if not
+
+
+
+ +

+isForwards

+
+public boolean isForwards()
+
+
Check if forward ids are supported by unmarshalling binding. +

+

+
+
+
+ +
Returns:
true if supported, false if not
+
+
+
+ +

+isTrackSource

+
+public boolean isTrackSource()
+
+
Check if source tracking is supported by unmarshalling binding. +

+

+
+
+
+ +
Returns:
true if defined, false if not
+
+
+
+ +

+getPrefix

+
+public java.lang.String getPrefix()
+
+
Get prefix for method or class generation. +

+

+
+
+
+ +
Returns:
prefix for names created by this binding
+
+
+
+ +

+getMappedClassIndex

+
+public int getMappedClassIndex(java.lang.String name)
+
+
Get index for mapped class from binding. If the class is not already + included in any binding it is first added to the list of bound classes. + All bindings use the same index numbers to allow easy lookup of the + appropriate marshaller and unmarshaller within a particular binding, but + this does mean that all bindings dealing with a common set of classes + need to be compiled together. This uses the same sequence of values as + the getMarshallerUnmarshallerIndex(java.lang.String) method but differs in that + the values returned by this method are unique per class. This method is + intended for use with <mapping> definitions. It is an error to call + this method after calling the getMarshallerUnmarshallerIndex(java.lang.String) + method. +

+

+
+
+
+
Parameters:
name - fully qualified name of mapped class +
Returns:
index number of class
+
+
+
+ +

+getMarshallerUnmarshallerIndex

+
+public int getMarshallerUnmarshallerIndex(java.lang.String clas)
+
+
Get marshaller/unmarshaller slot index in binding. This uses the same + sequence of values as the getMappedClassIndex(java.lang.String) method but differs + in that the same class may have more than one marshaller/unmarshaller + slot defined. It's intended for user-defined marshallers/unmarshallers + where use is specific to a particular context. After the slot has been + assigned by this method, the setMarshallerUnmarshallerClasses(int, java.lang.String, java.lang.String) + method must be used to set the actual class names. +

+

+
+
+
+
Parameters:
clas - fully qualified name of class handled by + marshaller/unmarshaller +
Returns:
slot number for marshaller/unmarshaller
+
+
+
+ +

+setMarshallerUnmarshallerClasses

+
+public void setMarshallerUnmarshallerClasses(int slot,
+                                             java.lang.String mclas,
+                                             java.lang.String uclas)
+
+
Set marshaller and unmarshaller class names for slot. +

+

+
+
+
+
Parameters:
slot - assigned marshaller/unmarshaller slot number
mclas - fully qualified name of marshaller class
uclas - fully qualified name of unmarshaller class
+
+
+
+ +

+getIdClassIndex

+
+public int getIdClassIndex(java.lang.String name)
+
+
Get index for ID'ed class from binding. If the class is not already + included it is first added to the binding. If globally unique IDs are + used this always returns 0. +

+

+
+
+
+
Parameters:
name - fully qualified name of ID'ed class +
Returns:
index number of class
+
+
+
+ +

+getNamespaceUriIndex

+
+public int getNamespaceUriIndex(java.lang.String uri,
+                                java.lang.String prefix)
+
+
Get index for namespace URI in binding. If the URI is not already + included it is first added to the binding. The empty namespace URI + is always given index number 0. +

+

+
+
+
+
Parameters:
uri - namespace URI to be included in binding
prefix - prefix used with namespace +
Returns:
index number of namespace
+
+
+
+ +

+generateCode

+
+public void generateCode(boolean verbose)
+                  throws JiBXException
+
+
Generate code. First sets linkages and executes code generation for + each top-level mapping defined in this binding, which in turn propagates + the code generation all the way down. Then generates the actual binding + factory for this binding. + + TODO: handle unidirectional bindings properly +

+

+
+
+
+
Parameters:
verbose - flag for verbose output +
Throws: +
JiBXException - if error in code generation
+
+
+
+ +

+getBinding

+
+public static BindingDefinition getBinding(int index)
+
+
Get indexed binding. +

+

+
+
+
+
Parameters:
index - number of binding to be returned +
Returns:
binding at the specified index
+
+
+
+ +

+reset

+
+public static void reset()
+
+
Discard cached information and reset in preparation for a new binding + run. +

+

+
+
+
+
+
+
+
+ +

+isContentOrdered

+
+public boolean isContentOrdered()
+
+
Description copied from interface: IContainer
+
Check if content children are ordered. +

+

+
Specified by:
isContentOrdered in interface IContainer
+
+
+ +
Returns:
true if ordered, false if not
+
+
+
+ +

+hasNamespaces

+
+public boolean hasNamespaces()
+
+
+
+
+
+
+
+
+
+ +

+getBindingRoot

+
+public BindingDefinition getBindingRoot()
+
+
Description copied from interface: IContainer
+
Get root of binding definition. +

+

+
Specified by:
getBindingRoot in interface IContainer
+
+
+ +
Returns:
binding definition root
+
+
+
+ +

+getDefinitionContext

+
+public DefinitionContext getDefinitionContext()
+
+
Description copied from interface: IContainer
+
Get definition context for binding element. +

+

+
Specified by:
getDefinitionContext in interface IContainer
+
+
+ +
Returns:
binding definition context
+
+
+
+ +

+indent

+
+public static void indent(int depth)
+
+
+
+
+
+
+
+
+
+ +

+print

+
+public void print()
+
+
+
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/PassThroughComponent.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/PassThroughComponent.html @@ -0,0 +1,809 @@ + + + + + + +PassThroughComponent (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class PassThroughComponent

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
Direct Known Subclasses:
BaseMappingWrapper, ComponentProperty, LinkableBase, MappingReference, ObjectBinding, OptionalStructureWrapper, StructureReference
+
+
+
+
public class PassThroughComponent
extends java.lang.Object
implements IComponent
+ + +

+Default component decorator. This just passes through all method calls to + the wrapped component. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+protected  IComponentm_component + +
+          Property value binding component.
+  + + + + + + + + + + + + + + + +
+Constructor Summary
+protected PassThroughComponent() + +
+          No argument constructor.
+protected PassThroughComponent(IComponent comp) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+protected  voidsetWrappedComponent(IComponent comp) + +
+          Set the wrapped component.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_component

+
+protected IComponent m_component
+
+
Property value binding component. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+PassThroughComponent

+
+protected PassThroughComponent()
+
+
No argument constructor. This requires the component to be set later, + using the setWrappedComponent(org.jibx.binding.def.IComponent) method. +

+

+
+ +

+PassThroughComponent

+
+protected PassThroughComponent(IComponent comp)
+
+
Constructor. +

+

+
Parameters:
comp - wrapped component
+
+ + + + + + + + +
+Method Detail
+ +

+setWrappedComponent

+
+protected void setWrappedComponent(IComponent comp)
+
+
Set the wrapped component. +

+

+
+
+
+
Parameters:
comp - wrapped component
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+                        throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/ComponentProperty.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/ComponentProperty.html @@ -0,0 +1,522 @@ + + + + + + +ComponentProperty (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class ComponentProperty

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.ComponentProperty
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class ComponentProperty
extends PassThroughComponent
+ + +

+Property reference with binding defined by component. This handles loading + and storing the property value, calling the wrapped component methods for + everything else. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  PropertyDefinitionm_property + +
+          Property definition.
+private  booleanm_skipMarshal + +
+          Skip marshalling code tests flag.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
ComponentProperty(PropertyDefinition prop, + IComponent impl, + boolean skip) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetSkipping(boolean skip) + +
+          Set flag for skipping marshalling presence test code generation.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttrPresentTest, genContentPresentTest, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, setLinkages, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Property definition. +

+

+
+
+
+ +

+m_skipMarshal

+
+private boolean m_skipMarshal
+
+
Skip marshalling code tests flag. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ComponentProperty

+
+public ComponentProperty(PropertyDefinition prop,
+                         IComponent impl,
+                         boolean skip)
+
+
Constructor. +

+

+
Parameters:
prop - actual property definition
impl - component that defines marshalling and unmarshalling
skip - flag for marshalling code tests to be skipped
+
+ + + + + + + + +
+Method Detail
+ +

+setSkipping

+
+public void setSkipping(boolean skip)
+
+
Set flag for skipping marshalling presence test code generation. +

+

+
Parameters:
skip - true if skipping, false if not
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
Overrides:
isOptional in class PassThroughComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
Overrides:
genAttributeUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
Overrides:
genContentUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/IContainer.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/IContainer.html @@ -0,0 +1,284 @@ + + + + + + +IContainer (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Interface IContainer

+
+
All Known Implementing Classes:
BindingDefinition, NestedBase, NestedCollection, NestedStructure
+
+
+
+
public interface IContainer
+ + +

+Containing binding definitions structure interface. This interface is + implemented by components corresponding to elements in the binding definition + that can contain other elements. It supplies a context for resolving + reference to mappings, formats, or labeled structures, and for inherited + settings. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ BindingDefinitiongetBindingRoot() + +
+          Get root of binding definition.
+ DefinitionContextgetDefinitionContext() + +
+          Get definition context for binding element.
+ intgetStyleDefault() + +
+          Get default style for value expression.
+ booleanisContentOrdered() + +
+          Check if content children are ordered.
+  +

+ + + + + + + + +
+Method Detail
+ +

+isContentOrdered

+
+boolean isContentOrdered()
+
+
Check if content children are ordered. +

+

+ +
Returns:
true if ordered, false if not
+
+
+
+ +

+getStyleDefault

+
+int getStyleDefault()
+
+
Get default style for value expression. +

+

+ +
Returns:
default style type for values
+
+
+
+ +

+getDefinitionContext

+
+DefinitionContext getDefinitionContext()
+
+
Get definition context for binding element. +

+

+ +
Returns:
binding definition context
+
+
+
+ +

+getBindingRoot

+
+BindingDefinition getBindingRoot()
+
+
Get root of binding definition. +

+

+ +
Returns:
binding definition root
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/MappingDefinition.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/MappingDefinition.html @@ -0,0 +1,1638 @@ + + + + + + +MappingDefinition (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class MappingDefinition

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.LinkableBase
+          extended by org.jibx.binding.def.MappingBase
+              extended by org.jibx.binding.def.MappingDefinition
+
+
+
All Implemented Interfaces:
IComponent, IMapping
+
+
+
+
public class MappingDefinition
extends MappingBase
+ + +

+Normal mapping with defined binding. This is used for a mapping definition + which includes detailed binding information (rather than marshaller and + unmarshaller classes which handle the binding directly). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringADAPTERCLASS_SUFFIX + +
+           
+private static java.lang.StringADDMARSHALLER_METHOD + +
+           
+private static java.lang.StringADDMARSHALLER_SIGNATURE + +
+           
+private static java.lang.StringADDUNMARSHALLER_METHOD + +
+           
+private static java.lang.StringADDUNMARSHALLER_SIGNATURE + +
+           
+private static java.lang.StringBASEMARSHAL_METHODNAME + +
+           
+(package private) static java.lang.String[]BOTH_INTERFACES + +
+           
+private static java.lang.StringCHECKEXTENDS_METHOD + +
+           
+private static java.lang.StringCURRENTELEMENT_METHOD + +
+           
+private static java.lang.StringCURRENTELEMENT_SIGNATURE + +
+           
+private static java.lang.StringGETINDEX_METHOD + +
+           
+private static org.apache.bcel.generic.Type[]ISPRESENT_METHOD_ARGS + +
+           
+private static java.lang.StringISPRESENT_METHODNAME + +
+           
+private  IMappingm_baseMapping + +
+          Abstract binding this one is based on (null if not an + extension.
+private  java.lang.Stringm_baseType + +
+          Name of abstract base type.
+private  BoundClassm_class + +
+          Class linked to mapping.
+private  IContainerm_container + +
+          Containing binding definition structure.
+private  DefinitionContextm_defContext + +
+          Definition context for mapping.
+private  java.util.ArrayListm_extensions + +
+          Mapping which extend this one (null if none).
+private  booleanm_isAbstract + +
+          Abstract mapping flag.
+private  ClassFilem_marshaller + +
+          Constructed marshaller class.
+private  NameDefinitionm_name + +
+          Mapped element name (may be null if element(s) defined + by marshaller and unmarshaller, or if abstract mapping).
+private  java.lang.Stringm_referenceType + +
+          Reference type of mapping, as fully qualifed class name.
+private  IComponentm_thisBinding + +
+          Duplicate of component structure for use as "this" reference + (null if not yet defined).
+private  java.lang.Stringm_typeName + +
+          Abstract mapping type name.
+private  ClassFilem_unmarshaller + +
+          Constructed unmarshaller class.
+private static org.apache.bcel.generic.Type[]MARSHAL_METHOD_ARGS + +
+           
+private static java.lang.StringMARSHAL_METHODNAME + +
+           
+private static java.lang.StringMARSHALCONTEXT_CLASS + +
+           
+private static java.lang.StringMARSHALCONTEXT_INTERFACE + +
+           
+(package private) static java.lang.String[]MARSHALLER_INTERFACES + +
+           
+private static java.lang.StringREMOVEMARSHALLER_METHOD + +
+           
+private static java.lang.StringREMOVEMARSHALLER_SIGNATURE + +
+           
+private static java.lang.StringREMOVEUNMARSHALLER_METHOD + +
+           
+private static java.lang.StringREMOVEUNMARSHALLER_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_ISATMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_ISATSIGNATURE + +
+           
+private static org.apache.bcel.generic.Type[]UNMARSHAL_METHOD_ARGS + +
+           
+private static java.lang.StringUNMARSHAL_METHODNAME + +
+           
+private static java.lang.StringUNMARSHALCONTEXT_CLASS + +
+           
+private static java.lang.StringUNMARSHALCONTEXT_INTERFACE + +
+           
+(package private) static java.lang.String[]UNMARSHALLER_INTERFACES + +
+           
+private static java.lang.StringUNMARSHALLERPRESENT_METHOD + +
+           
+private static java.lang.StringUNMARSHALLERPRESENT_SIGNATURE + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.MappingBase
ABSTRACTMARSHALLER_INTERFACE, CHECKEXTENDS_METHODNAME, CHECKEXTENDS_SIGNATURE, GETINDEX_METHODNAME, GETINDEX_SIGNATURE, GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE, GETUNMARSHALLER_METHOD, GETUNMARSHALLER_SIGNATURE, IMARSHALLABLE_INTERFACE, IUNMARSHALLABLE_INTERFACE, MARSHALLABLE_METHODNAME, MARSHALLABLE_SIGNATURE, MARSHALLER_INTERFACE, MARSHALLERMARSHAL_METHOD, MARSHALLERMARSHAL_SIGNATURE, UNMARSHALLABLE_METHODNAME, UNMARSHALLABLE_SIGNATURE, UNMARSHALLER_INTERFACE, UNMARSHALLERUNMARSHAL_METHOD, UNMARSHALLERUNMARSHAL_SIGNATURE
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
MappingDefinition(IContainer contain, + DefinitionContext defc, + java.lang.String type, + NameDefinition name, + java.lang.String tname, + boolean abs, + java.lang.String base, + ObjectBinding bind) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddExtension(MappingDefinition mdef) + +
+          Add extension to abstract mapping.
+ voidaddNamespace(NamespaceDefinition ns) + +
+          Add namespace.
+ IComponentbuildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + +
+          Build reference to mapping.
+ voidgenerateCode(boolean force) + +
+          Generate required code for mapping.
+(package private)  voidgenLoadNamespaces(MethodBuilder mb) + +
+          Generate code for loading namespace index and URI arrays.
+ BoundClassgetBoundClass() + +
+          Get the mapped class information.
+ java.lang.StringgetBoundType() + +
+          Get class name handled by mapping.
+ IComponentgetImplComponent() + +
+          Get binding component implementing mapping.
+ ClassFilegetMarshaller() + +
+          Get marshaller class used for mapping.
+ NameDefinitiongetName() + +
+          Get mapped element name.
+ java.lang.StringgetReferenceType() + +
+          Get class name of type to be assumed for references to this mapping.
+ java.lang.StringgetTypeName() + +
+          Get type name.
+ ClassFilegetUnmarshaller() + +
+          Get unmarshaller class used for mapping.
+(package private)  booleanhasNamespace() + +
+          Check if one or more namespaces are defined for element.
+ booleanisAbstract() + +
+          Check if mapping is abstract.
+ booleanisBase() + +
+          Check if mapping has extensions.
+ voidlinkMappings() + +
+          Links extension mappings to their base mappings.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.MappingBase
addIMarshallableMethod, addIUnmarshallableMethod, getIndex
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.LinkableBase
handleRecursion
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional
+  +

+ + + + + + + + +
+Field Detail
+ +

+ADAPTERCLASS_SUFFIX

+
+private static final java.lang.String ADAPTERCLASS_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_METHODNAME

+
+private static final java.lang.String MARSHAL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+BASEMARSHAL_METHODNAME

+
+private static final java.lang.String BASEMARSHAL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_METHODNAME

+
+private static final java.lang.String UNMARSHAL_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ISPRESENT_METHODNAME

+
+private static final java.lang.String ISPRESENT_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALCONTEXT_CLASS

+
+private static final java.lang.String UNMARSHALCONTEXT_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALCONTEXT_CLASS

+
+private static final java.lang.String MARSHALCONTEXT_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_ISATMETHOD

+
+private static final java.lang.String UNMARSHAL_ISATMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_ISATSIGNATURE

+
+private static final java.lang.String UNMARSHAL_ISATSIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECKEXTENDS_METHOD

+
+private static final java.lang.String CHECKEXTENDS_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETINDEX_METHOD

+
+private static final java.lang.String GETINDEX_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLERPRESENT_METHOD

+
+private static final java.lang.String UNMARSHALLERPRESENT_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLERPRESENT_SIGNATURE

+
+private static final java.lang.String UNMARSHALLERPRESENT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALCONTEXT_INTERFACE

+
+private static final java.lang.String UNMARSHALCONTEXT_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALCONTEXT_INTERFACE

+
+private static final java.lang.String MARSHALCONTEXT_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CURRENTELEMENT_METHOD

+
+private static final java.lang.String CURRENTELEMENT_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CURRENTELEMENT_SIGNATURE

+
+private static final java.lang.String CURRENTELEMENT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ADDUNMARSHALLER_METHOD

+
+private static final java.lang.String ADDUNMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ADDUNMARSHALLER_SIGNATURE

+
+private static final java.lang.String ADDUNMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REMOVEUNMARSHALLER_METHOD

+
+private static final java.lang.String REMOVEUNMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REMOVEUNMARSHALLER_SIGNATURE

+
+private static final java.lang.String REMOVEUNMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ADDMARSHALLER_METHOD

+
+private static final java.lang.String ADDMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ADDMARSHALLER_SIGNATURE

+
+private static final java.lang.String ADDMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REMOVEMARSHALLER_METHOD

+
+private static final java.lang.String REMOVEMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+REMOVEMARSHALLER_SIGNATURE

+
+private static final java.lang.String REMOVEMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ISPRESENT_METHOD_ARGS

+
+private static final org.apache.bcel.generic.Type[] ISPRESENT_METHOD_ARGS
+
+
+
+
+
+ +

+UNMARSHAL_METHOD_ARGS

+
+private static final org.apache.bcel.generic.Type[] UNMARSHAL_METHOD_ARGS
+
+
+
+
+
+ +

+MARSHAL_METHOD_ARGS

+
+private static final org.apache.bcel.generic.Type[] MARSHAL_METHOD_ARGS
+
+
+
+
+
+ +

+UNMARSHALLER_INTERFACES

+
+static final java.lang.String[] UNMARSHALLER_INTERFACES
+
+
+
+
+
+ +

+MARSHALLER_INTERFACES

+
+static final java.lang.String[] MARSHALLER_INTERFACES
+
+
+
+
+
+ +

+BOTH_INTERFACES

+
+static final java.lang.String[] BOTH_INTERFACES
+
+
+
+
+
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_defContext

+
+private final DefinitionContext m_defContext
+
+
Definition context for mapping. +

+

+
+
+
+ +

+m_class

+
+private final BoundClass m_class
+
+
Class linked to mapping. +

+

+
+
+
+ +

+m_name

+
+private final NameDefinition m_name
+
+
Mapped element name (may be null if element(s) defined + by marshaller and unmarshaller, or if abstract mapping). +

+

+
+
+
+ +

+m_typeName

+
+private final java.lang.String m_typeName
+
+
Abstract mapping type name. +

+

+
+
+
+ +

+m_isAbstract

+
+private final boolean m_isAbstract
+
+
Abstract mapping flag. +

+

+
+
+
+ +

+m_baseType

+
+private final java.lang.String m_baseType
+
+
Name of abstract base type. +

+

+
+
+
+ +

+m_baseMapping

+
+private IMapping m_baseMapping
+
+
Abstract binding this one is based on (null if not an + extension. +

+

+
+
+
+ +

+m_thisBinding

+
+private IComponent m_thisBinding
+
+
Duplicate of component structure for use as "this" reference + (null if not yet defined). +

+

+
+
+
+ +

+m_marshaller

+
+private ClassFile m_marshaller
+
+
Constructed marshaller class. +

+

+
+
+
+ +

+m_unmarshaller

+
+private ClassFile m_unmarshaller
+
+
Constructed unmarshaller class. +

+

+
+
+
+ +

+m_extensions

+
+private java.util.ArrayList m_extensions
+
+
Mapping which extend this one (null if none). +

+

+
+
+
+ +

+m_referenceType

+
+private java.lang.String m_referenceType
+
+
Reference type of mapping, as fully qualifed class name. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MappingDefinition

+
+public MappingDefinition(IContainer contain,
+                         DefinitionContext defc,
+                         java.lang.String type,
+                         NameDefinition name,
+                         java.lang.String tname,
+                         boolean abs,
+                         java.lang.String base,
+                         ObjectBinding bind)
+                  throws JiBXException
+
+
Constructor. This initializes the new definition context. +

+

+
Parameters:
contain - containing binding definition structure
defc - definition context for this mapping
type - bound class name
name - mapped element name information (null if defined + by marshaller and unmarshaller)
tname - type name for abstract mapping (null if none)
abs - abstract mapping flag
base - abstract mapping extended by this one
bind - binding definition component +
Throws: +
JiBXException - if class definition not found
+
+ + + + + + + + +
+Method Detail
+ +

+hasNamespace

+
+boolean hasNamespace()
+
+
Check if one or more namespaces are defined for element. +

+

+ +
Returns:
true if namespaces are defined, false + if not
+
+
+
+ +

+genLoadNamespaces

+
+void genLoadNamespaces(MethodBuilder mb)
+
+
Generate code for loading namespace index and URI arrays. This default + implementation assumes no namespaces are present and does nothing. It + must be overridden by subclasses that support namespace declarations. +

+

+
Parameters:
mb - method builder for generated code
+
+
+
+ +

+getBoundClass

+
+public BoundClass getBoundClass()
+
+
Get the mapped class information. This implements the method used by the + base class. +

+

+
Specified by:
getBoundClass in class MappingBase
+
+
+ +
Returns:
information for mapped class
+
+
+
+ +

+linkMappings

+
+public void linkMappings()
+                  throws JiBXException
+
+
Links extension mappings to their base mappings. This must be done before + the more general linking step in order to determine which abstract + mappings are standalone and which are extended by other mappings +

+

+ +
Throws: +
JiBXException - if error in linking
+
+
+
+ +

+getBoundType

+
+public java.lang.String getBoundType()
+
+
Description copied from interface: IMapping
+
Get class name handled by mapping. +

+

+ +
Returns:
name of class bound by mapping
+
+
+
+ +

+getReferenceType

+
+public java.lang.String getReferenceType()
+
+
Description copied from interface: IMapping
+
Get class name of type to be assumed for references to this mapping. +

+

+ +
Returns:
reference type class name name
+
+
+
+ +

+getImplComponent

+
+public IComponent getImplComponent()
+
+
Description copied from interface: IMapping
+
Get binding component implementing mapping. This call is only valid for + mappings with child components, not for mappings defined using + marshallers or unmarshallers. +

+

+ +
Returns:
binding component implementing this mapping
+
+
+
+ +

+getMarshaller

+
+public ClassFile getMarshaller()
+
+
Description copied from interface: IMapping
+
Get marshaller class used for mapping. +

+

+ +
Returns:
marshaller class information
+
+
+
+ +

+getUnmarshaller

+
+public ClassFile getUnmarshaller()
+
+
Description copied from interface: IMapping
+
Get unmarshaller class used for mapping. +

+

+ +
Returns:
unmarshaller class information
+
+
+
+ +

+getName

+
+public NameDefinition getName()
+
+
Description copied from interface: IMapping
+
Get mapped element name. +

+

+ +
Returns:
mapped element name information (may be null if no + element name defined for mapping)
+
+
+
+ +

+getTypeName

+
+public java.lang.String getTypeName()
+
+
Description copied from interface: IMapping
+
Get type name. +

+

+ +
Returns:
type name (null if unnamed)
+
+
+
+ +

+addNamespace

+
+public void addNamespace(NamespaceDefinition ns)
+                  throws JiBXException
+
+
Description copied from interface: IMapping
+
Add namespace. This adds a namespace definition to those active for the + mapping. +

+

+
Parameters:
ns - namespace definition to be added +
Throws: +
JiBXException - if error in defining namespace
+
+
+
+ +

+isAbstract

+
+public boolean isAbstract()
+
+
Description copied from interface: IMapping
+
Check if mapping is abstract. +

+

+ +
Returns:
true if an abstract mapping, false if + not
+
+
+
+ +

+isBase

+
+public boolean isBase()
+
+
Description copied from interface: IMapping
+
Check if mapping has extensions. +

+

+ +
Returns:
true if one or more mappings extend this mapping, + false if not
+
+
+
+ +

+addExtension

+
+public void addExtension(MappingDefinition mdef)
+                  throws JiBXException
+
+
Description copied from interface: IMapping
+
Add extension to abstract mapping. This call is only valid for abstract + mappings. +

+

+
Parameters:
mdef - extension mapping definition +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+buildRef

+
+public IComponent buildRef(IContainer parent,
+                           IContextObj objc,
+                           java.lang.String type,
+                           PropertyDefinition prop)
+                    throws JiBXException
+
+
Description copied from interface: IMapping
+
Build reference to mapping. Constructs and returns the component for + handling the mapping. +

+

+
Parameters:
parent - containing binding definition structure
objc - current object context
type - mapped value type
prop - property definition (may be null) +
Returns:
constructed mapping reference component +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+generateCode

+
+public void generateCode(boolean force)
+                  throws JiBXException
+
+
Description copied from interface: IMapping
+
Generate required code for mapping. +

+

+
Parameters:
force - add marshaller/unmarshaller classes for abstract non-base + mappings flag (not passed on to children) +
Throws: +
JiBXException - if error in transformation
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class LinkableBase
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class LinkableBase
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/MappingDirect.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/MappingDirect.html @@ -0,0 +1,789 @@ + + + + + + +MappingDirect (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class MappingDirect

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.LinkableBase
+          extended by org.jibx.binding.def.MappingBase
+              extended by org.jibx.binding.def.MappingDirect
+
+
+
All Implemented Interfaces:
IComponent, IMapping
+
+
+
+
public class MappingDirect
extends MappingBase
+ + +

+Direct mapping using supplied marshaller and unmarshaller. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  BoundClassm_boundClass + +
+          Class file to use for added code.
+private  booleanm_isGenerated + +
+          Flag for code added to class (if appropriate).
+private  DirectObjectm_mappingImpl + +
+          Direct mapping implementation.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.MappingBase
ABSTRACTMARSHALLER_INTERFACE, CHECKEXTENDS_METHODNAME, CHECKEXTENDS_SIGNATURE, GETINDEX_METHODNAME, GETINDEX_SIGNATURE, GETMARSHALLER_METHOD, GETMARSHALLER_SIGNATURE, GETUNMARSHALLER_METHOD, GETUNMARSHALLER_SIGNATURE, IMARSHALLABLE_INTERFACE, IUNMARSHALLABLE_INTERFACE, MARSHALLABLE_METHODNAME, MARSHALLABLE_SIGNATURE, MARSHALLER_INTERFACE, MARSHALLERMARSHAL_METHOD, MARSHALLERMARSHAL_SIGNATURE, UNMARSHALLABLE_METHODNAME, UNMARSHALLABLE_SIGNATURE, UNMARSHALLER_INTERFACE, UNMARSHALLERUNMARSHAL_METHOD, UNMARSHALLERUNMARSHAL_SIGNATURE
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
MappingDirect(IContainer contain, + java.lang.String type, + DirectObject dir) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddExtension(MappingDefinition mdef) + +
+          Add extension to abstract mapping.
+ voidaddNamespace(NamespaceDefinition ns) + +
+          Add namespace.
+ IComponentbuildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + +
+          Build reference to mapping.
+ voidgenerateCode(boolean force) + +
+          Generate required code for mapping.
+ BoundClassgetBoundClass() + +
+          Get the mapped class information.
+ java.lang.StringgetBoundType() + +
+          Get class name handled by mapping.
+ IComponentgetImplComponent() + +
+          Get binding component implementing mapping.
+ ClassFilegetMarshaller() + +
+          Get marshaller class used for mapping.
+ NameDefinitiongetName() + +
+          Get mapped element name.
+ java.lang.StringgetReferenceType() + +
+          Get class name of type to be assumed for references to this mapping.
+ java.lang.StringgetTypeName() + +
+          Get type name.
+ ClassFilegetUnmarshaller() + +
+          Get unmarshaller class used for mapping.
+ booleanisAbstract() + +
+          Check if mapping is abstract.
+ booleanisBase() + +
+          Check if mapping has extensions.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.MappingBase
addIMarshallableMethod, addIUnmarshallableMethod, getIndex
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.LinkableBase
handleRecursion
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_mappingImpl

+
+private final DirectObject m_mappingImpl
+
+
Direct mapping implementation. +

+

+
+
+
+ +

+m_boundClass

+
+private final BoundClass m_boundClass
+
+
Class file to use for added code. +

+

+
+
+
+ +

+m_isGenerated

+
+private boolean m_isGenerated
+
+
Flag for code added to class (if appropriate). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MappingDirect

+
+public MappingDirect(IContainer contain,
+                     java.lang.String type,
+                     DirectObject dir)
+              throws JiBXException
+
+
Constructor. +

+

+
Parameters:
contain - containing binding definition structure
type - bound class name
dir - direct object information +
Throws: +
JiBXException - on mapping definition conflict
+
+ + + + + + + + +
+Method Detail
+ +

+getBoundClass

+
+public BoundClass getBoundClass()
+
+
Get the mapped class information. This implements the method used by the + base class. +

+

+
Specified by:
getBoundClass in class MappingBase
+
+
+ +
Returns:
information for mapped class
+
+
+
+ +

+getBoundType

+
+public java.lang.String getBoundType()
+
+
Description copied from interface: IMapping
+
Get class name handled by mapping. +

+

+ +
Returns:
name of class bound by mapping
+
+
+
+ +

+getReferenceType

+
+public java.lang.String getReferenceType()
+
+
Description copied from interface: IMapping
+
Get class name of type to be assumed for references to this mapping. +

+

+ +
Returns:
reference type class name name
+
+
+
+ +

+getImplComponent

+
+public IComponent getImplComponent()
+
+
Description copied from interface: IMapping
+
Get binding component implementing mapping. This call is only valid for + mappings with child components, not for mappings defined using + marshallers or unmarshallers. +

+

+ +
Returns:
binding component implementing this mapping
+
+
+
+ +

+getMarshaller

+
+public ClassFile getMarshaller()
+                        throws JiBXException
+
+
Description copied from interface: IMapping
+
Get marshaller class used for mapping. +

+

+ +
Returns:
marshaller class information +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getUnmarshaller

+
+public ClassFile getUnmarshaller()
+                          throws JiBXException
+
+
Description copied from interface: IMapping
+
Get unmarshaller class used for mapping. +

+

+ +
Returns:
unmarshaller class information +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getName

+
+public NameDefinition getName()
+
+
Description copied from interface: IMapping
+
Get mapped element name. +

+

+ +
Returns:
mapped element name information (may be null if no + element name defined for mapping)
+
+
+
+ +

+getTypeName

+
+public java.lang.String getTypeName()
+
+
Description copied from interface: IMapping
+
Get type name. +

+

+ +
Returns:
type name (null if unnamed)
+
+
+
+ +

+addNamespace

+
+public void addNamespace(NamespaceDefinition ns)
+
+
Description copied from interface: IMapping
+
Add namespace. This adds a namespace definition to those active for the + mapping. +

+

+
Parameters:
ns - namespace definition to be added
+
+
+
+ +

+isAbstract

+
+public boolean isAbstract()
+
+
Description copied from interface: IMapping
+
Check if mapping is abstract. +

+

+ +
Returns:
true if an abstract mapping, false if + not
+
+
+
+ +

+isBase

+
+public boolean isBase()
+
+
Description copied from interface: IMapping
+
Check if mapping has extensions. +

+

+ +
Returns:
true if one or more mappings extend this mapping, + false if not
+
+
+
+ +

+addExtension

+
+public void addExtension(MappingDefinition mdef)
+
+
Description copied from interface: IMapping
+
Add extension to abstract mapping. This call is only valid for abstract + mappings. +

+

+
Parameters:
mdef - extension mapping definition
+
+
+
+ +

+buildRef

+
+public IComponent buildRef(IContainer parent,
+                           IContextObj objc,
+                           java.lang.String type,
+                           PropertyDefinition prop)
+                    throws JiBXException
+
+
Description copied from interface: IMapping
+
Build reference to mapping. Constructs and returns the component for + handling the mapping. +

+

+
Parameters:
parent - containing binding definition structure
objc - current object context
type - mapped value type
prop - property definition (may be null) +
Returns:
constructed mapping reference component +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+generateCode

+
+public void generateCode(boolean force)
+                  throws JiBXException
+
+
Description copied from interface: IMapping
+
Generate required code for mapping. +

+

+
Parameters:
force - add marshaller/unmarshaller classes for abstract non-base + mappings flag (not passed on to children) +
Throws: +
JiBXException - if error in transformation
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class LinkableBase
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class LinkableBase
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NamespaceDefinition.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NamespaceDefinition.html @@ -0,0 +1,615 @@ + + + + + + +NamespaceDefinition (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NamespaceDefinition

+
+java.lang.Object
+  extended by org.jibx.binding.def.NamespaceDefinition
+
+
+
+
public class NamespaceDefinition
extends java.lang.Object
+ + +

+Namespace definition from binding. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+(package private) static intALLDEFAULT_USAGE + +
+           
+(package private) static intATTRIBUTES_USAGE + +
+           
+(package private) static intELEMENTS_USAGE + +
+           
+private  booleanm_attributeDefault + +
+          Use by default for nested attributes.
+private  booleanm_elementDefault + +
+          Use by default for nested elements.
+private  intm_index + +
+          Index in namespace table for binding.
+private  java.lang.Stringm_prefix + +
+          Namespace prefix (may be null, but not "").
+private  java.lang.Stringm_uri + +
+          Namespace URI.
+(package private) static intNODEFAULT_USAGE + +
+           
+  + + + + + + + + + + +
+Constructor Summary
NamespaceDefinition(java.lang.String uri, + java.lang.String prefix, + int usage) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static NamespaceDefinitionbuildNamespace(java.lang.String uri, + java.lang.String prefix) + +
+          Instance builder with supplied values.
+ intgetIndex() + +
+          Get namespace index.
+ java.lang.StringgetPrefix() + +
+          Get prefix for namespace.
+ java.lang.StringgetUri() + +
+          Get namespace URI.
+ booleanisAttributeDefault() + +
+          Check if default namespace for attributes.
+ booleanisElementDefault() + +
+          Check if default namespace for elements.
+ voidprint(int depth) + +
+           
+ voidsetIndex(int index) + +
+          Set namespace index.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+NODEFAULT_USAGE

+
+static final int NODEFAULT_USAGE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ELEMENTS_USAGE

+
+static final int ELEMENTS_USAGE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ATTRIBUTES_USAGE

+
+static final int ATTRIBUTES_USAGE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ALLDEFAULT_USAGE

+
+static final int ALLDEFAULT_USAGE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_uri

+
+private java.lang.String m_uri
+
+
Namespace URI. +

+

+
+
+
+ +

+m_prefix

+
+private java.lang.String m_prefix
+
+
Namespace prefix (may be null, but not ""). +

+

+
+
+
+ +

+m_index

+
+private int m_index
+
+
Index in namespace table for binding. +

+

+
+
+
+ +

+m_elementDefault

+
+private boolean m_elementDefault
+
+
Use by default for nested elements. +

+

+
+
+
+ +

+m_attributeDefault

+
+private boolean m_attributeDefault
+
+
Use by default for nested attributes. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NamespaceDefinition

+
+public NamespaceDefinition(java.lang.String uri,
+                           java.lang.String prefix,
+                           int usage)
+                    throws JiBXException
+
+
Constructor. +

+

+
Parameters:
uri - namespace URI
prefix - namespace prefix (may be null for default + namespace, but not "")
usage - code for default usage of namespace +
Throws: +
JiBXException - if configuration error
+
+ + + + + + + + +
+Method Detail
+ +

+isAttributeDefault

+
+public boolean isAttributeDefault()
+
+
Check if default namespace for attributes. +

+

+ +
Returns:
true if default namespace for attributes, + false if not
+
+
+
+ +

+isElementDefault

+
+public boolean isElementDefault()
+
+
Check if default namespace for elements. +

+

+ +
Returns:
true if default namespace for elements, + false if not
+
+
+
+ +

+getPrefix

+
+public java.lang.String getPrefix()
+
+
Get prefix for namespace. +

+

+ +
Returns:
namespace prefix (may be null, but not "")
+
+
+
+ +

+getUri

+
+public java.lang.String getUri()
+
+
Get namespace URI. +

+

+ +
Returns:
namespace URI
+
+
+
+ +

+setIndex

+
+public void setIndex(int index)
+
+
Set namespace index. +

+

+
Parameters:
index - namespace index
+
+
+
+ +

+getIndex

+
+public int getIndex()
+
+
Get namespace index. +

+

+ +
Returns:
namespace index
+
+
+
+ +

+buildNamespace

+
+public static NamespaceDefinition buildNamespace(java.lang.String uri,
+                                                 java.lang.String prefix)
+                                          throws JiBXException
+
+
Instance builder with supplied values. Used for canned definitions. +

+

+
Parameters:
uri - namespace URI
prefix - namespace prefix +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NameDefinition.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NameDefinition.html @@ -0,0 +1,497 @@ + + + + + + +NameDefinition (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NameDefinition

+
+java.lang.Object
+  extended by org.jibx.binding.def.NameDefinition
+
+
+
+
public class NameDefinition
extends java.lang.Object
+ + +

+Named value definition from binding. This is a component of all items + in the mapping corresponding to elements or attributes in the document. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_isAttribute + +
+          Flag for attribute name.
+private  java.lang.Stringm_name + +
+          Element or attribute name.
+private  java.lang.Stringm_namespace + +
+          Element or attribute namespace URI.
+private  intm_namespaceIndex + +
+          Namespace index used for marshalling (derived from nesting).
+  + + + + + + + + + + +
+Constructor Summary
NameDefinition(java.lang.String name, + java.lang.String ns, + boolean attr) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidfixNamespace(DefinitionContext defc) + +
+          Finds the index for the namespace used with a name.
+ voidgenPushIndexPair(MethodBuilder mb) + +
+          Generate code to push namespace index followed by name.
+ voidgenPushName(MethodBuilder mb) + +
+          Generate code to push name.
+ voidgenPushUri(MethodBuilder mb) + +
+          Generate code to push namespace URI.
+ voidgenPushUriPair(MethodBuilder mb) + +
+          Generate code to push namespace URI followed by name.
+ booleanisNullUri() + +
+          Check if namespace URI is null.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_name

+
+private final java.lang.String m_name
+
+
Element or attribute name. +

+

+
+
+
+ +

+m_namespace

+
+private java.lang.String m_namespace
+
+
Element or attribute namespace URI. +

+

+
+
+
+ +

+m_isAttribute

+
+private final boolean m_isAttribute
+
+
Flag for attribute name. +

+

+
+
+
+ +

+m_namespaceIndex

+
+private int m_namespaceIndex
+
+
Namespace index used for marshalling (derived from nesting). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NameDefinition

+
+public NameDefinition(java.lang.String name,
+                      java.lang.String ns,
+                      boolean attr)
+
+
Constructor. +

+

+
Parameters:
attr - flag for attribute name
+
+ + + + + + + + +
+Method Detail
+ +

+isNullUri

+
+public boolean isNullUri()
+
+
Check if namespace URI is null. +

+

+ +
Returns:
true if URI null, false if not
+
+
+
+ +

+genPushUri

+
+public void genPushUri(MethodBuilder mb)
+
+
Generate code to push namespace URI. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genPushName

+
+public void genPushName(MethodBuilder mb)
+
+
Generate code to push name. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genPushUriPair

+
+public void genPushUriPair(MethodBuilder mb)
+
+
Generate code to push namespace URI followed by name. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genPushIndexPair

+
+public void genPushIndexPair(MethodBuilder mb)
+
+
Generate code to push namespace index followed by name. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+fixNamespace

+
+public void fixNamespace(DefinitionContext defc)
+                  throws JiBXException
+
+
Finds the index for the namespace used with a name. If no explicit + namespace has been set it uses the appropriate default. This is a + separate operation from the unmarshalling in order to properly handle + namespace definitions as children of the named binding component. +

+

+
Parameters:
defc - definition context for namespaces +
Throws: +
JiBXException - if error in namespace handling
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.html @@ -0,0 +1,849 @@ + + + + + + +NestedCollection (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder.ContainerBase
+      extended by org.jibx.binding.def.NestedBase
+          extended by org.jibx.binding.def.NestedCollection
+
+
+
All Implemented Interfaces:
IComponent, IContainer
+
+
+
+
public class NestedCollection
extends NestedBase
+ + +

+Collection binding definition. This handles one or more child components, + which may be ordered or unordered. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Nested Class Summary
+(package private) static classNestedCollection.AddStore + +
+          Collection item store strategy for collection with add method.
+(package private) static classNestedCollection.ArrayLoad + +
+          Collection item load strategy for array.
+(package private) static classNestedCollection.ArrayStore + +
+          Collection item store strategy for array.
+(package private) static classNestedCollection.CollectionLoad + +
+          Base class for collection item load strategy.
+(package private) static classNestedCollection.CollectionStore + +
+          Base class for collection item store strategy.
+(package private) static classNestedCollection.IndexedLoad + +
+          Collection item load strategy for collection with items accessed by + index number.
+(package private) static classNestedCollection.IndexedStore + +
+          Collection item store strategy for collection with items set by + index number.
+(package private) static classNestedCollection.IteratorLoad + +
+          Collection item load strategy for collection with items accessed by + iterator or enumeration.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringGROWARRAY_METHOD + +
+           
+private static java.lang.StringGROWARRAY_SIGNATURE + +
+           
+private  java.lang.Stringm_itemType + +
+          Fully qualified class name of values from collection.
+private  NestedCollection.CollectionLoadm_loadStrategy + +
+          Strategy for generating code to load item from collection.
+private  NestedCollection.CollectionStorem_storeStrategy + +
+          Strategy for generating code to store item to collection.
+private static java.lang.StringRESIZEARRAY_METHOD + +
+           
+private static java.lang.StringRESIZEARRAY_SIGNATURE + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.NestedBase
m_attributes, m_contents, m_isOrdered
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection(IContainer parent, + IContextObj objc, + boolean ord, + java.lang.String type, + NestedCollection.CollectionLoad load, + NestedCollection.CollectionStore store) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.NestedBase
addComponent, genContentPresentTest, genNewInstance, getAttributes, getBindingRoot, getContents, getDefinitionContext, getType, hasNamespaces, isContentOrdered, isOptional
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
getStyleDefault, unmarshal
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IContainer
getStyleDefault
+  +

+ + + + + + + + +
+Field Detail
+ +

+GROWARRAY_METHOD

+
+private static final java.lang.String GROWARRAY_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GROWARRAY_SIGNATURE

+
+private static final java.lang.String GROWARRAY_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+RESIZEARRAY_METHOD

+
+private static final java.lang.String RESIZEARRAY_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+RESIZEARRAY_SIGNATURE

+
+private static final java.lang.String RESIZEARRAY_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_itemType

+
+private final java.lang.String m_itemType
+
+
Fully qualified class name of values from collection. +

+

+
+
+
+ +

+m_loadStrategy

+
+private final NestedCollection.CollectionLoad m_loadStrategy
+
+
Strategy for generating code to load item from collection. +

+

+
+
+
+ +

+m_storeStrategy

+
+private final NestedCollection.CollectionStore m_storeStrategy
+
+
Strategy for generating code to store item to collection. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection

+
+public NestedCollection(IContainer parent,
+                        IContextObj objc,
+                        boolean ord,
+                        java.lang.String type,
+                        NestedCollection.CollectionLoad load,
+                        NestedCollection.CollectionStore store)
+
+
Constructor. +

+

+
Parameters:
parent - containing binding definition context
objc - current object context
ord - ordered content flag
type - fully qualified class name of values from collection (may be + null, if child content present)
load - collection load code generation strategy
store - collection store code generation strategy
+
+ + + + + + + + +
+Method Detail
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
Overrides:
hasContent in class NestedBase
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/PrimitiveStringConversion.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/PrimitiveStringConversion.html @@ -0,0 +1,936 @@ + + + + + + +PrimitiveStringConversion (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class PrimitiveStringConversion

+
+java.lang.Object
+  extended by org.jibx.binding.def.StringConversion
+      extended by org.jibx.binding.def.PrimitiveStringConversion
+
+
+
+
public class PrimitiveStringConversion
extends StringConversion
+ + +

+Primitive string conversion handling. Class for handling serialization + converting a primitive type to and from String values. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static intDOUBLE_TYPE + +
+           
+private static intFLOAT_TYPE + +
+           
+private static intINT_TYPE + +
+           
+private static intLONG_TYPE + +
+           
+private  booleanm_isMarshalText + +
+          Marshalling requires conversion to text flag.
+private  booleanm_isUnmarshalText + +
+          Unmarshalling requires conversion to text flag.
+private  java.lang.Stringm_stackType + +
+          Name of value type on stack.
+private  ClassItemm_unmarshalOptAttribute + +
+          Unmarshalling context method for optional attribute.
+private  ClassItemm_unmarshalOptElement + +
+          Unmarshalling context method for optional element.
+private  ClassItemm_unmarshalReqAttribute + +
+          Unmarshalling context method for required attribute.
+private  ClassItemm_unmarshalReqElement + +
+          Unmarshalling context method for required element.
+private  intm_valueType + +
+          Comparison and marshal type of value (INT_TYPE, LONG_TYPE, FLOAT_TYPE, + or DOUBLE_TYPE)
+private static ClassFiles_unmarshalClass + +
+           
+private static java.lang.Class[]SINGLE_STRING_ARGS + +
+          Constant argument type array for finding conversion methods.
+private static java.lang.StringUNMARSHAL_SIG_LEAD + +
+          Unmarshal method signature leading portion.
+private static java.lang.StringUTILITY_CLASS_NAME + +
+          Class providing basic conversion methods.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.StringConversion
COMPARE_OBJECTS_METHOD, COMPARE_OBJECTS_SIGNATURE, DESERIALIZER_SIGNATURES, m_default, m_deserializer, m_formatName, m_serializer, m_typeName, m_typeSignature, MARSHAL_ATTRIBUTE, MARSHAL_ELEMENT, MARSHAL_NAME_VALUES, MARSHAL_SIGNATURE, UNMARSHAL_OPT_ATTRIBUTE, UNMARSHAL_OPT_ELEMENT, UNMARSHAL_OPT_SIGNATURE, UNMARSHAL_REQ_ATTRIBUTE, UNMARSHAL_REQ_ELEMENT, UNMARSHAL_REQ_SIGNATURE
+  + + + + + + + + + + + + + + + +
+Constructor Summary
+ PrimitiveStringConversion(java.lang.Class cls, + java.lang.Object dflt, + java.lang.String code, + java.lang.String ts, + java.lang.String fs, + java.lang.String uattr, + java.lang.String uelem) + +
+          Constructor.
+protected PrimitiveStringConversion(java.lang.String type, + PrimitiveStringConversion inherit) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  java.lang.ObjectconvertDefault(java.lang.String text) + +
+          Convert text representation into default value object.
+ StringConversionderive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + +
+          Derive from existing formatting information.
+ voidgenFromText(ContextMethodBuilder mb) + +
+          Generate code to convert String representation.
+ voidgenParseOptional(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert optional attribute or element.
+ voidgenParseRequired(boolean attr, + ContextMethodBuilder mb) + +
+          Generate code to parse and convert required attribute or element.
+protected  BranchWrappergenToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + +
+          Generate code to check if an optional value is not equal to the default.
+ booleanisPrimitive() + +
+          Check if the type handled by this conversion is of a primitive type.
+protected  voidpushDefault(ContextMethodBuilder mb) + +
+          Push default value on stack.
+protected  voidsetDeserializer(java.lang.String deser) + +
+          Set deserializer for conversion.
+protected  voidsetSerializer(java.lang.String ser) + +
+          Set serializer for conversion.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.StringConversion
genPopValues, genToText, genWriteOptional, genWriteRequired, genWriteText, getTypeName
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_unmarshalClass

+
+private static ClassFile s_unmarshalClass
+
+
+
+
+
+ +

+INT_TYPE

+
+private static final int INT_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+LONG_TYPE

+
+private static final int LONG_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+FLOAT_TYPE

+
+private static final int FLOAT_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DOUBLE_TYPE

+
+private static final int DOUBLE_TYPE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UTILITY_CLASS_NAME

+
+private static final java.lang.String UTILITY_CLASS_NAME
+
+
Class providing basic conversion methods. +

+

+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_SIG_LEAD

+
+private static final java.lang.String UNMARSHAL_SIG_LEAD
+
+
Unmarshal method signature leading portion. +

+

+
See Also:
Constant Field Values
+
+
+ +

+SINGLE_STRING_ARGS

+
+private static final java.lang.Class[] SINGLE_STRING_ARGS
+
+
Constant argument type array for finding conversion methods. +

+

+
+
+
+ +

+m_isMarshalText

+
+private boolean m_isMarshalText
+
+
Marshalling requires conversion to text flag. +

+

+
+
+
+ +

+m_isUnmarshalText

+
+private boolean m_isUnmarshalText
+
+
Unmarshalling requires conversion to text flag. +

+

+
+
+
+ +

+m_unmarshalOptAttribute

+
+private ClassItem m_unmarshalOptAttribute
+
+
Unmarshalling context method for optional attribute. +

+

+
+
+
+ +

+m_unmarshalOptElement

+
+private ClassItem m_unmarshalOptElement
+
+
Unmarshalling context method for optional element. +

+

+
+
+
+ +

+m_unmarshalReqAttribute

+
+private ClassItem m_unmarshalReqAttribute
+
+
Unmarshalling context method for required attribute. +

+

+
+
+
+ +

+m_unmarshalReqElement

+
+private ClassItem m_unmarshalReqElement
+
+
Unmarshalling context method for required element. +

+

+
+
+
+ +

+m_valueType

+
+private int m_valueType
+
+
Comparison and marshal type of value (INT_TYPE, LONG_TYPE, FLOAT_TYPE, + or DOUBLE_TYPE) +

+

+
+
+
+ +

+m_stackType

+
+private java.lang.String m_stackType
+
+
Name of value type on stack. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+PrimitiveStringConversion

+
+protected PrimitiveStringConversion(java.lang.String type,
+                                    PrimitiveStringConversion inherit)
+
+
Constructor. Initializes conversion handling based on the supplied + inherited handling. +

+

+
Parameters:
type - name of primitive type handled by conversion
inherit - conversion information inherited by this conversion
+
+
+ +

+PrimitiveStringConversion

+
+public PrimitiveStringConversion(java.lang.Class cls,
+                                 java.lang.Object dflt,
+                                 java.lang.String code,
+                                 java.lang.String ts,
+                                 java.lang.String fs,
+                                 java.lang.String uattr,
+                                 java.lang.String uelem)
+
+
Constructor. Initializes conversion handling based on argument values. + This form is only used for constructing the default set of conversions. +

+

+
Parameters:
cls - class of primitive type handled by conversion
dflt - default value object (wrapped value, or String + or null with special deserializer)
ts - name of utility class static method for converting value to + String
fs - name of utility class static method for converting + String to value
uattr - unmarshalling context method name for attribute value
uelem - unmarshalling context method name for element value
+
+ + + + + + + + +
+Method Detail
+ +

+genFromText

+
+public void genFromText(ContextMethodBuilder mb)
+
+
Generate code to convert String representation. The + code generated by this method assumes that the String + value has already been pushed on the stack. It consumes this and + leaves the converted value on the stack. +

+

+
Specified by:
genFromText in class StringConversion
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+pushDefault

+
+protected void pushDefault(ContextMethodBuilder mb)
+
+
Push default value on stack. Just adds the appropriate instruction to + the list for the method. +

+

+
Parameters:
mb - method builder
+
+
+
+ +

+genParseOptional

+
+public void genParseOptional(boolean attr,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to parse and convert optional attribute or element. The + code generated by this method assumes that the unmarshalling context + and name information for the attribute or element have already + been pushed on the stack. It consumes these and leaves the converted + value (or default value, if the item itself is missing) on the stack. +

+

+
Specified by:
genParseOptional in class StringConversion
+
+
+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genParseRequired

+
+public void genParseRequired(boolean attr,
+                             ContextMethodBuilder mb)
+                      throws JiBXException
+
+
Generate code to parse and convert required attribute or element. The + code generated by this method assumes that the unmarshalling context and + name information for the attribute or element have already been pushed + on the stack. It consumes these and leaves the converted value on the + stack. +

+

+
Specified by:
genParseRequired in class StringConversion
+
+
+
Parameters:
attr - item is an attribute (vs element) flag
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genToOptionalText

+
+protected BranchWrapper genToOptionalText(java.lang.String type,
+                                          ContextMethodBuilder mb,
+                                          int extra)
+                                   throws JiBXException
+
+
Generate code to check if an optional value is not equal to the default. + The code generated by this method assumes that the actual value to be + converted has already been pushed on the stack. It consumes this, + leaving the converted text reference on the stack if it's not equal to + the default value. +

+

+
Specified by:
genToOptionalText in class StringConversion
+
+
+
Parameters:
type - fully qualified class name for value on stack
mb - method builder
extra - count of extra values to be popped from stack if missing +
Returns:
handle for branch taken when value is equal to the default + (target must be set by caller) +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+convertDefault

+
+protected java.lang.Object convertDefault(java.lang.String text)
+                                   throws JiBXException
+
+
Convert text representation into default value object. This override of + the base class method uses reflection to call the actual deserialization + method, returning the wrapped result value. If a custom deserializer is + defined this just returns the String value directly. +

+

+
Specified by:
convertDefault in class StringConversion
+
+
+
Parameters:
text - value representation to be converted +
Returns:
converted default value object +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+isPrimitive

+
+public boolean isPrimitive()
+
+
Check if the type handled by this conversion is of a primitive type. +

+

+
Specified by:
isPrimitive in class StringConversion
+
+
+ +
Returns:
true to indicate primitive type
+
+
+
+ +

+setSerializer

+
+protected void setSerializer(java.lang.String ser)
+                      throws JiBXException
+
+
Set serializer for conversion. This override of the base class method + sets a flag to indicate that values must be converted to text before + they are written to a document after executing the base class processing. +

+

+
Overrides:
setSerializer in class StringConversion
+
+
+
Parameters:
ser - fully qualified class and method name of serializer +
Throws: +
JiBXException - if serializer not found or not usable
+
+
+
+ +

+setDeserializer

+
+protected void setDeserializer(java.lang.String deser)
+                        throws JiBXException
+
+
Set deserializer for conversion. This override of the base class method + sets a flag to indicate that values must be read from a document as text + and converted as a separate step after executing the base class + processing. +

+

+
Overrides:
setDeserializer in class StringConversion
+
+
+
Parameters:
deser - fully qualified class and method name of deserializer +
Throws: +
JiBXException - if deserializer not found or not usable
+
+
+
+ +

+derive

+
+public StringConversion derive(java.lang.String type,
+                               java.lang.String ser,
+                               java.lang.String dser,
+                               java.lang.String dflt)
+                        throws JiBXException
+
+
Derive from existing formatting information. This allows constructing + a new instance from an existing format of the same or an ancestor + type, with the properties of the existing format copied to the new + instance except where overridden by the supplied values. +

+

+
Specified by:
derive in class StringConversion
+
+
+
Parameters:
type - fully qualified name of class handled by conversion
ser - fully qualified name of serialization method + (null if inherited)
dser - fully qualified name of deserialization method + (null if inherited)
dflt - default value text (null if inherited) +
Returns:
new instance initialized from existing one +
Throws: +
JiBXException - if error in configuration information
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedBase.html @@ -0,0 +1,748 @@ + + + + + + +NestedBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedBase

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder.ContainerBase
+      extended by org.jibx.binding.def.NestedBase
+
+
+
All Implemented Interfaces:
IComponent, IContainer
+
+
+
Direct Known Subclasses:
NestedCollection, NestedStructure
+
+
+
+
public abstract class NestedBase
extends BindingBuilder.ContainerBase
implements IComponent, IContainer
+ + +

+Base class for structure and collection binding definitions. This handles one + or more child components, which may be ordered or unordered. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected  java.util.ArrayListm_attributes + +
+          Included attribute definitions (lazy create, only if needed).
+protected  java.util.ArrayListm_contents + +
+          Nested content definitions (initially used for all child components).
+private  IContextObjm_contextObject + +
+          Context object for this definition.
+private  DefinitionContextm_defContext + +
+          Definition context for container (may be same as parent).
+private  booleanm_hasContext + +
+          Flag for context defined at level.
+protected  booleanm_isOrdered + +
+          Flag for ordered child content (used by subclasses).
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault
+  + + + + + + + + + + +
+Constructor Summary
NestedBase(IContainer contain, + IContextObj objc, + boolean ord, + boolean defc) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddComponent(IComponent comp) + +
+          Add child component to nested structure.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ java.util.ArrayListgetAttributes() + +
+          Get the attribute children of this mapping.
+ BindingDefinitiongetBindingRoot() + +
+          Get root of binding definition.
+ java.util.ArrayListgetContents() + +
+          Get the content children of this mapping.
+ DefinitionContextgetDefinitionContext() + +
+          Get definition context for binding element.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasNamespaces() + +
+           
+ booleanisContentOrdered() + +
+          Check if content children are ordered.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
getStyleDefault, unmarshal
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentUnmarshal, genLoadId, hasAttribute, hasId, print, setLinkages
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IContainer
getStyleDefault
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_contextObject

+
+private final IContextObj m_contextObject
+
+
Context object for this definition. +

+

+
+
+
+ +

+m_hasContext

+
+private final boolean m_hasContext
+
+
Flag for context defined at level. +

+

+
+
+
+ +

+m_isOrdered

+
+protected final boolean m_isOrdered
+
+
Flag for ordered child content (used by subclasses). +

+

+
+
+
+ +

+m_defContext

+
+private final DefinitionContext m_defContext
+
+
Definition context for container (may be same as parent). +

+

+
+
+
+ +

+m_attributes

+
+protected java.util.ArrayList m_attributes
+
+
Included attribute definitions (lazy create, only if needed). +

+

+
+
+
+ +

+m_contents

+
+protected java.util.ArrayList m_contents
+
+
Nested content definitions (initially used for all child components). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedBase

+
+public NestedBase(IContainer contain,
+                  IContextObj objc,
+                  boolean ord,
+                  boolean defc)
+
+
Constructor. +

+

+
Parameters:
contain - containing binding definition context
objc - current object context
ord - ordered content flag
defc - define context for structure flag
+
+ + + + + + + + +
+Method Detail
+ +

+getAttributes

+
+public java.util.ArrayList getAttributes()
+
+
Get the attribute children of this mapping. +

+

+
+
+
+ +
Returns:
list of attribute children (null if none; should not + be modified)
+
+
+
+ +

+getContents

+
+public java.util.ArrayList getContents()
+
+
Get the content children of this mapping. +

+

+
+
+
+ +
Returns:
list of content children (should not be modified)
+
+
+
+ +

+addComponent

+
+public void addComponent(IComponent comp)
+
+
Add child component to nested structure. All components are initially + assumed to contain content. When IComponent.setLinkages() is called the + components are checked to determine whether they actually supply + attribute(s), content, or both. +

+

+
+
+
+
Parameters:
comp - child component to be added to structure
+
+
+
+ +

+isContentOrdered

+
+public boolean isContentOrdered()
+
+
Description copied from interface: IContainer
+
Check if content children are ordered. +

+

+
Specified by:
isContentOrdered in interface IContainer
+
+
+ +
Returns:
true if ordered, false if not
+
+
+
+ +

+hasNamespaces

+
+public boolean hasNamespaces()
+
+
+
+
+
+
+
+
+
+ +

+getBindingRoot

+
+public BindingDefinition getBindingRoot()
+
+
Description copied from interface: IContainer
+
Get root of binding definition. +

+

+
Specified by:
getBindingRoot in interface IContainer
+
+
+ +
Returns:
binding definition root
+
+
+
+ +

+getDefinitionContext

+
+public DefinitionContext getDefinitionContext()
+
+
Description copied from interface: IContainer
+
Get definition context for binding element. +

+

+
Specified by:
getDefinitionContext in interface IContainer
+
+
+ +
Returns:
binding definition context
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/BindingBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/BindingBuilder.html @@ -0,0 +1,2808 @@ + + + + + + +BindingBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class BindingBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder
+
+
+
+
public abstract class BindingBuilder
extends java.lang.Object
+ + +

+Binding definition constants. This gives the definitions for names and + namespaces used by the binding definition file. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+(package private) static classBindingBuilder.ContainerBase + +
+          Base class for containers.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+(package private) static intACC_PACKAGE + +
+           
+(package private) static intACC_PRIVATE + +
+           
+(package private) static intACC_PROTECTED + +
+           
+(package private) static intACC_PUBLIC + +
+           
+private static java.lang.String[]ACCESS_LEVEL_NAMES + +
+           
+private static int[]ACCESS_LEVEL_NUMS + +
+           
+private static java.lang.String[]AUTO_LINK_NAMES + +
+           
+private static int[]AUTO_LINK_NUMS + +
+           
+private static java.lang.StringBINDING_DIRECTION + +
+           
+private static java.lang.StringBINDING_ELEMENT + +
+          Definitions for "binding" element use "BINDING" prefix.
+private static java.lang.StringBINDING_FORCE + +
+           
+private static java.lang.StringBINDING_FORWARDS + +
+           
+private static java.lang.StringBINDING_GLOBALID + +
+           
+private static java.lang.StringBINDING_NAME + +
+           
+private static java.lang.StringBINDING_PACKAGE + +
+           
+private static java.lang.StringBINDING_TRACKING + +
+           
+private static java.lang.String[]BINDINGDIR_NAMES + +
+           
+private static int[]BINDINGDIR_NUMS + +
+           
+private static java.lang.StringCOLLECTION_ADDMETHOD + +
+           
+private static java.lang.StringCOLLECTION_ELEMENT + +
+          Definitions for "collection" element use "COLLECTION" prefix.
+private static java.lang.StringCOLLECTION_ITEMTYPE + +
+           
+private static java.lang.StringCOLLECTION_ITERMETHOD + +
+           
+private static java.lang.StringCOLLECTION_LOADMETHOD + +
+           
+private static java.lang.StringCOLLECTION_SIZEMETHOD + +
+           
+private static java.lang.StringCOLLECTION_STOREMETHOD + +
+           
+private static java.lang.StringCOMMON_ACCESSLEVEL + +
+           
+private static java.lang.StringCOMMON_AUTOLINK + +
+           
+private static java.lang.StringCOMMON_CHOICE + +
+           
+private static java.lang.StringCOMMON_DEFAULT + +
+           
+private static java.lang.StringCOMMON_DESERIALIZER + +
+           
+private static java.lang.StringCOMMON_FACTORY + +
+           
+private static java.lang.StringCOMMON_FIELD + +
+           
+private static java.lang.StringCOMMON_GETMETHOD + +
+           
+private static java.lang.StringCOMMON_LABEL + +
+           
+private static java.lang.StringCOMMON_MARSHALLER + +
+           
+private static java.lang.StringCOMMON_NAME + +
+           
+private static java.lang.StringCOMMON_NAMESPACE + +
+           
+private static java.lang.StringCOMMON_NAMESTYLE + +
+           
+private static java.lang.StringCOMMON_ORDERED + +
+           
+private static java.lang.StringCOMMON_POSTSET + +
+           
+private static java.lang.StringCOMMON_PREGET + +
+           
+private static java.lang.StringCOMMON_PRESET + +
+           
+private static java.lang.StringCOMMON_SERIALIZER + +
+           
+private static java.lang.StringCOMMON_SETMETHOD + +
+           
+private static java.lang.StringCOMMON_STRIPPREFIX + +
+           
+private static java.lang.StringCOMMON_STRIPSUFFIX + +
+           
+private static java.lang.StringCOMMON_STYLE + +
+           
+private static java.lang.StringCOMMON_TESTMETHOD + +
+           
+private static java.lang.StringCOMMON_TYPE + +
+           
+private static java.lang.StringCOMMON_UNMARSHALLER + +
+           
+private static java.lang.StringCOMMON_USAGE + +
+           
+private static java.lang.StringCOMMON_USING + +
+           
+private static java.lang.String[]COMPONENT_OBJECT_NAMES + +
+           
+private static java.lang.String[]COMPONENT_OBJECT_NAMESPACES + +
+           
+private static java.lang.String[]CONTAINING_STYLE_NAMES + +
+           
+private static int[]CONTAINING_STYLE_NUMS + +
+           
+private static intDIRECTION_BOTH + +
+           
+private static intDIRECTION_INPUT + +
+           
+private static intDIRECTION_OUTPUT + +
+           
+private static java.lang.StringFORMAT_ELEMENT + +
+          Definitions for "format" element use "FORMAT" prefix.
+private static java.lang.StringFORMAT_NAME + +
+           
+private static java.lang.StringFORMAT_TYPE + +
+           
+private static java.lang.String[]IDENTTYPE_NAMES + +
+           
+private static int[]IDENTTYPE_NUMS + +
+           
+private static java.lang.StringINCLUDE_ELEMENT + +
+          Definitions for "include" element use "INCLUDE" prefix.
+private static java.lang.StringINCLUDE_PATH + +
+           
+(package private) static intLINK_FIELDS + +
+           
+(package private) static intLINK_METHODS + +
+           
+(package private) static intLINK_NONE + +
+           
+private static java.lang.StringMAPPING_ABSTRACT + +
+           
+private static java.lang.StringMAPPING_CLASS + +
+           
+private static java.lang.StringMAPPING_ELEMENT + +
+          Definitions for "mapping" element use "MAPPING" prefix.
+private static java.lang.StringMAPPING_EXTENDS + +
+           
+private static java.lang.StringMAPPING_TYPENAME + +
+           
+private static java.lang.StringMARSHALLER_INTERFACE + +
+           
+private static java.lang.StringMARSHALLER_INTERFACETYPE + +
+           
+private static java.lang.String[]NAME_GENERATE_NAMES + +
+           
+private static int[]NAME_GENERATE_NUMS + +
+           
+(package private) static intNAME_HYPHENS + +
+           
+(package private) static intNAME_MIXED + +
+           
+private static java.lang.StringNAMESPACE_DEFAULT + +
+           
+private static java.lang.StringNAMESPACE_ELEMENT + +
+          Definitions for "namespace" element use "NAMESPACE" prefix.
+private static java.lang.StringNAMESPACE_PREFIX + +
+           
+private static java.lang.StringNAMESPACE_URI + +
+           
+private static java.lang.String[]NAMESPACEACCESS_NAMES + +
+           
+private static int[]NAMESPACEACCESS_NUMS + +
+           
+private static java.lang.StringSTRUCTURE_ELEMENT + +
+          Definitions for "structure" element use "STRUCTURE" prefix.
+private static java.lang.StringSTRUCTURE_MAPAS + +
+           
+private static java.lang.StringUNMARSHALLER_INTERFACE + +
+           
+private static java.lang.StringUNMARSHALLER_INTERFACETYPE + +
+           
+private static java.lang.StringURI_ATTRIBUTES + +
+          Attribute namespace used for binding definition file.
+private static java.lang.StringURI_ELEMENTS + +
+          Element namespace used for binding definition file.
+private static java.lang.StringUSAGE_OPTIONAL + +
+           
+private static java.lang.StringUSAGE_REQUIRED + +
+           
+private static java.lang.StringVALUE_CONSTANT + +
+           
+private static java.lang.StringVALUE_ELEMENT + +
+          Definitions for "value" element use "VALUE" prefix.
+private static java.lang.StringVALUE_FORMAT + +
+           
+private static java.lang.StringVALUE_IDENT + +
+           
+private static java.lang.StringVALUE_STYLE + +
+           
+private static java.lang.String[]VALUE_STYLE_NAMES + +
+           
+private static int[]VALUE_STYLE_NUMS + +
+           
+  + + + + + + + + + + +
+Constructor Summary
BindingBuilder() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+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.
+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, + int slot, + NameDefinition name) + +
+          Unmarshal direct object component.
+private static voidunmarshalFormats(UnmarshallingContext ctx, + DefinitionContext defc) + +
+          Unmarshal format definitions.
+static voidunmarshalInclude(UnmarshallingContext ctx, + BindingDefinition bdef, + java.net.URL root, + java.util.ArrayList nss, + java.util.HashSet paths) + +
+          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 PropertyDefinitionunmarshalProperty(UnmarshallingContext ctx, + IContainer parent, + IContextObj cobj, + boolean opt) + +
+          Unmarshal property definition.
+private static StringConversionunmarshalStringConversion(UnmarshallingContext ctx, + 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.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+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_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_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_DESERIALIZER

+
+private static final java.lang.String COMMON_DESERIALIZER
+
+
+
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
+
+
+ +

+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
+
+
+ +

+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
+
+
+ +

+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
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingBuilder

+
+public BindingBuilder()
+
+
+ + + + + + + + +
+Method Detail
+ +

+isNamePresent

+
+private static boolean isNamePresent(UnmarshallingContext ctx)
+
+
Check if attributes supply a name definition. +

+

+
Parameters:
ctx - unmarshalling context information +
Returns:
true if attributes define a name, + false if 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:
true if attributes define a mapping reference, + false if 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 information
attr - 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
+
+
+
+ +

+unmarshalStringConversion

+
+private static StringConversion unmarshalStringConversion(UnmarshallingContext ctx,
+                                                          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 information
base - conversion used as base for this conversion
type - 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:
true if attribute present with value "true", + false otherwise +
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 information
parent - containing binding definition structure
cobj - context object information
opt - 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 information
parent - containing binding definition structure
cobj - context object information
uord - unordered collection member flag
impl - implicit value from collection flag
itype - 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,
+                                               int slot,
+                                               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 information
type - fully qualified class name of object type handled
parent - containing binding definition structure
defc - definition context to be used (if separate from parent, + otherwise null)
slot - marshaller/unmarshaller slot number
name - element name information (null if 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 information
parent - containing binding definition structure
objc - current object context
prop - property definition
name - 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 information
contain - containing binding component
name - element name information (null if no element + name)
prop - property definition (null if 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 information
nest - nested structure definition
objc - context object definition
impl - property value implicit flag
itype - 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 information
parent - containing binding definition structure
objc - current object context
type - 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 information
defc - definition context for defined namespaces +
Throws: +
JiBXException - if error in unmarshalling
+
+
+
+ +

+unmarshalFormats

+
+private static void unmarshalFormats(UnmarshallingContext ctx,
+                                     DefinitionContext defc)
+                              throws JiBXException
+
+
Unmarshal format definitions. Any format definitions present are + unmarshalled and added to the supplied definition context. +

+

+
Parameters:
ctx - unmarshalling context information
defc - 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 information
parent - containing binding definition structure
nss - extra namespaces to be included in this mapping definition + (may be null)
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 information
contain - containing binding definition structure
cobj - context object information
coll - collection structure flag
uord - container is unordered structure flag
implic - 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 information
parent - containing binding definition structure
nss - extra namespaces to be included in this mapping definition + (may be null)
uord - container is unordered structure flag +
Returns:
mapping definition constructed from binding +
Throws: +
JiBXException - if error in unmarshalling
+
+
+
+ +

+unmarshalInclude

+
+public static void unmarshalInclude(UnmarshallingContext ctx,
+                                    BindingDefinition bdef,
+                                    java.net.URL root,
+                                    java.util.ArrayList nss,
+                                    java.util.HashSet paths)
+                             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 information
bdef - binding defintion at root of includes
root - base URL for binding, or null if unknown
nss - list of namespaces defined
paths - set of binding paths processed +
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 information
name - default name for binding
root - base URL for binding, or null if unknown +
Throws: +
JiBXException - if error in unmarshalling
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/PropertyDefinition.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/PropertyDefinition.html @@ -0,0 +1,854 @@ + + + + + + +PropertyDefinition (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class PropertyDefinition

+
+java.lang.Object
+  extended by org.jibx.binding.def.PropertyDefinition
+
+
+
+
public class PropertyDefinition
extends java.lang.Object
+ + +

+Property definition from binding. This organizes shared information for + bindings linked to fields or get/set methods of an object, and provides + methods for related code generation. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  ClassItemm_fieldItem + +
+          Information for field (if given, may be null).
+private  ClassItemm_getMethod + +
+          Information for get method (if given, may be null).
+private  java.lang.Stringm_getValueType + +
+          Fully qualified name of declared type of value loaded.
+private  booleanm_isImplicit + +
+          Reference to implicit value from collection.
+private  booleanm_isOptional + +
+          Optional item flag.
+private  booleanm_isThis + +
+          Reference to "this" property of object flag.
+private  IContextObjm_objContext + +
+          Containing object context.
+private  ClassItemm_setMethod + +
+          Information for set method (if given, may be null).
+private  java.lang.Stringm_setValueType + +
+          Fully qualified name of declared type of value stored.
+private  ClassItemm_testMethod + +
+          Information for test method (if given, may be null).
+private  java.lang.Stringm_typeName + +
+          Fully qualified name of actual type of value.
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
PropertyDefinition(IContainer parent, + IContextObj obj, + java.lang.String type, + boolean isthis, + boolean opt, + java.lang.String fname, + java.lang.String test, + java.lang.String get, + java.lang.String set) + +
+          Constructor.
PropertyDefinition(IContextObj obj, + boolean opt) + +
+          Constructor for "this" object reference.
PropertyDefinition(java.lang.String type, + IContextObj obj, + boolean opt) + +
+          Constructor for implicit object reference.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenLoad(MethodBuilder mb) + +
+          Generate code to load property value to stack.
+ voidgenStore(MethodBuilder mb) + +
+          Generate code to store property value from stack.
+ BranchWrappergenTest(ContextMethodBuilder mb) + +
+          Generate code to test if property is present.
+ java.lang.StringgetGetValueType() + +
+          Get value type as fully qualified name for loaded property value.
+ java.lang.StringgetName() + +
+          Get property name.
+ java.lang.StringgetSetValueType() + +
+          Get value type as fully qualified name for stored property value.
+ java.lang.StringgetTypeName() + +
+          Get declared type fully qualified name.
+ booleanhasTest() + +
+          Check if property has presence test.
+ booleanisImplicit() + +
+          Check if property is implicit value from collection.
+ booleanisOptional() + +
+          Check if property is optional.
+ booleanisThis() + +
+          Check if property is "this" reference for object.
+ voidsetOptional(boolean opt) + +
+          Set flag for an optional property.
+ java.lang.StringtoString() + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_isThis

+
+private final boolean m_isThis
+
+
Reference to "this" property of object flag. +

+

+
+
+
+ +

+m_isImplicit

+
+private final boolean m_isImplicit
+
+
Reference to implicit value from collection. +

+

+
+
+
+ +

+m_isOptional

+
+private boolean m_isOptional
+
+
Optional item flag. +

+

+
+
+
+ +

+m_objContext

+
+private final IContextObj m_objContext
+
+
Containing object context. +

+

+
+
+
+ +

+m_typeName

+
+private final java.lang.String m_typeName
+
+
Fully qualified name of actual type of value. +

+

+
+
+
+ +

+m_getValueType

+
+private final java.lang.String m_getValueType
+
+
Fully qualified name of declared type of value loaded. +

+

+
+
+
+ +

+m_setValueType

+
+private final java.lang.String m_setValueType
+
+
Fully qualified name of declared type of value stored. +

+

+
+
+
+ +

+m_fieldItem

+
+private final ClassItem m_fieldItem
+
+
Information for field (if given, may be null). +

+

+
+
+
+ +

+m_testMethod

+
+private final ClassItem m_testMethod
+
+
Information for test method (if given, may be null). +

+

+
+
+
+ +

+m_getMethod

+
+private final ClassItem m_getMethod
+
+
Information for get method (if given, may be null). +

+

+
+
+
+ +

+m_setMethod

+
+private final ClassItem m_setMethod
+
+
Information for set method (if given, may be null). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+PropertyDefinition

+
+public PropertyDefinition(IContainer parent,
+                          IContextObj obj,
+                          java.lang.String type,
+                          boolean isthis,
+                          boolean opt,
+                          java.lang.String fname,
+                          java.lang.String test,
+                          java.lang.String get,
+                          java.lang.String set)
+                   throws JiBXException
+
+
Constructor. +

+

+
Parameters:
parent - containing binding definition structure
obj - containing object context
type - fully qualified name of type
isthis - "this" object reference flag
opt - optional property flag
fname - containing object field name for property (may be + null)
test - containing object method to test for property present (may be + null)
get - containing object method to get property value (may be + null)
set - containing object method to set property value (may be + null) +
Throws: +
JiBXException - if configuration error
+
+
+ +

+PropertyDefinition

+
+public PropertyDefinition(IContextObj obj,
+                          boolean opt)
+
+
Constructor for "this" object reference. +

+

+
Parameters:
obj - containing object context
opt - optional property flag
+
+
+ +

+PropertyDefinition

+
+public PropertyDefinition(java.lang.String type,
+                          IContextObj obj,
+                          boolean opt)
+
+
Constructor for implicit object reference. +

+

+
Parameters:
type - object type supplied
obj - containing object context
opt - optional property flag
+
+ + + + + + + + +
+Method Detail
+ +

+isThis

+
+public boolean isThis()
+
+
Check if property is "this" reference for object. +

+

+ +
Returns:
true if reference to "this", false if + not
+
+
+
+ +

+isImplicit

+
+public boolean isImplicit()
+
+
Check if property is implicit value from collection. +

+

+ +
Returns:
true if implicit, false if not
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Check if property is optional. +

+

+ +
Returns:
true if optional, false if required
+
+
+
+ +

+setOptional

+
+public void setOptional(boolean opt)
+
+
Set flag for an optional property. +

+

+
Parameters:
opt - true if optional property, false if + not
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+
+
Get property name. If a field is defined this is the same as the field; + otherwise it is either the get method name (with leading "get" stripped, + if present) or the set method (with leading "set" stripped, if present), + whichever is found. +

+

+ +
Returns:
name for this property
+
+
+
+ +

+getTypeName

+
+public java.lang.String getTypeName()
+
+
Get declared type fully qualified name. +

+

+ +
Returns:
fully qualified class name of declared type
+
+
+
+ +

+getGetValueType

+
+public java.lang.String getGetValueType()
+
+
Get value type as fully qualified name for loaded property value. +

+

+ +
Returns:
fully qualified class name of value type
+
+
+
+ +

+getSetValueType

+
+public java.lang.String getSetValueType()
+
+
Get value type as fully qualified name for stored property value. +

+

+ +
Returns:
fully qualified class name of value type
+
+
+
+ +

+hasTest

+
+public boolean hasTest()
+
+
Check if property has presence test. Code needs to be generated to check + for the presence of the property if it is optional and either a test + method is defined or the value is an object reference. +

+

+ +
Returns:
true if presence test needed, false if + not
+
+
+
+ +

+genTest

+
+public BranchWrapper genTest(ContextMethodBuilder mb)
+
+
Generate code to test if property is present. The generated code + assumes that the top of the stack is the reference for the containing + object, and consumes this value for the test. The target for the + returned branch instruction must be set by the caller. +

+

+
Parameters:
mb - method builder +
Returns:
wrapper for branch instruction taken when property is missing
+
+
+
+ +

+genLoad

+
+public void genLoad(MethodBuilder mb)
+             throws JiBXException
+
+
Generate code to load property value to stack. The generated code + assumes that the top of the stack is the reference for the containing + object. It consumes this and leaves the actual value on the stack. If + the property value is not directly accessible from the context of the + method being generated this automatically constructs an access method + and uses that method. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genStore

+
+public void genStore(MethodBuilder mb)
+              throws JiBXException
+
+
Generate code to store property value from stack. The generated code + assumes that the reference to the containing object and the value to be + stored have already been pushed on the stack. It consumes these, leaving + nothing. If the property value is not directly accessible from the + context of the method being generated this automatically constructs an + access method and uses that method. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+toString

+
+public java.lang.String toString()
+
+
+
Overrides:
toString in class java.lang.Object
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/ObjectBinding.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/ObjectBinding.html @@ -0,0 +1,2148 @@ + + + + + + +ObjectBinding (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class ObjectBinding

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.ObjectBinding
+
+
+
All Implemented Interfaces:
IComponent, IContextObj
+
+
+
+
public class ObjectBinding
extends PassThroughComponent
implements IComponent, IContextObj
+ + +

+Binding modifiers that apply to a class reference. This adds the methods used + for handling binding operations to the object class, then generates calls to + the added methods as this binding definition is used. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static org.apache.bcel.generic.Type[]EMPTY_ARGS + +
+           
+private static java.lang.String[]FACTORY_HOOK_SIGNATURES + +
+           
+private static java.lang.StringGETSTACKTOP_SIGNATURE + +
+           
+private  BoundClassm_class + +
+          Class linked to mapping.
+private  IContainerm_container + +
+          Containing binding definition structure.
+private  ClassItemm_factoryMethod + +
+          Object factory method.
+private  IComponentm_idChild + +
+          Child supplying instance identifier value.
+private  booleanm_isStaticMarshal + +
+          Flag for static marshal methods.
+private  booleanm_isStaticUnmarshal + +
+          Flag for static unmarshal methods.
+private  booleanm_isThisBinding + +
+          Flag for "this" reference, meaning that there's no separate object + instance created.
+private  booleanm_lockAttributeMarshal + +
+          Flag for recursion while generating attribute marshal.
+private  booleanm_lockAttributeUnmarshal + +
+          Flag for recursion while generating attribute unmarshal.
+private  booleanm_lockContentMarshal + +
+          Flag for recursion while generating attribute marshal.
+private  booleanm_lockContentUnmarshal + +
+          Flag for recursion while generating attribute unmarshal.
+private  ClassItemm_marshalAttributeMethod + +
+          Generated marshal attribute method.
+private  java.lang.Stringm_marshalAttributeName + +
+          Name for marshal attribute method (null unless + generation started).
+private  ClassItemm_marshalContentMethod + +
+          Generated marshal content method.
+private  java.lang.Stringm_marshalContentName + +
+          Name for marshal content method (null unless + generation istarted).
+private  java.lang.Stringm_marshalSignature + +
+          Signature used for marshal methods.
+private  ClassItemm_newInstanceMethod + +
+          Generated new instance method.
+private  ClassItemm_postSetMethod + +
+          Postset method for object.
+private  ClassItemm_preGetMethod + +
+          Preget method for object.
+private  ClassItemm_preSetMethod + +
+          Preset method for object.
+private  ClassItemm_unmarshalAttributeMethod + +
+          Generated unmarshal attribute method.
+private  java.lang.Stringm_unmarshalAttributeName + +
+          Name for unmarshal attribute method (null unless + generation started).
+private  ClassItemm_unmarshalContentMethod + +
+          Generated unmarshal content method.
+private  java.lang.Stringm_unmarshalContentName + +
+          Name for unmarshal content method (null unless + generation started).
+private  java.lang.Stringm_unmarshalSignature + +
+          Signature used for unmarshal methods.
+private static java.lang.StringMARSHAL_ATTR_SUFFIX + +
+           
+private static java.lang.StringMARSHAL_GETSTACKTOPMETHOD + +
+           
+private static java.lang.String[]MARSHAL_HOOK_SIGNATURES + +
+           
+private static java.lang.StringMARSHAL_POPOBJECTMETHOD + +
+           
+private static java.lang.StringMARSHAL_PUSHOBJECTMETHOD + +
+           
+private static java.lang.StringMARSHAL_SUFFIX + +
+           
+private static java.lang.StringMARSHALLING_CONTEXT + +
+           
+private static java.lang.StringNEWINSTANCE_SUFFIX + +
+           
+private static java.lang.StringPOPOBJECT_SIGNATURE + +
+           
+private static java.lang.StringPUSHOBJECT_SIGNATURE + +
+           
+private static org.apache.bcel.generic.Type[]SETSOURCE_ARGS + +
+           
+private static java.lang.StringSETSOURCE_METHODNAME + +
+           
+private static java.lang.StringSOURCE_TRACKING_INTERFACE + +
+           
+private static java.lang.StringSOURCECOLUMN_FIELDNAME + +
+           
+private static java.lang.StringSOURCECOLUMN_METHODNAME + +
+           
+private static java.lang.StringSOURCEDOCUMENT_FIELDNAME + +
+           
+private static java.lang.StringSOURCELINE_FIELDNAME + +
+           
+private static java.lang.StringSOURCELINE_METHODNAME + +
+           
+private static java.lang.StringSOURCENAME_METHODNAME + +
+           
+private static java.lang.StringUNMARSHAL_ATTR_SUFFIX + +
+           
+private static java.lang.StringUNMARSHAL_GETSTACKTOPMETHOD + +
+           
+private static java.lang.String[]UNMARSHAL_HOOK_SIGNATURES + +
+           
+private static java.lang.StringUNMARSHAL_PARAMETER_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHAL_POPOBJECTMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_PUSHOBJECTMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_PUSHTRACKEDOBJECTMETHOD + +
+           
+private static java.lang.StringUNMARSHAL_SUFFIX + +
+           
+private static java.lang.StringUNMARSHALLING_CONTEXT + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
ObjectBinding(IContainer contain, + IContextObj objc, + java.lang.String type, + java.lang.String fact, + java.lang.String pres, + java.lang.String posts, + java.lang.String pget) + +
+          Constructor.
ObjectBinding(IContainer contain, + ObjectBinding base) + +
+          Copy constructor.
ObjectBinding(ObjectBinding base) + +
+          Abstract binding copy constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  java.lang.StringfullMethodName(ClassItem item) + +
+          Construct fully-qualified class and method name for constructed method.
+private  java.lang.StringfullMethodName(ContextMethodBuilder mb) + +
+          Construct fullly-qualified class and method name for method under + construction.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+private  voidgenMarshalAttributeCall(ContextMethodBuilder mb) + +
+          Generate call to attribute marshal method for object.
+private  voidgenMarshalCall(java.lang.String name, + ContextMethodBuilder mb) + +
+          Generate call to a constructed marshal method.
+private  voidgenMarshalContentCall(ContextMethodBuilder mb) + +
+          Generate call to content marshal method for object.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+private  voidgenNewInstanceCall(ContextMethodBuilder mb) + +
+          Generate call to new instance creation method for object.
+private  voidgenNewInstanceCode(ContextMethodBuilder mb) + +
+          Generate code to create an instance of the object for this mapping.
+private  voidgenTrackSourceCode() + +
+          Generate code to handle unmarshal source location tracking.
+private  voidgenUnmarshalAttributeCall(ContextMethodBuilder mb) + +
+          Generate call to attribute unmarshal method for object.
+private  voidgenUnmarshalCall(java.lang.String name, + ContextMethodBuilder mb) + +
+          Generate call to a constructed unmarshal method.
+private  voidgenUnmarshalContentCall(ContextMethodBuilder mb) + +
+          Generate call to content unmarshal method for object.
+private  voidgenUserMethodCall(boolean in, + ClassItem method, + ContextMethodBuilder mb) + +
+          Generate code for calling a user supplied method.
+ BoundClassgetBoundClass() + +
+          Get class linked to binding element.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ booleansetIdChild(IComponent child) + +
+          Set ID property.
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttrPresentTest, genContentPresentTest, hasAttribute, hasContent, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttrPresentTest, genContentPresentTest, hasAttribute, hasContent
+  +

+ + + + + + + + +
+Field Detail
+ +

+MARSHAL_HOOK_SIGNATURES

+
+private static final java.lang.String[] MARSHAL_HOOK_SIGNATURES
+
+
+
+
+
+ +

+FACTORY_HOOK_SIGNATURES

+
+private static final java.lang.String[] FACTORY_HOOK_SIGNATURES
+
+
+
+
+
+ +

+UNMARSHAL_HOOK_SIGNATURES

+
+private static final java.lang.String[] UNMARSHAL_HOOK_SIGNATURES
+
+
+
+
+
+ +

+UNMARSHAL_GETSTACKTOPMETHOD

+
+private static final java.lang.String UNMARSHAL_GETSTACKTOPMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_GETSTACKTOPMETHOD

+
+private static final java.lang.String MARSHAL_GETSTACKTOPMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETSTACKTOP_SIGNATURE

+
+private static final java.lang.String GETSTACKTOP_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLING_CONTEXT

+
+private static final java.lang.String MARSHALLING_CONTEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_CONTEXT

+
+private static final java.lang.String UNMARSHALLING_CONTEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PARAMETER_SIGNATURE

+
+private static final java.lang.String UNMARSHAL_PARAMETER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PUSHOBJECTMETHOD

+
+private static final java.lang.String UNMARSHAL_PUSHOBJECTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_PUSHTRACKEDOBJECTMETHOD

+
+private static final java.lang.String UNMARSHAL_PUSHTRACKEDOBJECTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_PUSHOBJECTMETHOD

+
+private static final java.lang.String MARSHAL_PUSHOBJECTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PUSHOBJECT_SIGNATURE

+
+private static final java.lang.String PUSHOBJECT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_POPOBJECTMETHOD

+
+private static final java.lang.String UNMARSHAL_POPOBJECTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_POPOBJECTMETHOD

+
+private static final java.lang.String MARSHAL_POPOBJECTMETHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+POPOBJECT_SIGNATURE

+
+private static final java.lang.String POPOBJECT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+NEWINSTANCE_SUFFIX

+
+private static final java.lang.String NEWINSTANCE_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_ATTR_SUFFIX

+
+private static final java.lang.String UNMARSHAL_ATTR_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_ATTR_SUFFIX

+
+private static final java.lang.String MARSHAL_ATTR_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_SUFFIX

+
+private static final java.lang.String UNMARSHAL_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_SUFFIX

+
+private static final java.lang.String MARSHAL_SUFFIX
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCE_TRACKING_INTERFACE

+
+private static final java.lang.String SOURCE_TRACKING_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SETSOURCE_METHODNAME

+
+private static final java.lang.String SETSOURCE_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SETSOURCE_ARGS

+
+private static final org.apache.bcel.generic.Type[] SETSOURCE_ARGS
+
+
+
+
+
+ +

+SOURCEDOCUMENT_FIELDNAME

+
+private static final java.lang.String SOURCEDOCUMENT_FIELDNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCELINE_FIELDNAME

+
+private static final java.lang.String SOURCELINE_FIELDNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCECOLUMN_FIELDNAME

+
+private static final java.lang.String SOURCECOLUMN_FIELDNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCENAME_METHODNAME

+
+private static final java.lang.String SOURCENAME_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCELINE_METHODNAME

+
+private static final java.lang.String SOURCELINE_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+SOURCECOLUMN_METHODNAME

+
+private static final java.lang.String SOURCECOLUMN_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EMPTY_ARGS

+
+private static final org.apache.bcel.generic.Type[] EMPTY_ARGS
+
+
+
+
+
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_class

+
+private BoundClass m_class
+
+
Class linked to mapping. +

+

+
+
+
+ +

+m_factoryMethod

+
+private final ClassItem m_factoryMethod
+
+
Object factory method. +

+

+
+
+
+ +

+m_preSetMethod

+
+private final ClassItem m_preSetMethod
+
+
Preset method for object. +

+

+
+
+
+ +

+m_postSetMethod

+
+private final ClassItem m_postSetMethod
+
+
Postset method for object. +

+

+
+
+
+ +

+m_preGetMethod

+
+private final ClassItem m_preGetMethod
+
+
Preget method for object. +

+

+
+
+
+ +

+m_newInstanceMethod

+
+private ClassItem m_newInstanceMethod
+
+
Generated new instance method. +

+

+
+
+
+ +

+m_lockAttributeUnmarshal

+
+private boolean m_lockAttributeUnmarshal
+
+
Flag for recursion while generating attribute unmarshal. +

+

+
+
+
+ +

+m_lockAttributeMarshal

+
+private boolean m_lockAttributeMarshal
+
+
Flag for recursion while generating attribute marshal. +

+

+
+
+
+ +

+m_lockContentUnmarshal

+
+private boolean m_lockContentUnmarshal
+
+
Flag for recursion while generating attribute unmarshal. +

+

+
+
+
+ +

+m_lockContentMarshal

+
+private boolean m_lockContentMarshal
+
+
Flag for recursion while generating attribute marshal. +

+

+
+
+
+ +

+m_unmarshalSignature

+
+private java.lang.String m_unmarshalSignature
+
+
Signature used for unmarshal methods. +

+

+
+
+
+ +

+m_unmarshalAttributeName

+
+private java.lang.String m_unmarshalAttributeName
+
+
Name for unmarshal attribute method (null unless + generation started). +

+

+
+
+
+ +

+m_unmarshalContentName

+
+private java.lang.String m_unmarshalContentName
+
+
Name for unmarshal content method (null unless + generation started). +

+

+
+
+
+ +

+m_isStaticUnmarshal

+
+private boolean m_isStaticUnmarshal
+
+
Flag for static unmarshal methods. +

+

+
+
+
+ +

+m_isStaticMarshal

+
+private boolean m_isStaticMarshal
+
+
Flag for static marshal methods. +

+

+
+
+
+ +

+m_marshalSignature

+
+private java.lang.String m_marshalSignature
+
+
Signature used for marshal methods. +

+

+
+
+
+ +

+m_marshalAttributeName

+
+private java.lang.String m_marshalAttributeName
+
+
Name for marshal attribute method (null unless + generation started). +

+

+
+
+
+ +

+m_marshalContentName

+
+private java.lang.String m_marshalContentName
+
+
Name for marshal content method (null unless + generation istarted). +

+

+
+
+
+ +

+m_unmarshalAttributeMethod

+
+private ClassItem m_unmarshalAttributeMethod
+
+
Generated unmarshal attribute method. +

+

+
+
+
+ +

+m_unmarshalContentMethod

+
+private ClassItem m_unmarshalContentMethod
+
+
Generated unmarshal content method. +

+

+
+
+
+ +

+m_marshalAttributeMethod

+
+private ClassItem m_marshalAttributeMethod
+
+
Generated marshal attribute method. +

+

+
+
+
+ +

+m_marshalContentMethod

+
+private ClassItem m_marshalContentMethod
+
+
Generated marshal content method. +

+

+
+
+
+ +

+m_idChild

+
+private IComponent m_idChild
+
+
Child supplying instance identifier value. +

+

+
+
+
+ +

+m_isThisBinding

+
+private boolean m_isThisBinding
+
+
Flag for "this" reference, meaning that there's no separate object + instance created. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ObjectBinding

+
+public ObjectBinding(IContainer contain,
+                     IContextObj objc,
+                     java.lang.String type,
+                     java.lang.String fact,
+                     java.lang.String pres,
+                     java.lang.String posts,
+                     java.lang.String pget)
+              throws JiBXException
+
+
Constructor. This initializes the definition context to be the same as + the parent's. Subclasses may change this definition context if + appropriate. +

+

+
Parameters:
contain - containing binding definition component
objc - current object context
type - fully qualified class name for bound object
fact - user new instance factory method
pres - user preset method for unmarshalling
posts - user postset method for unmarshalling
pget - user preget method for marshalling +
Throws: +
JiBXException - if method not found
+
+
+ +

+ObjectBinding

+
+public ObjectBinding(ObjectBinding base)
+
+
Abstract binding copy constructor. This is used to create a variation of + the object binding for a mapping which will be used for "this" + references. The "this" reference handling differs only in the code + generation, where it skips adding the source tracking interfaces and + does not push an instance of the object on the marshalling or + unmarshalling stack (since the object will already be there). This method + is only to be used before code generation. +

+

+
Parameters:
base - original object binding
+
+
+ +

+ObjectBinding

+
+public ObjectBinding(IContainer contain,
+                     ObjectBinding base)
+
+
Copy constructor. This is used in handling abstract mappings, where the + properties of the mapping definition object binding need to be copied for + each use of that binding. +

+

+
Parameters:
contain - binding definition component containing copy
+
+ + + + + + + + +
+Method Detail
+ +

+genUserMethodCall

+
+private void genUserMethodCall(boolean in,
+                               ClassItem method,
+                               ContextMethodBuilder mb)
+
+
Generate code for calling a user supplied method. The object methods + support three signature variations, with no parameters, with the + marshalling or unmarshalling context, or with the owning object. +

+

+
+
+
+
Parameters:
in - flag for unmarshalling method
method - information for method being called
mb - method builder for generated code
+
+
+
+ +

+genNewInstanceCode

+
+private void genNewInstanceCode(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Generate code to create an instance of the object for this mapping. This + convenience method generates the actual code for creating an instance of + an object. The generated code leaves the created object reference on the + stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+genNewInstanceCall

+
+private void genNewInstanceCall(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Generate call to new instance creation method for object. This + convenience method just generates code to call the generated new + instance method added to the class definition. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genTrackSourceCode

+
+private void genTrackSourceCode()
+                         throws JiBXException
+
+
Generate code to handle unmarshal source location tracking. This + convenience method generates the member variables and method used to + support setting the source location, the methods used to access the + information, and also adds the appropriate interfaces to the class. +

+

+
+
+
+ +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+fullMethodName

+
+private java.lang.String fullMethodName(ContextMethodBuilder mb)
+
+
Construct fullly-qualified class and method name for method under + construction. +

+

+
+
+
+
Parameters:
mb - method to be named +
Returns:
fully-qualified class and method name
+
+
+
+ +

+fullMethodName

+
+private java.lang.String fullMethodName(ClassItem item)
+
+
Construct fully-qualified class and method name for constructed method. +

+

+
+
+
+
Parameters:
item - method to be named +
Returns:
fully-qualified class and method name
+
+
+
+ +

+genUnmarshalCall

+
+private void genUnmarshalCall(java.lang.String name,
+                              ContextMethodBuilder mb)
+
+
Generate call to a constructed unmarshal method. +

+

+
+
+
+
Parameters:
mb -
+
+
+
+ +

+genMarshalCall

+
+private void genMarshalCall(java.lang.String name,
+                            ContextMethodBuilder mb)
+
+
Generate call to a constructed marshal method. +

+

+
+
+
+
Parameters:
mb -
+
+
+
+ +

+genUnmarshalAttributeCall

+
+private void genUnmarshalAttributeCall(ContextMethodBuilder mb)
+                                throws JiBXException
+
+
Generate call to attribute unmarshal method for object. This convenience + method just generates code to call the generated unmarshal method added + to the class definition. The code generated prior to this call must have + loaded a reference to the object to be unmarshalled on the stack, and the + generated code returns the (possibly different, in the case of arrays) + object on the stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genMarshalAttributeCall

+
+private void genMarshalAttributeCall(ContextMethodBuilder mb)
+                              throws JiBXException
+
+
Generate call to attribute marshal method for object. This convenience + method just generates code to call the generated marshal method added to + the class definition. The code generated prior to this call must have + loaded a reference to the object to be marshalled on the stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genUnmarshalContentCall

+
+private void genUnmarshalContentCall(ContextMethodBuilder mb)
+                              throws JiBXException
+
+
Generate call to content unmarshal method for object. This convenience + method just generates code to call the generated unmarshal method added + to the class definition. The code generated prior to this call must have + loaded a reference to the object to be unmarshalled on the stack, and the + generated code returns the (possibly different, in the case of arrays) + object on the stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genMarshalContentCall

+
+private void genMarshalContentCall(ContextMethodBuilder mb)
+                            throws JiBXException
+
+
Generate call to content marshal method for object. This convenience + method just generates code to call the generated marshal method added to + the class definition. The code generated prior to this call must have + loaded a reference to the object to be marshalled on the stack. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getBoundClass

+
+public BoundClass getBoundClass()
+
+
Description copied from interface: IContextObj
+
Get class linked to binding element. +

+

+
Specified by:
getBoundClass in interface IContextObj
+
+
+ +
Returns:
information for class linked by binding
+
+
+
+ +

+setIdChild

+
+public boolean setIdChild(IComponent child)
+
+
Description copied from interface: IContextObj
+
Set ID property. Tells the parent binding element that a particular + child defines an ID property for the class linked to the parent. +

+

+
Specified by:
setIdChild in interface IContextObj
+
+
+
Parameters:
child - child defining the ID property +
Returns:
true if successful, false if ID + already defined
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
Overrides:
isOptional in class PassThroughComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
Overrides:
genAttributeUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
Overrides:
genContentUnmarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
Overrides:
genNewInstance in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
Overrides:
getType in class PassThroughComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
Overrides:
hasId in class PassThroughComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
Overrides:
genLoadId in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class PassThroughComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.IteratorLoad.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.IteratorLoad.html @@ -0,0 +1,416 @@ + + + + + + +NestedCollection.IteratorLoad (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.IteratorLoad

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionLoad
+      extended by org.jibx.binding.def.NestedCollection.IteratorLoad
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.IteratorLoad
extends NestedCollection.CollectionLoad
+ + +

+Collection item load strategy for collection with items accessed by + iterator or enumeration. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  ClassItemm_iterMethod + +
+          Method used to get iterator for collection.
+private  java.lang.Stringm_moreName + +
+          Fully qualified method name to test if more in iteration.
+private  java.lang.Stringm_nextName + +
+          Fully qualified method name to get next item in iteration.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.IteratorLoad(ClassItem iter, + java.lang.String more, + java.lang.String next) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenLoadDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after loading items from collection.
+protected  voidgenLoadInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for loading items.
+protected  BranchWrappergenLoadItem(ContextMethodBuilder mb) + +
+          Generate code to load next item from collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_iterMethod

+
+private final ClassItem m_iterMethod
+
+
Method used to get iterator for collection. +

+

+
+
+
+ +

+m_moreName

+
+private final java.lang.String m_moreName
+
+
Fully qualified method name to test if more in iteration. +

+

+
+
+
+ +

+m_nextName

+
+private final java.lang.String m_nextName
+
+
Fully qualified method name to get next item in iteration. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.IteratorLoad

+
+NestedCollection.IteratorLoad(ClassItem iter,
+                              java.lang.String more,
+                              java.lang.String next)
+
+
Constructor. +

+

+
Parameters:
iter - method to get iterator or enumerator from collection
more - fully qualified method name to test if more in iteration
next - fully qualified method name to get next item in iteration
+
+ + + + + + + + +
+Method Detail
+ +

+genLoadInit

+
+protected void genLoadInit(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to initialize collection for loading items. This + generates the necessary code for handling the initialization. It + must be called before attempting to call the NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder) + method. The base class implementation does nothing. +

+

+
Overrides:
genLoadInit in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadItem

+
+protected BranchWrapper genLoadItem(ContextMethodBuilder mb)
+                             throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to load next item from collection. This generates the + necessary code for handling the load operation, leaving the item on + the stack. The NestedCollection.CollectionLoad.genLoadInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called before + calling this method, and the NestedCollection.CollectionLoad.genLoadDone(org.jibx.binding.classes.ContextMethodBuilder) method must be + called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genLoadItem in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Returns:
branch wrapper for case of done with collection +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genLoadDone

+
+protected void genLoadDone(ContextMethodBuilder mb)
+                    throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionLoad
+
Generate code to clean up after loading items from collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Overrides:
genLoadDone in class NestedCollection.CollectionLoad
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/package-frame.html @@ -0,0 +1,121 @@ + + + + + + +org.jibx.binding.def (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.binding.def + + + + +
+Interfaces  + +
+IComponent +
+IContainer +
+IContextObj +
+IMapping
+ + + + + + +
+Classes  + +
+BaseMappingWrapper +
+BindingBuilder +
+BindingBuilder.ContainerBase +
+BindingDefinition +
+ComponentProperty +
+DefinitionContext +
+DirectGeneric +
+DirectObject +
+DirectProperty +
+ElementWrapper +
+LinkableBase +
+MappingBase +
+MappingDefinition +
+MappingDirect +
+MappingReference +
+NameDefinition +
+NamespaceDefinition +
+NestedBase +
+NestedCollection +
+NestedCollection.AddStore +
+NestedCollection.ArrayLoad +
+NestedCollection.ArrayStore +
+NestedCollection.CollectionLoad +
+NestedCollection.CollectionStore +
+NestedCollection.IndexedLoad +
+NestedCollection.IndexedStore +
+NestedCollection.IteratorLoad +
+NestedStructure +
+ObjectBinding +
+ObjectStringConversion +
+OptionalStructureWrapper +
+PassThroughComponent +
+PrimitiveStringConversion +
+PropertyDefinition +
+StringConversion +
+StructureReference +
+ValueChild
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/package-summary.html @@ -0,0 +1,323 @@ + + + + + + +org.jibx.binding.def (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.binding.def +

+ + + + + + + + + + + + + + + + + + + + + +
+Interface Summary
IComponentChild component (attribute or content) interface definition.
IContainerContaining binding definitions structure interface.
IContextObjContaining object context interface.
IMappingInterface for mapping definitions.
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BaseMappingWrapperComponent decorator for abstract base mapping from extension mapping.
BindingBuilderBinding definition constants.
BindingBuilder.ContainerBaseBase class for containers.
BindingDefinitionBinding definition.
ComponentPropertyProperty reference with binding defined by component.
DefinitionContextNesting level for definitions in binding.
DirectGenericLinkage to generic object with defined marshaller and/or unmarshaller.
DirectObjectLinkage to object with supplied marshaller and unmarshaller.
DirectPropertyProperty reference with marshaller and unmarshaller.
ElementWrapperComponent decorator for element definition.
LinkableBaseBase class for components that can be linked from multiple locations within + the binding definition structure.
MappingBaseBase class for mapping definitions.
MappingDefinitionNormal mapping with defined binding.
MappingDirectDirect mapping using supplied marshaller and unmarshaller.
MappingReferenceReference to a mapping definition.
NameDefinitionNamed value definition from binding.
NamespaceDefinitionNamespace definition from binding.
NestedBaseBase class for structure and collection binding definitions.
NestedCollectionCollection binding definition.
NestedCollection.AddStoreCollection item store strategy for collection with add method.
NestedCollection.ArrayLoadCollection item load strategy for array.
NestedCollection.ArrayStoreCollection item store strategy for array.
NestedCollection.CollectionLoadBase class for collection item load strategy.
NestedCollection.CollectionStoreBase class for collection item store strategy.
NestedCollection.IndexedLoadCollection item load strategy for collection with items accessed by + index number.
NestedCollection.IndexedStoreCollection item store strategy for collection with items set by + index number.
NestedCollection.IteratorLoadCollection item load strategy for collection with items accessed by + iterator or enumeration.
NestedStructureStructure binding definition.
ObjectBindingBinding modifiers that apply to a class reference.
ObjectStringConversionObject string conversion handling.
OptionalStructureWrapperComponent decorator for optional structure with associated property.
PassThroughComponentDefault component decorator.
PrimitiveStringConversionPrimitive string conversion handling.
PropertyDefinitionProperty definition from binding.
StringConversionString conversion handling.
StructureReferenceReference to a structure definition.
ValueChildAttribute or simple content value definition from binding.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/LinkableBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/LinkableBase.html @@ -0,0 +1,425 @@ + + + + + + +LinkableBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class LinkableBase

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.LinkableBase
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
Direct Known Subclasses:
MappingBase
+
+
+
+
public abstract class LinkableBase
extends PassThroughComponent
+ + +

+Base class for components that can be linked from multiple locations within + the binding definition structure. The implemented basic behavior is a simple + pass-through component, with the addition of recursion checking during the + linking phase. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_isLinked + +
+          Flag for linkage complete.
+private  booleanm_isLinking + +
+          Flag for linkage in progress.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + + + + + + +
+Constructor Summary
+protected LinkableBase() + +
+          No argument constructor.
+ LinkableBase(IComponent wrap) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidhandleRecursion() + +
+          Handler for recursion.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_isLinking

+
+private boolean m_isLinking
+
+
Flag for linkage in progress. +

+

+
+
+
+ +

+m_isLinked

+
+private boolean m_isLinked
+
+
Flag for linkage complete. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+LinkableBase

+
+protected LinkableBase()
+
+
No argument constructor. This requires the component to be set later, + using the PassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent) method. +

+

+
+ +

+LinkableBase

+
+public LinkableBase(IComponent wrap)
+
+
Constructor. +

+

+
Parameters:
wrap - wrapped binding component
+
+ + + + + + + + +
+Method Detail
+ +

+handleRecursion

+
+protected void handleRecursion()
+
+
Handler for recursion. If recursion is found during linking this method + will be called. The base class implementation does nothing, but may be + overridden by subclases to implement the appropriate behavior. +

+

+
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class PassThroughComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/MappingBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/MappingBase.html @@ -0,0 +1,839 @@ + + + + + + +MappingBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class MappingBase

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.LinkableBase
+          extended by org.jibx.binding.def.MappingBase
+
+
+
All Implemented Interfaces:
IComponent, IMapping
+
+
+
Direct Known Subclasses:
MappingDefinition, MappingDirect
+
+
+
+
public abstract class MappingBase
extends LinkableBase
implements IMapping
+ + +

+Base class for mapping definitions. This is used for both normal and custom + mappings. It handles adding the appropriate marshalling and/or unmarshalling + interfaces and methods to the classes. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static java.lang.StringABSTRACTMARSHALLER_INTERFACE + +
+           
+protected static java.lang.StringCHECKEXTENDS_METHODNAME + +
+           
+protected static java.lang.StringCHECKEXTENDS_SIGNATURE + +
+           
+protected static java.lang.StringGETINDEX_METHODNAME + +
+           
+protected static java.lang.StringGETINDEX_SIGNATURE + +
+           
+protected static java.lang.StringGETMARSHALLER_METHOD + +
+           
+protected static java.lang.StringGETMARSHALLER_SIGNATURE + +
+           
+protected static java.lang.StringGETUNMARSHALLER_METHOD + +
+           
+protected static java.lang.StringGETUNMARSHALLER_SIGNATURE + +
+           
+protected static java.lang.StringIMARSHALLABLE_INTERFACE + +
+           
+protected static java.lang.StringIUNMARSHALLABLE_INTERFACE + +
+           
+private  intm_indexNumber + +
+          Index number for this particular binding definition.
+protected static java.lang.StringMARSHALLABLE_METHODNAME + +
+           
+protected static java.lang.StringMARSHALLABLE_SIGNATURE + +
+           
+protected static java.lang.StringMARSHALLER_INTERFACE + +
+           
+protected static java.lang.StringMARSHALLERMARSHAL_METHOD + +
+           
+protected static java.lang.StringMARSHALLERMARSHAL_SIGNATURE + +
+           
+protected static java.lang.StringUNMARSHALLABLE_METHODNAME + +
+           
+protected static java.lang.StringUNMARSHALLABLE_SIGNATURE + +
+           
+protected static java.lang.StringUNMARSHALLER_INTERFACE + +
+           
+protected static java.lang.StringUNMARSHALLERUNMARSHAL_METHOD + +
+           
+protected static java.lang.StringUNMARSHALLERUNMARSHAL_SIGNATURE + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + + + + +
+Constructor Summary
MappingBase(IContainer contain, + java.lang.String type) + +
+          Constructor.
MappingBase(IContainer contain, + java.lang.String type, + IComponent wrap) + +
+          Constructor with wrapped component supplied.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidaddIMarshallableMethod() + +
+          Generate marshallable interface methods for this mapping.
+protected  voidaddIUnmarshallableMethod() + +
+          Generate unmarshallable interface method for this mapping.
+abstract  BoundClassgetBoundClass() + +
+          Get the mapped class information.
+ intgetIndex() + +
+          Get mapped class index number.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.LinkableBase
handleRecursion, print, setLinkages
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IMapping
addExtension, addNamespace, buildRef, generateCode, getBoundType, getImplComponent, getMarshaller, getName, getReferenceType, getTypeName, getUnmarshaller, isAbstract, isBase
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, print, setLinkages
+  +

+ + + + + + + + +
+Field Detail
+ +

+IMARSHALLABLE_INTERFACE

+
+protected static final java.lang.String IMARSHALLABLE_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLABLE_METHODNAME

+
+protected static final java.lang.String MARSHALLABLE_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLABLE_SIGNATURE

+
+protected static final java.lang.String MARSHALLABLE_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETINDEX_METHODNAME

+
+protected static final java.lang.String GETINDEX_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETINDEX_SIGNATURE

+
+protected static final java.lang.String GETINDEX_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECKEXTENDS_METHODNAME

+
+protected static final java.lang.String CHECKEXTENDS_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CHECKEXTENDS_SIGNATURE

+
+protected static final java.lang.String CHECKEXTENDS_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+IUNMARSHALLABLE_INTERFACE

+
+protected static final java.lang.String IUNMARSHALLABLE_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLABLE_METHODNAME

+
+protected static final java.lang.String UNMARSHALLABLE_METHODNAME
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLABLE_SIGNATURE

+
+protected static final java.lang.String UNMARSHALLABLE_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLER_INTERFACE

+
+protected static final java.lang.String UNMARSHALLER_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLERUNMARSHAL_METHOD

+
+protected static final java.lang.String UNMARSHALLERUNMARSHAL_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLERUNMARSHAL_SIGNATURE

+
+protected static final java.lang.String UNMARSHALLERUNMARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLER_INTERFACE

+
+protected static final java.lang.String MARSHALLER_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ABSTRACTMARSHALLER_INTERFACE

+
+protected static final java.lang.String ABSTRACTMARSHALLER_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLERMARSHAL_METHOD

+
+protected static final java.lang.String MARSHALLERMARSHAL_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLERMARSHAL_SIGNATURE

+
+protected static final java.lang.String MARSHALLERMARSHAL_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETMARSHALLER_METHOD

+
+protected static final java.lang.String GETMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETMARSHALLER_SIGNATURE

+
+protected static final java.lang.String GETMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETUNMARSHALLER_METHOD

+
+protected static final java.lang.String GETUNMARSHALLER_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+GETUNMARSHALLER_SIGNATURE

+
+protected static final java.lang.String GETUNMARSHALLER_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_indexNumber

+
+private final int m_indexNumber
+
+
Index number for this particular binding definition. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MappingBase

+
+public MappingBase(IContainer contain,
+                   java.lang.String type)
+
+
Constructor. This version requires the component to be set later, + using the PassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent) method. +

+

+
Parameters:
contain - containing binding definition structure
type - bound class name
+
+
+ +

+MappingBase

+
+public MappingBase(IContainer contain,
+                   java.lang.String type,
+                   IComponent wrap)
+
+
Constructor with wrapped component supplied. +

+

+
Parameters:
contain - containing binding definition structure
type - bound class name
wrap - wrapped binding component
+
+ + + + + + + + +
+Method Detail
+ +

+getBoundClass

+
+public abstract BoundClass getBoundClass()
+
+
Get the mapped class information. This must be implemented in each + subclass to return the type of the bound class. +

+

+
+
+
+ +
Returns:
information for mapped class
+
+
+
+ +

+addIMarshallableMethod

+
+protected void addIMarshallableMethod()
+                               throws JiBXException
+
+
Generate marshallable interface methods for this mapping. This is not + applicable to abstract mappings, since they cannot be marshalled as + separate items. +

+

+
+
+
+ +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+addIUnmarshallableMethod

+
+protected void addIUnmarshallableMethod()
+                                 throws JiBXException
+
+
Generate unmarshallable interface method for this mapping. This is not + applicable to abstract mappings, since they cannot be unmarshalled as + separate items. +

+

+
+
+
+ +
Throws: +
JiBXException - if error in generating code
+
+
+
+ +

+getIndex

+
+public int getIndex()
+
+
Description copied from interface: IMapping
+
Get mapped class index number. +

+

+
Specified by:
getIndex in interface IMapping
+
+
+ +
Returns:
mapped class index number in context
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/MappingReference.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/MappingReference.html @@ -0,0 +1,498 @@ + + + + + + +MappingReference (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class MappingReference

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.MappingReference
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class MappingReference
extends PassThroughComponent
+ + +

+Reference to a mapping definition. This is used as a placeholder when + building the component structure of a binding definition. It's necessary + because the referenced mapping may not have been parsed yet. During the + linkage phase that follows parsing this looks up the appropriate mapping + definition and sets up the corresponding component structure. Thereafter it + operates as a simple pass-through wrapper for the top child component. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  IContainerm_container + +
+          Containing binding definition structure.
+private  IContextObjm_contextObject + +
+          Context object.
+private  booleanm_isSynthetic + +
+          Synthetic reference added to empty collection flag
+private  NameDefinitionm_name + +
+          Name from reference (only allowed with abstract mappings)
+private  PropertyDefinitionm_property + +
+          Property definition.
+private  java.lang.Stringm_type + +
+          Fully qualified name of mapped type, or type name for mapping.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
MappingReference(IContainer contain, + PropertyDefinition prop, + java.lang.String type, + IContextObj objc, + NameDefinition name, + boolean synth) + +
+          Constructor from property and type.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeMarshal, genAttributeUnmarshal, genAttrPresentTest, genContentMarshal, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Property definition. +

+

+
+
+
+ +

+m_type

+
+private java.lang.String m_type
+
+
Fully qualified name of mapped type, or type name for mapping. +

+

+
+
+
+ +

+m_contextObject

+
+private final IContextObj m_contextObject
+
+
Context object. +

+

+
+
+
+ +

+m_name

+
+private final NameDefinition m_name
+
+
Name from reference (only allowed with abstract mappings) +

+

+
+
+
+ +

+m_isSynthetic

+
+private final boolean m_isSynthetic
+
+
Synthetic reference added to empty collection flag +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MappingReference

+
+public MappingReference(IContainer contain,
+                        PropertyDefinition prop,
+                        java.lang.String type,
+                        IContextObj objc,
+                        NameDefinition name,
+                        boolean synth)
+
+
Constructor from property and type. +

+

+
Parameters:
contain - containing binding definition structure
prop - property definition
type - fully qualified name of mapped type (may also be type name + for abstract mapping)
objc - current object context
name - reference name definition (only allowed with abstract + mappings)
synth - sythentic reference added to empty collection flag
+
+ + + + + + + + +
+Method Detail
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
Overrides:
getType in class PassThroughComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class PassThroughComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/StructureReference.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/StructureReference.html @@ -0,0 +1,532 @@ + + + + + + +StructureReference (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class StructureReference

+
+java.lang.Object
+  extended by org.jibx.binding.def.PassThroughComponent
+      extended by org.jibx.binding.def.StructureReference
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class StructureReference
extends PassThroughComponent
+ + +

+Reference to a structure definition. This is used as a placeholder when + building the component structure of a binding definition. It's necessary + because the referenced structure may not have been parsed yet. During the + linkage phase that follows parsing this looks up the appropriate structure + definition and sets up the corresponding component structure. Thereafter it + operates as a simple pass-through wrapper for the top child component. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  IContainerm_container + +
+          Containing binding component.
+private  IContextObjm_contextObject + +
+          Containing binding definition structure.
+private  java.lang.Stringm_label + +
+          Identifier for referenced structure definition.
+private  booleanm_needLoad + +
+          Object load needed for marshalling flag (used with object binding).
+private  PropertyDefinitionm_property + +
+          Property definition (may be null).
+private  booleanm_skipMarshal + +
+          Flag for marshalling code generation to be skipped by component.
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.PassThroughComponent
m_component
+  + + + + + + + + + + +
+Constructor Summary
StructureReference(IContainer contain, + java.lang.String label, + PropertyDefinition prop, + boolean hasname, + IContextObj cobj) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.PassThroughComponent
checkContentSequence, genAttributeUnmarshal, genAttrPresentTest, genContentPresentTest, genContentUnmarshal, genLoadId, genNewInstance, getType, hasAttribute, hasContent, hasId, isOptional, setWrappedComponent
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_container

+
+private final IContainer m_container
+
+
Containing binding component. +

+

+
+
+
+ +

+m_contextObject

+
+private final IContextObj m_contextObject
+
+
Containing binding definition structure. +

+

+
+
+
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Property definition (may be null). +

+

+
+
+
+ +

+m_label

+
+private final java.lang.String m_label
+
+
Identifier for referenced structure definition. +

+

+
+
+
+ +

+m_skipMarshal

+
+private boolean m_skipMarshal
+
+
Flag for marshalling code generation to be skipped by component. +

+

+
+
+
+ +

+m_needLoad

+
+private boolean m_needLoad
+
+
Object load needed for marshalling flag (used with object binding). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+StructureReference

+
+public StructureReference(IContainer contain,
+                          java.lang.String label,
+                          PropertyDefinition prop,
+                          boolean hasname,
+                          IContextObj cobj)
+
+
Constructor. +

+

+
Parameters:
contain - containing binding component
label - reference structure identifier
prop - property definition (may be null)
hasname - element name used with reference flag
cobj - context object
+
+ + + + + + + + +
+Method Detail
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
Overrides:
genAttributeMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
Overrides:
genContentMarshal in class PassThroughComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
Overrides:
setLinkages in class PassThroughComponent
+
+
+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
Overrides:
print in class PassThroughComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/DirectGeneric.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/DirectGeneric.html @@ -0,0 +1,1000 @@ + + + + + + +DirectGeneric (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class DirectGeneric

+
+java.lang.Object
+  extended by org.jibx.binding.def.DirectGeneric
+
+
+
All Implemented Interfaces:
IComponent
+
+
+
+
public class DirectGeneric
extends java.lang.Object
implements IComponent
+ + +

+Linkage to generic object with defined marshaller and/or unmarshaller. This + provides methods used to generate code for marshalling and unmarshalling + objects of types unknown at binding time, so long as they have mappings + defined. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringISEND_METHOD + +
+           
+private static java.lang.StringISEND_SIGNATURE + +
+           
+private  PropertyDefinitionm_property + +
+          Optional property definition.
+private  java.lang.Stringm_type + +
+          Type handled by this binding.
+private static java.lang.StringMARSHALLABLE_INTERFACE + +
+           
+private static java.lang.StringMARSHALLABLE_METHOD + +
+           
+private static java.lang.StringMARSHALLABLE_SIGNATURE + +
+           
+private static java.lang.StringUNMARSHALELEMENT_METHOD + +
+           
+private static java.lang.StringUNMARSHALELEMENT_SIGNATURE + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
DirectGeneric(IContainer parent, + java.lang.String type) + +
+          Constructor without implicit property.
DirectGeneric(IContainer parent, + java.lang.String type, + PropertyDefinition prop) + +
+          Constructor with defined property.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for content present.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ voidgenMarshal(ContextMethodBuilder mb) + +
+          Generate marshalling code for this mapping.
+ voidgenNewInstance(ContextMethodBuilder mb) + +
+          Generate code to create new instance of object.
+ voidgenTestPresent(ContextMethodBuilder mb) + +
+          Generate presence test code for this mapping.
+ voidgenUnmarshal(ContextMethodBuilder mb) + +
+          Generate unmarshalling code for this mapping.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ booleanisOptional() + +
+          Check if component is an optional item.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+ISEND_METHOD

+
+private static final java.lang.String ISEND_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ISEND_SIGNATURE

+
+private static final java.lang.String ISEND_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALELEMENT_METHOD

+
+private static final java.lang.String UNMARSHALELEMENT_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALELEMENT_SIGNATURE

+
+private static final java.lang.String UNMARSHALELEMENT_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLABLE_INTERFACE

+
+private static final java.lang.String MARSHALLABLE_INTERFACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLABLE_METHOD

+
+private static final java.lang.String MARSHALLABLE_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHALLABLE_SIGNATURE

+
+private static final java.lang.String MARSHALLABLE_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+m_type

+
+private final java.lang.String m_type
+
+
Type handled by this binding. +

+

+
+
+
+ +

+m_property

+
+private final PropertyDefinition m_property
+
+
Optional property definition. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+DirectGeneric

+
+public DirectGeneric(IContainer parent,
+                     java.lang.String type)
+
+
Constructor without implicit property. +

+

+
Parameters:
parent - containing binding definition structure
type - fully qualified class name of object type handled by this + binding (null if unspecified)
+
+
+ +

+DirectGeneric

+
+public DirectGeneric(IContainer parent,
+                     java.lang.String type,
+                     PropertyDefinition prop)
+
+
Constructor with defined property. +

+

+
Parameters:
parent - containing binding definition structure
type - fully qualified class name of object type handled by this + binding (null if unspecified)
prop - associated property information
+
+ + + + + + + + +
+Method Detail
+ +

+genTestPresent

+
+public void genTestPresent(ContextMethodBuilder mb)
+
+
Generate presence test code for this mapping. The generated code just + checks that a start tag is next in the document, rather than an end tag. +

+

+
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genUnmarshal

+
+public void genUnmarshal(ContextMethodBuilder mb)
+                  throws JiBXException
+
+
Generate unmarshalling code for this mapping. The generated code just + calls the generic unmarshal element method, leaving the unmarshalled + object on the stack (after casting it, if necessary, to the appropriate + type). + TODO: Instead call unmarshalling method with class passed directly, for + better error reporting. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException
+
+
+
+ +

+genMarshal

+
+public void genMarshal(ContextMethodBuilder mb)
+                throws JiBXException
+
+
Generate marshalling code for this mapping. The generated code loads the + object reference and casts it to the generic marshal interface, then + calls the marshal method of that interface. +

+

+
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException
+
+
+
+ +

+isOptional

+
+public boolean isOptional()
+
+
Description copied from interface: IComponent
+
Check if component is an optional item. +

+

+
Specified by:
isOptional in interface IComponent
+
+
+ +
Returns:
true if optional, false if required
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+
Specified by:
hasAttribute in interface IComponent
+
+
+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Specified by:
genAttrPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genAttributeUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genAttributeMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentPresentTest

+
+public void genContentPresentTest(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for content present. This generates code that + tests if a required element is present, leaving the result of the test + (zero if missing, nonzero if present) on the stack. This call is only + valid if this component has one or more content components for the + containing element. +

+

+
Specified by:
genContentPresentTest in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Specified by:
genContentUnmarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Specified by:
genContentMarshal in interface IComponent
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genNewInstance

+
+public void genNewInstance(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to create new instance of object. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for creating + an instance of the object to be unmarshalled, leaving the object + reference on the stack. +

+

+
Specified by:
genNewInstance in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+
Specified by:
hasId in interface IComponent
+
+
+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Specified by:
genLoadId in interface IComponent
+
+
+
Parameters:
mb - method builder
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Specified by:
checkContentSequence in interface IComponent
+
+
+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+
Specified by:
setLinkages in interface IComponent
+
+
+
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
Specified by:
print in interface IComponent
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.AddStore.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.AddStore.html @@ -0,0 +1,339 @@ + + + + + + +NestedCollection.AddStore (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.AddStore

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionStore
+      extended by org.jibx.binding.def.NestedCollection.AddStore
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.AddStore
extends NestedCollection.CollectionStore
+ + +

+Collection item store strategy for collection with add method. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  ClassItemm_addMethod + +
+          Method used to add item to collection.
+private  booleanm_isReturned + +
+          Flag for method returns result.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.AddStore(ClassItem add, + boolean ret) + +
+          Constructor.
+  + + + + + + + + + + + +
+Method Summary
+protected  voidgenStoreItem(ContextMethodBuilder mb) + +
+          Generate code to store next item to collection.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.NestedCollection.CollectionStore
genStoreDone, genStoreInit
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_addMethod

+
+private final ClassItem m_addMethod
+
+
Method used to add item to collection. +

+

+
+
+
+ +

+m_isReturned

+
+private final boolean m_isReturned
+
+
Flag for method returns result. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.AddStore

+
+NestedCollection.AddStore(ClassItem add,
+                          boolean ret)
+
+
Constructor. +

+

+
Parameters:
add - method used to add item to collection
ret - value returned by add flag
+
+ + + + + + + + +
+Method Detail
+ +

+genStoreItem

+
+protected void genStoreItem(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to store next item to collection. This generates the + necessary code for handling the store operation, removing the item + from the stack. The NestedCollection.CollectionStore.genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called + before calling this method, and the NestedCollection.CollectionStore.genStoreDone(org.jibx.binding.classes.ContextMethodBuilder) method must + be called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genStoreItem in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.CollectionStore.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.CollectionStore.html @@ -0,0 +1,321 @@ + + + + + + +NestedCollection.CollectionStore (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.CollectionStore

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionStore
+
+
+
Direct Known Subclasses:
NestedCollection.AddStore, NestedCollection.ArrayStore, NestedCollection.IndexedStore
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
abstract static class NestedCollection.CollectionStore
extends java.lang.Object
+ + +

+Base class for collection item store strategy. The implementation class + must handle the appropriate form of code generation for the type of + collection being used. +

+ +

+


+ +

+ + + + + + + + + + + +
+Constructor Summary
NestedCollection.CollectionStore() + +
+           
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenStoreDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after storing items to collection.
+protected  voidgenStoreInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for storing items.
+protected abstract  voidgenStoreItem(ContextMethodBuilder mb) + +
+          Generate code to store next item to collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.CollectionStore

+
+NestedCollection.CollectionStore()
+
+
+ + + + + + + + +
+Method Detail
+ +

+genStoreInit

+
+protected void genStoreInit(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Generate code to initialize collection for storing items. This + generates the necessary code for handling the initialization, + including creating the collection object if appropriate. It must be + called before attempting to call the genStoreItem(org.jibx.binding.classes.ContextMethodBuilder) method. + The base class implementation does nothing. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreItem

+
+protected abstract void genStoreItem(ContextMethodBuilder mb)
+                              throws JiBXException
+
+
Generate code to store next item to collection. This generates the + necessary code for handling the store operation, removing the item + from the stack. The genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called + before calling this method, and the genStoreDone(org.jibx.binding.classes.ContextMethodBuilder) method must + be called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreDone

+
+protected void genStoreDone(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Generate code to clean up after storing items to collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to genStoreItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/IContextObj.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/IContextObj.html @@ -0,0 +1,239 @@ + + + + + + +IContextObj (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Interface IContextObj

+
+
All Known Implementing Classes:
ObjectBinding
+
+
+
+
public interface IContextObj
+ + +

+Containing object context interface. This interface is implemented by binding + definition components that link to objects and can contain nested components. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ BoundClassgetBoundClass() + +
+          Get class linked to binding element.
+ booleansetIdChild(IComponent child) + +
+          Set ID property.
+  +

+ + + + + + + + +
+Method Detail
+ +

+getBoundClass

+
+BoundClass getBoundClass()
+
+
Get class linked to binding element. +

+

+ +
Returns:
information for class linked by binding
+
+
+
+ +

+setIdChild

+
+boolean setIdChild(IComponent child)
+
+
Set ID property. Tells the parent binding element that a particular + child defines an ID property for the class linked to the parent. +

+

+
Parameters:
child - child defining the ID property +
Returns:
true if successful, false if ID + already defined
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.ArrayStore.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.ArrayStore.html @@ -0,0 +1,371 @@ + + + + + + +NestedCollection.ArrayStore (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.ArrayStore

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionStore
+      extended by org.jibx.binding.def.NestedCollection.ArrayStore
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.ArrayStore
extends NestedCollection.CollectionStore
+ + +

+Collection item store strategy for array. +

+ +

+


+ +

+ + + + + + + + + + + +
+Field Summary
+private  java.lang.Stringm_itemType + +
+          Array item type.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.ArrayStore(java.lang.String itype) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenStoreDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after storing items to collection.
+protected  voidgenStoreInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for storing items.
+protected  voidgenStoreItem(ContextMethodBuilder mb) + +
+          Generate code to store next item to collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_itemType

+
+private final java.lang.String m_itemType
+
+
Array item type. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.ArrayStore

+
+NestedCollection.ArrayStore(java.lang.String itype)
+
+
Constructor. +

+

+
Parameters:
itype - array item type
+
+ + + + + + + + +
+Method Detail
+ +

+genStoreInit

+
+protected void genStoreInit(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to initialize collection for storing items. This + generates the necessary code for handling the initialization, + including creating the collection object if appropriate. It must be + called before attempting to call the NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder) method. + The base class implementation does nothing. +

+

+
Overrides:
genStoreInit in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreItem

+
+protected void genStoreItem(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to store next item to collection. This generates the + necessary code for handling the store operation, removing the item + from the stack. The NestedCollection.CollectionStore.genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called + before calling this method, and the NestedCollection.CollectionStore.genStoreDone(org.jibx.binding.classes.ContextMethodBuilder) method must + be called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genStoreItem in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreDone

+
+protected void genStoreDone(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to clean up after storing items to collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Overrides:
genStoreDone in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedStructure.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedStructure.html @@ -0,0 +1,755 @@ + + + + + + +NestedStructure (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedStructure

+
+java.lang.Object
+  extended by org.jibx.binding.def.BindingBuilder.ContainerBase
+      extended by org.jibx.binding.def.NestedBase
+          extended by org.jibx.binding.def.NestedStructure
+
+
+
All Implemented Interfaces:
IComponent, IContainer
+
+
+
+
public class NestedStructure
extends NestedBase
+ + +

+Structure binding definition. This handles one or more child components, + which may be ordered or unordered. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_hasObject + +
+          Flag for structure has associated object.
+private  IComponentm_idChild + +
+          Child supplying ID for bound class.
+protected  booleanm_isChoice + +
+          Flag for choice of child content (used by subclasses).
+private  booleanm_isLinked + +
+          Flag for already linked (to avoid multiple passes).
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.NestedBase
m_attributes, m_contents, m_isOrdered
+ + + + + + + +
Fields inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
m_accessLevel, m_autoLink, m_container, m_nameStyle, m_stripPrefix, m_stripSuffix, m_styleDefault
+  + + + + + + + + + + +
+Constructor Summary
NestedStructure(IContainer parent, + IContextObj objc, + boolean ord, + boolean choice, + boolean ctx, + boolean hasobj) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleancheckContentSequence(boolean text) + +
+          Check sequence of content values.
+ voidgenAttributeMarshal(ContextMethodBuilder mb) + +
+          Generate attribute marshalling code.
+ voidgenAttributeUnmarshal(ContextMethodBuilder mb) + +
+          Generate attribute unmarshalling code.
+ voidgenAttrPresentTest(ContextMethodBuilder mb) + +
+          Generate code to test for attribute present.
+ voidgenContentMarshal(ContextMethodBuilder mb) + +
+          Generate element or text marshalling code.
+ voidgenContentUnmarshal(ContextMethodBuilder mb) + +
+          Generate element or text unmarshalling code.
+ voidgenLoadId(ContextMethodBuilder mb) + +
+          Generate code to load ID value of instance to stack.
+ java.lang.StringgetType() + +
+          Get type expected by component.
+ booleanhasAttribute() + +
+          Check if component defines one or more attribute values of the + containing element.
+ booleanhasContent() + +
+          Check if component defines one or more elements or text values as + children of the containing element.
+ booleanhasId() + +
+          Check if component defines an ID value for instances of context object.
+ voidprint(int depth) + +
+           
+ voidsetLinkages() + +
+          Establish and validate linkages between binding components.
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.NestedBase
addComponent, genContentPresentTest, genNewInstance, getAttributes, getBindingRoot, getContents, getDefinitionContext, hasNamespaces, isContentOrdered, isOptional
+ + + + + + + +
Methods inherited from class org.jibx.binding.def.BindingBuilder.ContainerBase
getStyleDefault, unmarshal
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.binding.def.IContainer
getStyleDefault
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_idChild

+
+private IComponent m_idChild
+
+
Child supplying ID for bound class. +

+

+
+
+
+ +

+m_isChoice

+
+protected final boolean m_isChoice
+
+
Flag for choice of child content (used by subclasses). +

+

+
+
+
+ +

+m_hasObject

+
+private final boolean m_hasObject
+
+
Flag for structure has associated object. +

+

+
+
+
+ +

+m_isLinked

+
+private boolean m_isLinked
+
+
Flag for already linked (to avoid multiple passes). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedStructure

+
+public NestedStructure(IContainer parent,
+                       IContextObj objc,
+                       boolean ord,
+                       boolean choice,
+                       boolean ctx,
+                       boolean hasobj)
+
+
Constructor. +

+

+
Parameters:
parent - containing binding definition context
objc - current object context
ord - ordered content flag
choice - choice content flag
ctx - define context for structure flag
+
+ + + + + + + + +
+Method Detail
+ +

+hasAttribute

+
+public boolean hasAttribute()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more attribute values of the + containing element. +

+

+ +
Returns:
true if one or more attribute values defined for + containing element, false if not
+
+
+
+ +

+genAttrPresentTest

+
+public void genAttrPresentTest(ContextMethodBuilder mb)
+                        throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to test for attribute present. This generates code that + tests if a child is present as determined by attributes of the containing + start tag. It leaves the result of the test (zero if missing, nonzero if + present) on the stack. This call is only valid if this component has one + or more attributes for the containing element. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+genAttributeUnmarshal

+
+public void genAttributeUnmarshal(ContextMethodBuilder mb)
+                           throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute unmarshalling code. This is called within the code + generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genAttributeMarshal

+
+public void genAttributeMarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate attribute marshalling code. This is called within the code + generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for handling + the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+hasContent

+
+public boolean hasContent()
+
+
Description copied from interface: IComponent
+
Check if component defines one or more elements or text values as + children of the containing element. This method is only valid after the + call to IComponent.setLinkages(). +

+

+
Specified by:
hasContent in interface IComponent
Overrides:
hasContent in class NestedBase
+
+
+ +
Returns:
true if one or more content values defined + for containing element, false if not
+
+
+
+ +

+genContentUnmarshal

+
+public void genContentUnmarshal(ContextMethodBuilder mb)
+                         throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text unmarshalling code. This is called within the + code generation for the unmarshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the unmarshalling operation, leaving the unmarshalled object + reference on the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genContentMarshal

+
+public void genContentMarshal(ContextMethodBuilder mb)
+                       throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate element or text marshalling code. This is called within the + code generation for the marshaller of the class associated with the + containing element. It needs to generate the necessary code for + handling the marshalling operation, consuming the marshalled object + reference from the stack. +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+getType

+
+public java.lang.String getType()
+
+
Description copied from interface: IComponent
+
Get type expected by component. +

+

+
Specified by:
getType in interface IComponent
Overrides:
getType in class NestedBase
+
+
+ +
Returns:
fully qualified class name of expected type
+
+
+
+ +

+hasId

+
+public boolean hasId()
+
+
Description copied from interface: IComponent
+
Check if component defines an ID value for instances of context object. +

+

+ +
Returns:
true if ID value defined for instances, + false if not
+
+
+
+ +

+genLoadId

+
+public void genLoadId(ContextMethodBuilder mb)
+               throws JiBXException
+
+
Description copied from interface: IComponent
+
Generate code to load ID value of instance to stack. The generated code + should assume that the top of the stack is the reference for the + containing object. It must consume this and leave the actual ID value + on the stack (as a String). +

+

+
Parameters:
mb - method builder +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+checkContentSequence

+
+public boolean checkContentSequence(boolean text)
+                             throws JiBXException
+
+
Description copied from interface: IComponent
+
Check sequence of content values. Validates the sequence of content + items, ensuring that text values only occur immediately following a + required element value (or the start tag for the enclosing element). +

+

+
Parameters:
text - allow text value flag from last component +
Returns:
allow text value as next content component flag +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+setLinkages

+
+public void setLinkages()
+                 throws JiBXException
+
+
Description copied from interface: IComponent
+
Establish and validate linkages between binding components. This is + called after the basic binding structures have been set up. All linkages + between components must be resolved by this method, in order to prevent + problems due to the order of definitions between components. This implies + that each component must in turn call the same method for each child + component. None of the other method calls defined by this interface are + valid until after this call. +

+

+ +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+print

+
+public void print(int depth)
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/def/NestedCollection.IndexedStore.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/def/NestedCollection.IndexedStore.html @@ -0,0 +1,394 @@ + + + + + + +NestedCollection.IndexedStore (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.def +
+Class NestedCollection.IndexedStore

+
+java.lang.Object
+  extended by org.jibx.binding.def.NestedCollection.CollectionStore
+      extended by org.jibx.binding.def.NestedCollection.IndexedStore
+
+
+
Enclosing class:
NestedCollection
+
+
+
+
static class NestedCollection.IndexedStore
extends NestedCollection.CollectionStore
+ + +

+Collection item store strategy for collection with items set by + index number. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  booleanm_isReturned + +
+          Flag for method returns result.
+private  ClassItemm_setMethod + +
+          Method used to set items by index in collection.
+  + + + + + + + + + + +
+Constructor Summary
NestedCollection.IndexedStore(ClassItem set, + boolean ret) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidgenStoreDone(ContextMethodBuilder mb) + +
+          Generate code to clean up after storing items to collection.
+protected  voidgenStoreInit(ContextMethodBuilder mb) + +
+          Generate code to initialize collection for storing items.
+protected  voidgenStoreItem(ContextMethodBuilder mb) + +
+          Generate code to store next item to collection.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_setMethod

+
+private final ClassItem m_setMethod
+
+
Method used to set items by index in collection. +

+

+
+
+
+ +

+m_isReturned

+
+private final boolean m_isReturned
+
+
Flag for method returns result. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+NestedCollection.IndexedStore

+
+NestedCollection.IndexedStore(ClassItem set,
+                              boolean ret)
+
+
Constructor. +

+

+
Parameters:
set - method used to store items by index in collection
ret - value returned by add flag
+
+ + + + + + + + +
+Method Detail
+ +

+genStoreInit

+
+protected void genStoreInit(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to initialize collection for storing items. This + generates the necessary code for handling the initialization, + including creating the collection object if appropriate. It must be + called before attempting to call the NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder) method. + The base class implementation does nothing. +

+

+
Overrides:
genStoreInit in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreItem

+
+protected void genStoreItem(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to store next item to collection. This generates the + necessary code for handling the store operation, removing the item + from the stack. The NestedCollection.CollectionStore.genStoreInit(org.jibx.binding.classes.ContextMethodBuilder) method must be called + before calling this method, and the NestedCollection.CollectionStore.genStoreDone(org.jibx.binding.classes.ContextMethodBuilder) method must + be called after the last call to this method. This method must be + overridden by each subclass. +

+

+
Specified by:
genStoreItem in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+
+ +

+genStoreDone

+
+protected void genStoreDone(ContextMethodBuilder mb)
+                     throws JiBXException
+
+
Description copied from class: NestedCollection.CollectionStore
+
Generate code to clean up after storing items to collection. This + generates the necessary code for handling the clean up. It must be + called after the last call to NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder). The base class + implementation does nothing. +

+

+
Overrides:
genStoreDone in class NestedCollection.CollectionStore
+
+
+
Parameters:
mb - method builder +
Throws: +
JiBXException - if error in configuration
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/BindingMethod.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/BindingMethod.html @@ -0,0 +1,543 @@ + + + + + + +BindingMethod (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class BindingMethod

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+
+
+
Direct Known Subclasses:
ExistingMethod, MethodBuilder
+
+
+
+
public abstract class BindingMethod
extends java.lang.Object
+ + +

+Binding method information. Tracks a method used by the binding code, + supplying hash code and equality checking based on the method signature and + actual byte code of the method, ignoring the method name. This allows + comparisons between methods generated by different bindings, and between + generated and existing methods. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private  ClassFilem_classFile + +
+          Owning class file information.
+  + + + + + + + + + + + +
+Constructor Summary
+protected BindingMethod(ClassFile cf) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static intcomputeMethodHash(org.apache.bcel.classfile.Method method) + +
+          Computes the hash code for a method.
+ booleanequals(java.lang.Object obj) + +
+          Check if objects are equal.
+abstract  intgetAccessFlags() + +
+          Get access flags.
+ ClassFilegetClassFile() + +
+          Get class file containing method.
+abstract  ClassItemgetItem() + +
+          Get the method item.
+abstract  org.apache.bcel.classfile.MethodgetMethod() + +
+          Get the actual method.
+abstract  java.lang.StringgetName() + +
+          Get name of method.
+abstract  java.lang.StringgetSignature() + +
+          Get signature.
+abstract  inthashCode() + +
+          Get hash code.
+ voidmakeAccessible(ClassFile src) + +
+          Make accessible method.
+abstract  voidsetAccessFlags(int flags) + +
+          Set access flags.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_classFile

+
+private ClassFile m_classFile
+
+
Owning class file information. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingMethod

+
+protected BindingMethod(ClassFile cf)
+
+
Constructor. +

+

+
Parameters:
cf - owning class file information
+
+ + + + + + + + +
+Method Detail
+ +

+getClassFile

+
+public ClassFile getClassFile()
+
+
Get class file containing method. +

+

+ +
Returns:
class file owning this method
+
+
+
+ +

+getName

+
+public abstract java.lang.String getName()
+
+
Get name of method. This abstract method must be implemented by every + subclass. +

+

+ +
Returns:
method name
+
+
+
+ +

+getSignature

+
+public abstract java.lang.String getSignature()
+
+
Get signature. This abstract method must be implemented by every + subclass. +

+

+ +
Returns:
signature for method
+
+
+
+ +

+getAccessFlags

+
+public abstract int getAccessFlags()
+
+
Get access flags. This abstract method must be implemented by every + subclass. +

+

+ +
Returns:
flags for access type of method
+
+
+
+ +

+setAccessFlags

+
+public abstract void setAccessFlags(int flags)
+
+
Set access flags. This abstract method must be implemented by every + subclass. +

+

+
Parameters:
flags - access type to be set
+
+
+
+ +

+getMethod

+
+public abstract org.apache.bcel.classfile.Method getMethod()
+
+
Get the actual method. +

+

+ +
Returns:
method information
+
+
+
+ +

+getItem

+
+public abstract ClassItem getItem()
+
+
Get the method item. +

+

+ +
Returns:
method item information
+
+
+
+ +

+makeAccessible

+
+public void makeAccessible(ClassFile src)
+
+
Make accessible method. Check if this method is accessible from another + class, and if not decreases the access restrictions to make it + accessible. +

+

+
Parameters:
src - class file for required access
+
+
+
+ +

+computeMethodHash

+
+public static int computeMethodHash(org.apache.bcel.classfile.Method method)
+
+
Computes the hash code for a method. The hash code is based on the + method signature, the exceptions thrown, and the actual byte code + (including the exception handlers). +

+

+ +
Returns:
computed hash code for method
+
+
+
+ +

+hashCode

+
+public abstract int hashCode()
+
+
Get hash code. This abstract method must be implemented by every + subclass, using the same algorithm in each case. See one of the existing + subclasses for details. +

+

+
Overrides:
hashCode in class java.lang.Object
+
+
+ +
Returns:
hash code for this method
+
+
+
+ +

+equals

+
+public boolean equals(java.lang.Object obj)
+
+
Check if objects are equal. Compares first based on hash code, then on + the actual byte code sequence. +

+

+
Overrides:
equals in class java.lang.Object
+
+
+ +
Returns:
true if equal objects, false if not
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ClassCache.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ClassCache.html @@ -0,0 +1,441 @@ + + + + + + +ClassCache (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ClassCache

+
+java.lang.Object
+  extended by org.jibx.binding.classes.ClassCache
+
+
+
+
public class ClassCache
extends java.lang.Object
+ + +

+Cache for class files being modified. Handles loading and saving of class + files. Classes are loaded directly from the file system paths supplied on + initialization in preference to the system class path. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  java.util.HashMapm_classMap + +
+          Map from class names to actual class information.
+private  java.lang.String[]m_paths + +
+          Paths to be searched for class files.
+private  java.io.File[]m_roots + +
+          Root directories corresponding to paths.
+private static ClassCaches_instance + +
+          Singleton instance of class (created when paths set)
+  + + + + + + + + + + + +
+Constructor Summary
+private ClassCache(java.lang.String[] paths) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+(package private) static voidaddClassFile(ClassFile cf) + +
+          Add created class information to cache.
+static ClassFilegetClassFile(java.lang.String name) + +
+          Get class information.
+private  ClassFilegetClassFileImpl(java.lang.String name) + +
+          Get class information.
+static voidsetPaths(java.lang.String[] paths) + +
+          Set class paths to be searched.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_instance

+
+private static ClassCache s_instance
+
+
Singleton instance of class (created when paths set) +

+

+
+
+
+ +

+m_paths

+
+private java.lang.String[] m_paths
+
+
Paths to be searched for class files. +

+

+
+
+
+ +

+m_roots

+
+private java.io.File[] m_roots
+
+
Root directories corresponding to paths. +

+

+
+
+
+ +

+m_classMap

+
+private java.util.HashMap m_classMap
+
+
Map from class names to actual class information. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ClassCache

+
+private ClassCache(java.lang.String[] paths)
+
+
Constructor. Discards jar file paths and normalizes all other paths + (except the empty path) to end with the system path separator character. +

+

+
Parameters:
paths - ordered set of paths to be searched for class files
+
+ + + + + + + + +
+Method Detail
+ +

+getClassFileImpl

+
+private ClassFile getClassFileImpl(java.lang.String name)
+                            throws JiBXException
+
+
Get class information. Looks up the class in cache, and if not already + present tries to find it based on the class file search path list. If + the class file is found it is loaded and this method calls itself + recursively to load the whole hierarchy of superclasses. +

+

+
Parameters:
name - fully-qualified name of class to be found +
Returns:
class information, or null if class not found +
Throws: +
JiBXException - on any error accessing class file
+
+
+
+ +

+getClassFile

+
+public static ClassFile getClassFile(java.lang.String name)
+                              throws JiBXException
+
+
Get class information. Looks up the class in cache, and if not already + present tries to find it based on the class file search path list. If + the class file is found it is loaded along with all superclasses. +

+

+
Parameters:
name - fully-qualified name of class to be found +
Returns:
class information, or null if class not found +
Throws: +
JiBXException - on any error accessing class file
+
+
+
+ +

+addClassFile

+
+static void addClassFile(ClassFile cf)
+
+
Add created class information to cache. +

+

+
Parameters:
cf - information for class to be added
+
+
+
+ +

+setPaths

+
+public static void setPaths(java.lang.String[] paths)
+
+
Set class paths to be searched. Discards jar file paths and normalizes + all other paths (except the empty path) to end with the system path + separator character. +

+

+
Parameters:
paths - ordered set of paths to be searched for class files
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/BoundClass.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/BoundClass.html @@ -0,0 +1,936 @@ + + + + + + +BoundClass (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class BoundClass

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BoundClass
+
+
+
+
public class BoundClass
extends java.lang.Object
+ + +

+Bound class handler. Each instance controls and organizes information for a + class included in one or more binding definitions. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringACCESS_PREFIX + +
+          Prefix used for access methods.
+private static org.apache.bcel.generic.Type[]EMPTY_TYPE_ARGS + +
+          Empty argument type array.
+private static java.lang.StringGENERIC_MUNGE_CLASS + +
+          Class used for code munging when no specific class available.
+private  ClassFilem_boundClass + +
+          Bound class file information.
+private  java.util.HashMapm_loadMap + +
+          Map from field or method to load access method (lazy create, + null if not used).
+private  MungedClassm_mungedClass + +
+          Class receiving code generated for target class.
+private  java.util.HashMapm_storeMap + +
+          Map from field or method to store access method (lazy create, + null if not used).
+private static MungedClasss_genericMunge + +
+          Class used for code generation proxy with unmodifiable classes.
+private static java.lang.Strings_modifyPackage + +
+          Package of first modifiable class.
+private static java.io.Files_modifyRoot + +
+          Root for package of first modifiable class.
+private static java.util.HashMaps_nameMap + +
+          Map from bound class name (or bound and munged combination) to binding + information.
+  + + + + + + + + + + + +
+Constructor Summary
+private BoundClass(ClassFile bound, + MungedClass munge) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddFactory(java.lang.String fact) + +
+          Add binding factory to class.
+private static BoundClasscreateInstance(java.lang.String key, + ClassFile bound, + MungedClass munge) + +
+          Create binding information for class.
+ java.lang.StringderiveClassName(java.lang.String prefix, + java.lang.String suffix) + +
+          Derive generated class name for bound class.
+private static BoundClassfindOrCreateInstance(ClassFile bound, + MungedClass munge) + +
+          Find or create binding information for class.
+ ClassFilegetClassFile() + +
+          Get bound class file information.
+ java.lang.StringgetClassName() + +
+          Get bound class file name.
+static BoundClassgetInstance(ClassFile cf, + BoundClass context) + +
+          Get binding information for class.
+static BoundClassgetInstance(java.lang.String name, + BoundClass context) + +
+          Get binding information for class.
+ ClassItemgetLoadMethod(ClassItem item, + ClassFile from) + +
+          Get load access method for member of this class.
+ ClassFilegetMungedFile() + +
+          Get munged class file information.
+ ClassItemgetStoreMethod(ClassItem item, + ClassFile from) + +
+          Get store access method for member of this class.
+ BindingMethodgetUniqueMethod(MethodBuilder builder) + +
+          Get unique method.
+ BindingMethodgetUniqueNamed(MethodBuilder builder) + +
+          Get unique method.
+ booleanisDirectAccess() + +
+          Check if class being changed directly.
+static voidreset() + +
+          Discard cached information and reset in preparation for a new binding + run.
+ voidsetFactoryList() + +
+          Generate factory list.
+static voidsetModify(java.io.File root, + java.lang.String pkg) + +
+          Discard cached information and reset in preparation for a new binding + run.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+GENERIC_MUNGE_CLASS

+
+private static final java.lang.String GENERIC_MUNGE_CLASS
+
+
Class used for code munging when no specific class available. +

+

+
See Also:
Constant Field Values
+
+
+ +

+ACCESS_PREFIX

+
+private static final java.lang.String ACCESS_PREFIX
+
+
Prefix used for access methods. +

+

+
See Also:
Constant Field Values
+
+
+ +

+EMPTY_TYPE_ARGS

+
+private static final org.apache.bcel.generic.Type[] EMPTY_TYPE_ARGS
+
+
Empty argument type array. +

+

+
+
+
+ +

+s_nameMap

+
+private static java.util.HashMap s_nameMap
+
+
Map from bound class name (or bound and munged combination) to binding + information. +

+

+
+
+
+ +

+s_modifyPackage

+
+private static java.lang.String s_modifyPackage
+
+
Package of first modifiable class. +

+

+
+
+
+ +

+s_modifyRoot

+
+private static java.io.File s_modifyRoot
+
+
Root for package of first modifiable class. +

+

+
+
+
+ +

+s_genericMunge

+
+private static MungedClass s_genericMunge
+
+
Class used for code generation proxy with unmodifiable classes. +

+

+
+
+
+ +

+m_boundClass

+
+private final ClassFile m_boundClass
+
+
Bound class file information. +

+

+
+
+
+ +

+m_mungedClass

+
+private final MungedClass m_mungedClass
+
+
Class receiving code generated for target class. +

+

+
+
+
+ +

+m_loadMap

+
+private java.util.HashMap m_loadMap
+
+
Map from field or method to load access method (lazy create, + null if not used). +

+

+
+
+
+ +

+m_storeMap

+
+private java.util.HashMap m_storeMap
+
+
Map from field or method to store access method (lazy create, + null if not used). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BoundClass

+
+private BoundClass(ClassFile bound,
+                   MungedClass munge)
+
+
Constructor. +

+

+
Parameters:
bound - target class file information
munge - class file for class hosting generated code
+
+ + + + + + + + +
+Method Detail
+ +

+getClassFile

+
+public ClassFile getClassFile()
+
+
Get bound class file information. +

+

+ +
Returns:
class file information for bound class
+
+
+
+ +

+getClassName

+
+public java.lang.String getClassName()
+
+
Get bound class file name. +

+

+ +
Returns:
name of bound class
+
+
+
+ +

+getMungedFile

+
+public ClassFile getMungedFile()
+
+
Get munged class file information. +

+

+ +
Returns:
class file information for class being modified
+
+
+
+ +

+isDirectAccess

+
+public boolean isDirectAccess()
+
+
Check if class being changed directly. +

+

+ +
Returns:
true if bound class is being modified, + false if using a surrogate
+
+
+
+ +

+getLoadMethod

+
+public ClassItem getLoadMethod(ClassItem item,
+                               ClassFile from)
+                        throws JiBXException
+
+
Get load access method for member of this class. If the access method + does not already exist it's created by this call. If the access method + does exist but without access from the context class, the access + permission on the method is broadened (from package to protected or + public, or from protected to public). +

+

+
Parameters:
item - field or method to be accessed
from - context class from which access is required +
Returns:
the item itself if it's accessible from the required context, an + access method that is accessible if the item is not itself +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getStoreMethod

+
+public ClassItem getStoreMethod(ClassItem item,
+                                ClassFile from)
+                         throws JiBXException
+
+
Get store access method for member of this class. If the access method + does not already exist it's created by this call. If the access method + does exist but without access from the context class, the access + permission on the method is broadened (from package to protected or + public, or from protected to public). +

+

+
Parameters:
item - field or method to be accessed
from - context class from which access is required +
Returns:
the item itself if it's accessible from the required context, an + access method that is accessible if the item is not itself +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getUniqueMethod

+
+public BindingMethod getUniqueMethod(MethodBuilder builder)
+                              throws JiBXException
+
+
Get unique method. Just delegates to the modified class handling, with + unique suffix appended to method name. +

+

+
Parameters:
builder - method to be defined +
Returns:
defined method item +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getUniqueNamed

+
+public BindingMethod getUniqueNamed(MethodBuilder builder)
+                             throws JiBXException
+
+
Get unique method. Just delegates to the modified class handling. The + supplied name is used without change. +

+

+
Parameters:
builder - method to be defined +
Returns:
defined method item +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+addFactory

+
+public void addFactory(java.lang.String fact)
+
+
Add binding factory to class. Makes sure that there's no surrogate class + for code generation, then delegates to the modified class handling. +

+

+
Parameters:
fact - binding factory name
+
+
+
+ +

+setFactoryList

+
+public void setFactoryList()
+                    throws JiBXException
+
+
Generate factory list. Makes sure that there's no surrogate class for + code generation, then delegates to the modified class handling. +

+

+ +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+createInstance

+
+private static BoundClass createInstance(java.lang.String key,
+                                         ClassFile bound,
+                                         MungedClass munge)
+
+
Create binding information for class. This creates the combination of + bound class and (if different) munged class and adds it to the internal + tables. +

+

+
Parameters:
key - text identifier for this bound class and munged class + combination
bound - class information for bound class
munge - information for surrogate class receiving generated code, or + null if no separate class +
Returns:
binding information for class
+
+
+
+ +

+findOrCreateInstance

+
+private static BoundClass findOrCreateInstance(ClassFile bound,
+                                               MungedClass munge)
+
+
Find or create binding information for class. If the combination of bound + class and munged class already exists it's returned directly, otherwise + it's created and returned. +

+

+
Parameters:
bound - class information for bound class
munge - information for surrogate class receiving generated code +
Returns:
binding information for class
+
+
+
+ +

+getInstance

+
+public static BoundClass getInstance(ClassFile cf,
+                                     BoundClass context)
+                              throws JiBXException
+
+
Get binding information for class. This finds the class in which code + generation for the target class takes place. Normally this class will be + the target class itself, but in cases where the target class is not + modifiable an alternate class will be used. This can take two forms. If + the context class is provided and it is a subclass of the target class, + code for the target class is instead added to the context class. If there + is no context class, or if the context class is not a subclass of the + target class, a unique catch-all class is used. +

+

+
Parameters:
cf - bound class information
context - context class for code generation, or null + if no context +
Returns:
binding information for class +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getInstance

+
+public static BoundClass getInstance(java.lang.String name,
+                                     BoundClass context)
+                              throws JiBXException
+
+
Get binding information for class. This version takes a fully-qualified + class name, calling the paired method if necessary to create a new + instance. +

+

+
Parameters:
name - fully qualified name of bound class
context - context class for code generation, or null + if no context +
Returns:
binding information for class +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+reset

+
+public static void reset()
+
+
Discard cached information and reset in preparation for a new binding + run. +

+

+
+
+
+
+ +

+setModify

+
+public static void setModify(java.io.File root,
+                             java.lang.String pkg)
+
+
Discard cached information and reset in preparation for a new binding + run. +

+

+
+
+
+
+ +

+deriveClassName

+
+public java.lang.String deriveClassName(java.lang.String prefix,
+                                        java.lang.String suffix)
+
+
Derive generated class name for bound class. This generates a JiBX class + name from the name of this class, using the supplied prefix and suffix + information. The derived class name is always in the same package as the + munged class for this class. +

+

+
Parameters:
prefix - generated class name prefix
suffix - generated class name suffix +
Returns:
derived class name
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/MarshalBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/MarshalBuilder.html @@ -0,0 +1,411 @@ + + + + + + +MarshalBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class MarshalBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+          extended by org.jibx.binding.classes.ExceptionMethodBuilder
+              extended by org.jibx.binding.classes.ContextMethodBuilder
+                  extended by org.jibx.binding.classes.MarshalUnmarshalBuilder
+                      extended by org.jibx.binding.classes.MarshalBuilder
+
+
+
+
public class MarshalBuilder
extends MarshalUnmarshalBuilder
+ + +

+Marshalling method builder. Tracks the creation of a marshalling method, + including special handling of exceptions that may be generated by object + accesses during the marshalling process. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static java.lang.StringMARSHAL_EXCEPTION_TEXT + +
+           
+protected static org.apache.bcel.generic.Type[]MARSHAL_METHOD_ARGS + +
+           
+private static java.lang.StringMARSHALCONTEXT_CLASS + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EMPTY_STRING_ARRAY, EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists
+  + + + + + + + + + + +
+Constructor Summary
MarshalBuilder(java.lang.String name, + ClassFile cf, + ClassFile mf) + +
+          Constructor.
+  + + + + + + + + + + + +
+Method Summary
+ org.apache.bcel.generic.InstructionHandlegenExceptionHandler() + +
+          Add exception handler code.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MarshalUnmarshalBuilder
handleExceptions
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ContextMethodBuilder
isStaticMethod, loadContext, loadContext, loadObject, loadObject, setObjectSlot, storeObject
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder
defineSlot, freeSlot, getSlot
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP_X1, appendDUP, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+MARSHALCONTEXT_CLASS

+
+private static final java.lang.String MARSHALCONTEXT_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_EXCEPTION_TEXT

+
+protected static final java.lang.String MARSHAL_EXCEPTION_TEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+MARSHAL_METHOD_ARGS

+
+protected static final org.apache.bcel.generic.Type[] MARSHAL_METHOD_ARGS
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MarshalBuilder

+
+public MarshalBuilder(java.lang.String name,
+                      ClassFile cf,
+                      ClassFile mf)
+               throws JiBXException
+
+
Constructor. This sets up for constructing a marshalling method with + public access and wrapped exception handling. If the method is being + generated directly to the class being marshalled it's built as a virtual + method; otherwise, it's done as a static method. +

+

+
Parameters:
name - method name to be built
cf - owning class file information
mf - method generation class file information +
Throws: +
JiBXException - on error in initializing method construction
+
+ + + + + + + + +
+Method Detail
+ +

+genExceptionHandler

+
+public org.apache.bcel.generic.InstructionHandle genExceptionHandler()
+                                                              throws JiBXException
+
+
Add exception handler code. The implementation of this abstract base + class method provides handling specific to a marshalling method. +

+

+
Specified by:
genExceptionHandler in class MarshalUnmarshalBuilder
+
+
+ +
Returns:
handle for first instruction in handler +
Throws: +
JiBXException - on error in creating exception handler
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/MungedClass.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/MungedClass.html @@ -0,0 +1,797 @@ + + + + + + +MungedClass (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class MungedClass

+
+java.lang.Object
+  extended by org.jibx.binding.classes.MungedClass
+
+
+
+
public class MungedClass
extends java.lang.Object
+ + +

+Modifiable class handler. Each instance controls changes to a particular + class modified by one or more binding definitions. As methods are generated + they're checked for uniqueness. If an already-generated method is found with + the same characteristics (including byte code) as the one being generated, + the already-generated is used instead. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+private static classMungedClass.JiBXFilter + +
+          Filter for class files generated by JiBX.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.StringBINDING_LISTNAME + +
+          Name for list of binding factory names.
+private static ClassFile[]EMPTY_CLASSFILE_ARRAY + +
+          Empty class file array.
+private static java.lang.String[]EXTRA_METHODS_MATCHES + +
+          Name and signature for generated methods without standard prefix.
+private  ClassFilem_classFile + +
+          Munged class file information.
+private  ExistingMethod[]m_existingMethods + +
+          Existing binding methods in class.
+private  java.lang.Stringm_factoryList + +
+          List of factory names for this class.
+private  java.util.HashMapm_methodMap + +
+          Map from method byte code and signature to method item.
+private static java.util.ArrayLists_classes + +
+          Munged class information.
+private static java.util.HashMaps_classMap + +
+          Map from generated class to binding information.
+private static java.util.HashMaps_directories + +
+          Map of directories already checked for JiBX classes.
+private static java.util.HashMaps_nameMap + +
+          Map from class name to binding information.
+private static java.util.ArrayLists_pendingClasses + +
+          Munged classes to be unique-added at end of binding.
+  + + + + + + + + + + + +
+Constructor Summary
+private MungedClass(ClassFile cf) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+(package private)  voidaddFactory(java.lang.String fact) + +
+          Add binding factory to class.
+(package private) static voidcheckDirectory(java.io.File root, + java.lang.String pack) + +
+          Check directory for JiBX generated files.
+static voiddelayedAddUnique(ClassFile cf) + +
+          Add unique support class at end of binding process.
+static ClassFile[][]fixChanges(boolean write) + +
+          Finalize changes to modified class files.
+(package private)  ClassFilegetClassFile() + +
+          Get munged class file information.
+(package private) static MungedClassgetInstance(ClassFile cf) + +
+          Get modification tracking information for class.
+(package private)  BindingMethodgetUniqueMethod(MethodBuilder builder, + boolean suffix) + +
+          Get unique method.
+static ClassFilegetUniqueSupportClass(ClassFile cf) + +
+          Get unique generated support class.
+private  voidpurgeUnusedMethods() + +
+          Delete pre-existing binding methods that are no longer needed.
+static voidreset() + +
+          Discard cached information and reset in preparation for a new binding + run.
+(package private)  voidsetFactoryList() + +
+          Generate factory list.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+EMPTY_CLASSFILE_ARRAY

+
+private static final ClassFile[] EMPTY_CLASSFILE_ARRAY
+
+
Empty class file array. +

+

+
+
+
+ +

+BINDING_LISTNAME

+
+private static final java.lang.String BINDING_LISTNAME
+
+
Name for list of binding factory names. +

+

+
See Also:
Constant Field Values
+
+
+ +

+EXTRA_METHODS_MATCHES

+
+private static final java.lang.String[] EXTRA_METHODS_MATCHES
+
+
Name and signature for generated methods without standard prefix. +

+

+
+
+
+ +

+s_classes

+
+private static java.util.ArrayList s_classes
+
+
Munged class information. +

+

+
+
+
+ +

+s_classMap

+
+private static java.util.HashMap s_classMap
+
+
Map from generated class to binding information. +

+

+
+
+
+ +

+s_directories

+
+private static java.util.HashMap s_directories
+
+
Map of directories already checked for JiBX classes. +

+

+
+
+
+ +

+s_nameMap

+
+private static java.util.HashMap s_nameMap
+
+
Map from class name to binding information. +

+

+
+
+
+ +

+s_pendingClasses

+
+private static java.util.ArrayList s_pendingClasses
+
+
Munged classes to be unique-added at end of binding. +

+

+
+
+
+ +

+m_classFile

+
+private ClassFile m_classFile
+
+
Munged class file information. +

+

+
+
+
+ +

+m_methodMap

+
+private java.util.HashMap m_methodMap
+
+
Map from method byte code and signature to method item. +

+

+
+
+
+ +

+m_existingMethods

+
+private ExistingMethod[] m_existingMethods
+
+
Existing binding methods in class. +

+

+
+
+
+ +

+m_factoryList

+
+private java.lang.String m_factoryList
+
+
List of factory names for this class. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MungedClass

+
+private MungedClass(ClassFile cf)
+
+
Constructor. This sets up for modifying a class with added methods. +

+

+
Parameters:
cf - owning class file information
+
+ + + + + + + + +
+Method Detail
+ +

+getClassFile

+
+ClassFile getClassFile()
+
+
Get munged class file information. +

+

+ +
Returns:
class file information for bound class
+
+
+
+ +

+purgeUnusedMethods

+
+private void purgeUnusedMethods()
+                         throws JiBXException
+
+
Delete pre-existing binding methods that are no longer needed. +

+

+ +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getUniqueMethod

+
+BindingMethod getUniqueMethod(MethodBuilder builder,
+                              boolean suffix)
+                        throws JiBXException
+
+
Get unique method. If a method matching the byte code of the supplied + method has already been defined the existing method is returned. + Otherwise the method is added to the definitions. If necessary, a number + suffix is appended to the method name to prevent conflicts with existing + names. +

+

+
Parameters:
builder - method to be defined
suffix - append name suffix to assure uniqueness flag +
Returns:
defined method item +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getUniqueSupportClass

+
+public static ClassFile getUniqueSupportClass(ClassFile cf)
+
+
Get unique generated support class. Allows tracking of all generated + classes for common handling with the bound classes. Each generated + support class is associated with a particular bound class. +

+

+
Parameters:
cf - generated class file +
Returns:
unique class file information
+
+
+
+ +

+checkDirectory

+
+static void checkDirectory(java.io.File root,
+                           java.lang.String pack)
+                    throws JiBXException
+
+
Check directory for JiBX generated files. Scans through all class files + in the target directory and loads any that start with the JiBX + identifier string. +

+

+
Parameters:
root - class path root for directory
pack - package relative to root directory +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+addFactory

+
+void addFactory(java.lang.String fact)
+
+
Add binding factory to class. The binding factories are accumulated as + a delimited string during generation, then dumped to a static field in + the class at the end. +

+

+
Parameters:
fact - binding factory name
+
+
+
+ +

+setFactoryList

+
+void setFactoryList()
+              throws JiBXException
+
+
Generate factory list. Adds or replaces the existing static array of + factories in the class. +

+

+ +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+getInstance

+
+static MungedClass getInstance(ClassFile cf)
+                        throws JiBXException
+
+
Get modification tracking information for class. +

+

+
Parameters:
cf - information for class to be modified (must be writable) +
Returns:
binding information for class +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+delayedAddUnique

+
+public static void delayedAddUnique(ClassFile cf)
+
+
Add unique support class at end of binding process. This allows a class + to be constructed in steps during handling of one or more bindings, with + the class finished and checked for uniqueness only after all bindings + have been handled. The actual add of the class is done during the + fixChanges(boolean) handling. +

+

+
Parameters:
cf - class file to be added as unique support class at end of + binding
+
+
+
+ +

+fixChanges

+
+public static ClassFile[][] fixChanges(boolean write)
+                                throws JiBXException
+
+
Finalize changes to modified class files. +

+

+
Parameters:
write - replace original class files with modified versions +
Returns:
three-way array of class files, for written, unmodified, and + deleted +
Throws: +
JiBXException - on write error
+
+
+
+ +

+reset

+
+public static void reset()
+
+
Discard cached information and reset in preparation for a new binding + run. +

+

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/UnmarshalBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/UnmarshalBuilder.html @@ -0,0 +1,465 @@ + + + + + + +UnmarshalBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class UnmarshalBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+          extended by org.jibx.binding.classes.ExceptionMethodBuilder
+              extended by org.jibx.binding.classes.ContextMethodBuilder
+                  extended by org.jibx.binding.classes.MarshalUnmarshalBuilder
+                      extended by org.jibx.binding.classes.UnmarshalBuilder
+
+
+
+
public class UnmarshalBuilder
extends MarshalUnmarshalBuilder
+ + +

+Unmarshalling method builder. Tracks the creation of an unmarshalling method, + including special handling of exceptions that may be generated by object + accesses during the unmarshalling process. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static org.apache.bcel.generic.Type[]SINGLE_STRING_ARGS + +
+           
+protected static java.lang.StringUNMARSHAL_EXCEPTION_TEXT + +
+           
+protected static org.apache.bcel.generic.Type[]UNMARSHAL_METHOD_ARGS + +
+           
+private static java.lang.StringUNMARSHALCONTEXT_CLASS + +
+           
+protected static java.lang.StringUNMARSHALLING_POSITION_METHOD + +
+           
+protected static java.lang.StringUNMARSHALLING_POSITION_SIGNATURE + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EMPTY_STRING_ARRAY, EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists
+  + + + + + + + + + + +
+Constructor Summary
UnmarshalBuilder(java.lang.String name, + ClassFile cf, + ClassFile mf) + +
+          Constructor.
+  + + + + + + + + + + + +
+Method Summary
+ org.apache.bcel.generic.InstructionHandlegenExceptionHandler() + +
+          Add exception handler code.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MarshalUnmarshalBuilder
handleExceptions
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ContextMethodBuilder
isStaticMethod, loadContext, loadContext, loadObject, loadObject, setObjectSlot, storeObject
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder
defineSlot, freeSlot, getSlot
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP_X1, appendDUP, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+UNMARSHALCONTEXT_CLASS

+
+private static final java.lang.String UNMARSHALCONTEXT_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_EXCEPTION_TEXT

+
+protected static final java.lang.String UNMARSHAL_EXCEPTION_TEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_POSITION_METHOD

+
+protected static final java.lang.String UNMARSHALLING_POSITION_METHOD
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHALLING_POSITION_SIGNATURE

+
+protected static final java.lang.String UNMARSHALLING_POSITION_SIGNATURE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+UNMARSHAL_METHOD_ARGS

+
+protected static final org.apache.bcel.generic.Type[] UNMARSHAL_METHOD_ARGS
+
+
+
+
+
+ +

+SINGLE_STRING_ARGS

+
+protected static final org.apache.bcel.generic.Type[] SINGLE_STRING_ARGS
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+UnmarshalBuilder

+
+public UnmarshalBuilder(java.lang.String name,
+                        ClassFile cf,
+                        ClassFile mf)
+                 throws JiBXException
+
+
Constructor. This sets up for constructing a virtual unmarshalling method + with public access and wrapped exception handling. If the method is being + generated directly to the class being unmarshalled it's built as a + virtual method; otherwise, it's done as a static method. +

+

+
Parameters:
name - method name to be built
cf - unmarshal class file information
mf - method generation class file information +
Throws: +
JiBXException - on error in initializing method construction
+
+ + + + + + + + +
+Method Detail
+ +

+genExceptionHandler

+
+public org.apache.bcel.generic.InstructionHandle genExceptionHandler()
+                                                              throws JiBXException
+
+
Add exception handler code. The implementation of this abstract base + class method provides handling specific to an unmarshalling method. +

+

+
Specified by:
genExceptionHandler in class MarshalUnmarshalBuilder
+
+
+ +
Returns:
handle for first instruction in handler +
Throws: +
JiBXException - on error in creating exception handler
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/MungedClass.JiBXFilter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/MungedClass.JiBXFilter.html @@ -0,0 +1,259 @@ + + + + + + +MungedClass.JiBXFilter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class MungedClass.JiBXFilter

+
+java.lang.Object
+  extended by org.jibx.binding.classes.MungedClass.JiBXFilter
+
+
+
All Implemented Interfaces:
java.io.FileFilter
+
+
+
Enclosing class:
MungedClass
+
+
+
+
private static class MungedClass.JiBXFilter
extends java.lang.Object
implements java.io.FileFilter
+ + +

+Filter for class files generated by JiBX. +

+ +

+


+ +

+ + + + + + + + + + + + +
+Constructor Summary
+private MungedClass.JiBXFilter() + +
+           
+  + + + + + + + + + + + +
+Method Summary
+ booleanaccept(java.io.File file) + +
+           
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+MungedClass.JiBXFilter

+
+private MungedClass.JiBXFilter()
+
+
+ + + + + + + + +
+Method Detail
+ +

+accept

+
+public boolean accept(java.io.File file)
+
+
+
Specified by:
accept in interface java.io.FileFilter
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/MarshalUnmarshalBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/MarshalUnmarshalBuilder.html @@ -0,0 +1,378 @@ + + + + + + +MarshalUnmarshalBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class MarshalUnmarshalBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+          extended by org.jibx.binding.classes.ExceptionMethodBuilder
+              extended by org.jibx.binding.classes.ContextMethodBuilder
+                  extended by org.jibx.binding.classes.MarshalUnmarshalBuilder
+
+
+
Direct Known Subclasses:
MarshalBuilder, UnmarshalBuilder
+
+
+
+
public abstract class MarshalUnmarshalBuilder
extends ContextMethodBuilder
+ + +

+Builder for marshal and unmarshal methods. Adds exception accumulation with + actual handling provided by the subclass. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EMPTY_STRING_ARRAY, EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists
+  + + + + + + + + + + + +
+Constructor Summary
+protected MarshalUnmarshalBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile mf, + int access, + int obj, + java.lang.String type, + int ctx, + java.lang.String ctype) + +
+          Constructor.
+  + + + + + + + + + + + + + + + +
+Method Summary
+abstract  org.apache.bcel.generic.InstructionHandlegenExceptionHandler() + +
+          Add exception handler code.
+protected  voidhandleExceptions() + +
+          Process accumulated exceptions.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ContextMethodBuilder
isStaticMethod, loadContext, loadContext, loadObject, loadObject, setObjectSlot, storeObject
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder
defineSlot, freeSlot, getSlot
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP_X1, appendDUP, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+MarshalUnmarshalBuilder

+
+protected MarshalUnmarshalBuilder(java.lang.String name,
+                                  org.apache.bcel.generic.Type ret,
+                                  org.apache.bcel.generic.Type[] args,
+                                  ClassFile mf,
+                                  int access,
+                                  int obj,
+                                  java.lang.String type,
+                                  int ctx,
+                                  java.lang.String ctype)
+                           throws JiBXException
+
+
Constructor. This sets up for constructing the marshal or unmarshal + method. +

+

+
Parameters:
name - method name to be built
ret - method return type
args - types of arguments
mf - method generation class file information
access - flags for method access
obj - variable slot for current object
type - marshalled or unmarshalled class name
ctx - variable slot for marshalling/unmarshalling context
ctype - context type as defined in method +
Throws: +
JiBXException - on error in initializing method construction
+
+ + + + + + + + +
+Method Detail
+ +

+genExceptionHandler

+
+public abstract org.apache.bcel.generic.InstructionHandle genExceptionHandler()
+                                                                       throws JiBXException
+
+
Add exception handler code. This method must be implemented by each + subclass to provide the appropriate handling code. +

+

+ +
Returns:
handle for first instruction in handler +
Throws: +
JiBXException - on error in creating exception handler
+
+
+
+ +

+handleExceptions

+
+protected void handleExceptions()
+                         throws JiBXException
+
+
Process accumulated exceptions. Sets up an exception handler framework + and then calls the genExceptionHandler() method to build the + handler body. +

+

+
Overrides:
handleExceptions in class ExceptionMethodBuilder
+
+
+ +
Throws: +
JiBXException - on error in exception handling
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/BranchWrapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/BranchWrapper.html @@ -0,0 +1,553 @@ + + + + + + +BranchWrapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class BranchWrapper

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BranchWrapper
+
+
+
+
public class BranchWrapper
extends java.lang.Object
+ + +

+Wrapper for branch handle. This preserves a snapshot of the stack state for + the branch instruction, matching it against the stack state for the target + instruction when set. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  org.apache.bcel.generic.BranchHandlem_branchHandle + +
+          Actual wrapped instruction handle.
+private  java.lang.Objectm_sourceObject + +
+          Object that generated branch.
+private  java.lang.Throwablem_sourceTrace + +
+          Code generation backtrace for source of branch.
+private  java.lang.String[]m_stackTypes + +
+          Stack state for branch origin.
+private static booleans_errorOverride + +
+          Continue on after code generation error flag.
+private static booleans_trackSource + +
+          Track source code location for generated branches.
+  + + + + + + + + + + +
+Constructor Summary
BranchWrapper(org.apache.bcel.generic.BranchHandle hand, + java.lang.String[] types, + java.lang.Object src) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  java.lang.StringbuildReport(java.lang.String text, + java.lang.String[] types, + MethodBuilder mb) + +
+          Report branch target error.
+private  java.lang.StringdescribeStack(java.lang.String[] types) + +
+          Generate description of stack state.
+(package private)  java.lang.String[]getStackState() + +
+          Get branch origin stack state information.
+static voidsetErrorOverride(boolean over) + +
+          Set target setting error override state.
+ voidsetTarget(BranchTarget target, + MethodBuilder mb) + +
+          Set target instruction for branch.
+(package private)  voidsetTarget(org.apache.bcel.generic.InstructionHandle hand, + java.lang.String[] types, + MethodBuilder mb) + +
+          Set target instruction for branch.
+static voidsetTracking(boolean track) + +
+          Set branch code generation tracking state.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_trackSource

+
+private static boolean s_trackSource
+
+
Track source code location for generated branches. +

+

+
+
+
+ +

+s_errorOverride

+
+private static boolean s_errorOverride
+
+
Continue on after code generation error flag. +

+

+
+
+
+ +

+m_branchHandle

+
+private final org.apache.bcel.generic.BranchHandle m_branchHandle
+
+
Actual wrapped instruction handle. +

+

+
+
+
+ +

+m_stackTypes

+
+private final java.lang.String[] m_stackTypes
+
+
Stack state for branch origin. +

+

+
+
+
+ +

+m_sourceObject

+
+private final java.lang.Object m_sourceObject
+
+
Object that generated branch. +

+

+
+
+
+ +

+m_sourceTrace

+
+private final java.lang.Throwable m_sourceTrace
+
+
Code generation backtrace for source of branch. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BranchWrapper

+
+BranchWrapper(org.apache.bcel.generic.BranchHandle hand,
+              java.lang.String[] types,
+              java.lang.Object src)
+
+
Constructor. +

+

+
Parameters:
hand - branch handle
types - array of types of values on stack
src - object responsible for generating branch
+
+ + + + + + + + +
+Method Detail
+ +

+getStackState

+
+java.lang.String[] getStackState()
+
+
Get branch origin stack state information. +

+

+ +
Returns:
array of types of values on stack
+
+
+
+ +

+describeStack

+
+private java.lang.String describeStack(java.lang.String[] types)
+
+
Generate description of stack state. +

+

+
Parameters:
types - array of types on stack +
Returns:
stack state description
+
+
+
+ +

+buildReport

+
+private java.lang.String buildReport(java.lang.String text,
+                                     java.lang.String[] types,
+                                     MethodBuilder mb)
+
+
Report branch target error. Dumps the stack trace for the source of the + branch, if source tracking is enabled, and generates an exception that + includes the stack state information. +

+

+
Parameters:
text - basic error message text
types - stack state description
mb - method builder using this code +
Returns:
complete error description text
+
+
+
+ +

+setTarget

+
+void setTarget(org.apache.bcel.generic.InstructionHandle hand,
+               java.lang.String[] types,
+               MethodBuilder mb)
+
+
Set target instruction for branch. Validates the branch source stack + state against the branch target stack state. +

+

+
Parameters:
hand - target branch instruction handle
types - stack state description
mb - method builder using this code
+
+
+
+ +

+setTarget

+
+public void setTarget(BranchTarget target,
+                      MethodBuilder mb)
+
+
Set target instruction for branch. Validates the branch source stack + state against the branch target stack state. +

+

+
Parameters:
target - branch target wrapper
mb - method builder using this code
+
+
+
+ +

+setTracking

+
+public static void setTracking(boolean track)
+
+
Set branch code generation tracking state. When set, this saves a stack + trace for each generated branch instruction, allowing the source of a + branch to be traced when an error occurs in setting the branch target. +

+

+
Parameters:
track - true to enable branch code generation tracking, + false to disable it
+
+
+
+ +

+setErrorOverride

+
+public static void setErrorOverride(boolean over)
+
+
Set target setting error override state. When set, this blocks throwing + an exception when an error occurs on setting the branch target, instead + just printing the information to the console. +

+

+
Parameters:
over - true to override exception on target error, + false to allow it
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ExceptionMethodBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ExceptionMethodBuilder.html @@ -0,0 +1,472 @@ + + + + + + +ExceptionMethodBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ExceptionMethodBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+          extended by org.jibx.binding.classes.ExceptionMethodBuilder
+
+
+
Direct Known Subclasses:
ContextMethodBuilder
+
+
+
+
public class ExceptionMethodBuilder
extends MethodBuilder
+ + +

+Builder for simple methods that may just pass checked exceptions on to + caller. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private  java.util.HashMapm_slotMap + +
+          Map for object to variable assignments.
+ + + + + + + +
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EMPTY_STRING_ARRAY, EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
ExceptionMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf) + +
+          Constructor from signature for public, final method.
ExceptionMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf, + int access) + +
+          Constructor from signature.
ExceptionMethodBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile cf, + int access) + +
+          Constructor with types specified.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voiddefineSlot(java.lang.Object obj, + org.apache.bcel.generic.Type type) + +
+          Define local variable slot for object.
+ voidfreeSlot(java.lang.Object obj) + +
+          Free local variable slot for object.
+ intgetSlot(java.lang.Object obj) + +
+          Check if local variable slot defined for object.
+protected  voidhandleExceptions() + +
+          Process accumulated exceptions.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP_X1, appendDUP, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_slotMap

+
+private java.util.HashMap m_slotMap
+
+
Map for object to variable assignments. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ExceptionMethodBuilder

+
+public ExceptionMethodBuilder(java.lang.String name,
+                              org.apache.bcel.generic.Type ret,
+                              org.apache.bcel.generic.Type[] args,
+                              ClassFile cf,
+                              int access)
+                       throws JiBXException
+
+
Constructor with types specified. +

+

+
Parameters:
name - method name to be built
ret - method return type
args - types of arguments
cf - owning class file information
access - flags for method access +
Throws: +
JiBXException - on error in initializing method construction
+
+
+ +

+ExceptionMethodBuilder

+
+public ExceptionMethodBuilder(java.lang.String name,
+                              java.lang.String sig,
+                              ClassFile cf,
+                              int access)
+                       throws JiBXException
+
+
Constructor from signature. +

+

+
Parameters:
name - method name to be built
sig - method signature
cf - owning class file information
access - flags for method access +
Throws: +
JiBXException - on error in initializing method construction
+
+
+ +

+ExceptionMethodBuilder

+
+public ExceptionMethodBuilder(java.lang.String name,
+                              java.lang.String sig,
+                              ClassFile cf)
+                       throws JiBXException
+
+
Constructor from signature for public, final method. +

+

+
Parameters:
name - method name to be built
sig - method signature
cf - owning class file information +
Throws: +
JiBXException - on error in initializing method construction
+
+ + + + + + + + +
+Method Detail
+ +

+defineSlot

+
+public void defineSlot(java.lang.Object obj,
+                       org.apache.bcel.generic.Type type)
+
+
Define local variable slot for object. The current code in the method + must have the initial value for the variable on the stack +

+

+
Parameters:
obj - owning object of slot
+
+
+
+ +

+getSlot

+
+public int getSlot(java.lang.Object obj)
+
+
Check if local variable slot defined for object. +

+

+
Parameters:
obj - owning object of slot +
Returns:
local variable slot assigned to object, or -1 if + none
+
+
+
+ +

+freeSlot

+
+public void freeSlot(java.lang.Object obj)
+
+
Free local variable slot for object. This clears the usage of the slot + (if one has been defined for the object) so it can be reused for other + purposes. +

+

+
Parameters:
obj - owning object of slot
+
+
+
+ +

+handleExceptions

+
+protected void handleExceptions()
+                         throws JiBXException
+
+
Process accumulated exceptions. Just adds the checked exceptions that + may be thrown within the body to the list for this method, passing them + on to the caller for handling. +

+

+
Specified by:
handleExceptions in class MethodBuilder
+
+
+ +
Throws: +
JiBXException - on error in exception handling
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/MethodBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/MethodBuilder.html @@ -0,0 +1,2825 @@ + + + + + + +MethodBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class MethodBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+
+
+
Direct Known Subclasses:
ExceptionMethodBuilder
+
+
+
+
public abstract class MethodBuilder
extends BindingMethod
+ + +

+Method builder. Organizes and tracks the creation of a method, providing + convenience methods for common operations. This is customized for the needs + of JiBX, with some predetermined settings as appropriate. It supplies hash + code and equality checking based on the method signature and actual byte + code of the generated method, ignoring the method name. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static java.lang.String[]EMPTY_STRING_ARRAY + +
+          Zero-length string array.
+static java.lang.StringEXCEPTION_CONSTRUCTOR_SIGNATURE1 + +
+           
+static java.lang.StringEXCEPTION_CONSTRUCTOR_SIGNATURE2 + +
+           
+static java.lang.StringFRAMEWORK_EXCEPTION_CLASS + +
+           
+protected  java.util.ArrayListm_exceptions + +
+          Exceptions needing to be handled in method (lazy create, + null if not used).
+protected  org.apache.bcel.generic.MethodGenm_generator + +
+          Generator for constructing method.
+protected  intm_hashCode + +
+          Accumulated hash code from adding instructions.
+protected  InstructionBuilderm_instructionBuilder + +
+          Builder for class instructions.
+private  org.apache.bcel.generic.InstructionListm_instructionList + +
+          List of instructions in method definition.
+protected  ClassItemm_item + +
+          Method class item information.
+private  java.util.ArrayListm_localTypes + +
+          Value types associated with local variable slots.
+protected  org.apache.bcel.classfile.Methodm_method + +
+          Actual generated method information.
+private  org.jibx.binding.util.StringStackm_stackState + +
+          List of types currently on stack.
+protected  BranchWrapper[]m_targetBranches + +
+          Branch to be aimed at next appended instruction.
+protected  java.util.HashMapm_valueMap + +
+          Map for initialized properties (lazy create, null if not + used).
+protected static java.util.ArrayLists_argNameLists + +
+          Table of argument name lists (generated as needed).
+  + + + + + + + + + + + +
+Constructor Summary
+protected MethodBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile cf, + int access) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddException(java.lang.String name) + +
+          Add exception to those needing handling.
+ intaddLocal(java.lang.String name, + org.apache.bcel.generic.Type type) + +
+          Add local variable to method.
+ ClassItemaddMethod() + +
+          Add constructed method to class.
+ voidaddMethodExceptions(ClassItem method) + +
+          Add exceptions thrown by called method to those needing handling.
+private  voidappend(org.apache.bcel.generic.CompoundInstruction ins) + +
+          Append compound instruction to method.
+private  voidappend(org.apache.bcel.generic.Instruction ins) + +
+          Append instruction to method.
+ voidappendAASTORE() + +
+          Append an AASTORE to the instruction list.
+ voidappendACONST_NULL() + +
+          Append an ACONST_NULL to the instruction list.
+ voidappendALOAD(java.lang.String type) + +
+          Append appropriate array load to the instruction list.
+ voidappendARRAYLENGTH() + +
+          Append an ARRAYLENGTH to the instruction list.
+ voidappendASTORE(java.lang.String type) + +
+          Append the appropriate array load to the instruction list.
+ voidappendCall(ClassItem item) + +
+          Create invoke instruction for static, member, or interface method and + append to method.
+ voidappendCallInit(java.lang.String name, + java.lang.String signature) + +
+          Create invoke initializer instruction from signature and append to + method.
+ voidappendCallInterface(java.lang.String method, + java.lang.String signature) + +
+          Create invoke interface method instruction from signature and append to + method.
+ voidappendCallStatic(java.lang.String method, + java.lang.String signature) + +
+          Create invoke static method instruction from signature and append to + method.
+ voidappendCallVirtual(java.lang.String method, + java.lang.String signature) + +
+          Create invoke virtual method instruction from signature and append to + method.
+ voidappendCreateArray(java.lang.String type) + +
+          Append instruction to create instance of array.
+ voidappendCreateCast(java.lang.String to) + +
+          Append check cast instruction from object (if needed).
+ voidappendCreateCast(java.lang.String from, + java.lang.String to) + +
+          Append check cast instruction (if needed).
+ voidappendCreateNew(java.lang.String name) + +
+          Append instruction to create instance of class.
+ voidappendDCMPG() + +
+          Append an DCMPG to the instruction list.
+ voidappendDUP_X1() + +
+          Append a DUP_X1 to the instruction list.
+ voidappendDUP() + +
+          Append a DUP to the instruction list.
+ voidappendDUP2() + +
+          Append a DUP2 to the instruction list.
+ voidappendFCMPG() + +
+          Append an FCMPG to the instruction list.
+ voidappendGet(ClassItem item) + +
+          Create get instruction and append to method.
+ voidappendGetField(ClassItem item) + +
+          Create getfield instruction and append to method.
+ voidappendGetStatic(ClassItem item) + +
+          Create getstatic instruction and append to method.
+ voidappendIASTORE() + +
+          Append an IASTORE to the instruction list.
+ voidappendICONST_0() + +
+          Append an ICONST_0 to the instruction list.
+ voidappendICONST_1() + +
+          Append an ICONST_1 to the instruction list.
+ BranchWrapperappendIF_ICMPNE(java.lang.Object src) + +
+          Append IF_ICMPNE branch instruction to method.
+ BranchWrapperappendIFEQ(java.lang.Object src) + +
+          Append IFEQ branch instruction to method.
+ BranchWrapperappendIFGE(java.lang.Object src) + +
+          Append IFGE branch instruction to method.
+ BranchWrapperappendIFLT(java.lang.Object src) + +
+          Append IFLT branch instruction to method.
+ BranchWrapperappendIFNE(java.lang.Object src) + +
+          Append IFNE branch instruction to method.
+ BranchWrapperappendIFNONNULL(java.lang.Object src) + +
+          Append IFNONNULL branch instruction to method.
+ BranchWrapperappendIFNULL(java.lang.Object src) + +
+          Append IFNULL branch instruction to method.
+ voidappendIncrementLocal(int inc, + int slot) + +
+          Append instruction to increment local integer variable.
+ voidappendInstanceOf(java.lang.String to) + +
+          Append instanceof check instruction.
+ voidappendISUB() + +
+          Append an ISUB to the instruction list.
+ voidappendIXOR() + +
+          Append an IXOR to the instruction list.
+ voidappendLCMP() + +
+          Append an LCMP to the instruction list.
+ voidappendLoadConstant(int value) + +
+          Create load constant instruction and append to method.
+ voidappendLoadConstant(java.lang.Object value) + +
+          Create load constant instruction and append to method.
+ voidappendLoadConstant(java.lang.String value) + +
+          Create load constant instruction and append to method.
+ voidappendLoadLocal(int slot) + +
+          Append instruction to load local variable.
+ voidappendPOP() + +
+          Append a POP to the instruction list.
+ voidappendPOP2() + +
+          Append a POP2 to the instruction list.
+ voidappendPut(ClassItem item) + +
+          Create put instruction and append to method.
+ voidappendPutField(ClassItem item) + +
+          Create putfield instruction and append to method.
+ voidappendPutStatic(ClassItem item) + +
+          Create putstatic instruction and append to method.
+ voidappendReturn() + +
+          Append simple return.
+ voidappendReturn(java.lang.String type) + +
+          Append typed return.
+ voidappendReturn(org.apache.bcel.generic.Type type) + +
+          Append typed return.
+ voidappendStoreLocal(int slot) + +
+          Append instruction to store local variable.
+ voidappendSWAP() + +
+          Append a SWAP to the instruction list.
+ BranchTargetappendTargetACONST_NULL() + +
+          Append an ACONST_NULL to the instruction list as a branch target.
+ BranchTargetappendTargetCreateNew(java.lang.String name) + +
+          Append instruction to create instance of class as a branch target.
+private  BranchTargetappendTargetInstruction(org.apache.bcel.generic.CompoundInstruction inst) + +
+          Append a compound instruction to the list as a branch target.
+private  BranchTargetappendTargetInstruction(org.apache.bcel.generic.Instruction inst) + +
+          Append an instruction to the list as a branch target.
+ BranchTargetappendTargetLoadConstant(int value) + +
+          Append a load constant instruction as a branch target.
+ BranchTargetappendTargetLoadConstant(java.lang.String value) + +
+          Append a load constant instruction as a branch target.
+ BranchTargetappendTargetNOP() + +
+          Append a NOP to the instruction list as a branch target.
+ voidappendThrow() + +
+          Append exception throw.
+ BranchWrapperappendUnconditionalBranch(java.lang.Object src) + +
+          Append unconditional branch instruction to method.
+ voidcodeComplete(boolean suffix) + +
+          Complete method construction.
+protected  org.apache.bcel.generic.LocalVariableGencreateLocal(java.lang.String name, + org.apache.bcel.generic.Type type) + +
+          Add local variable to method.
+private  java.lang.StringdescribeStack() + +
+          Generate description of current stack state.
+ intgetAccessFlags() + +
+          Get access flags.
+protected  org.apache.bcel.generic.InstructionHandlegetFirstInstruction() + +
+          Get first instruction in method.
+ ClassItemgetItem() + +
+          Get the method item.
+ java.lang.ObjectgetKeyValue(java.lang.Object key) + +
+          Add local variable for created object.
+protected  org.apache.bcel.generic.InstructionHandlegetLastInstruction() + +
+          Get last instruction in method.
+ org.apache.bcel.classfile.MethodgetMethod() + +
+          Get the actual method.
+ java.lang.StringgetName() + +
+          Get name of method being constructed.
+ java.lang.StringgetSignature() + +
+          Get signature.
+protected abstract  voidhandleExceptions() + +
+          Process accumulated exceptions.
+ inthashCode() + +
+          Get hash code.
+ voidinitStackState(BranchWrapper branch) + +
+          Initialize stack state to match branch source.
+ voidinitStackState(BranchWrapper branch, + int pop) + +
+          Initialize stack state to partially match branch source.
+protected  voidinitStackState(java.lang.String[] types) + +
+          Initialize stack state to array of value types.
+protected  org.apache.bcel.generic.InstructionHandleinternalAppendCreateNew(java.lang.String name) + +
+          Internal append instruction to create instance of class.
+ booleanisStackTopLong() + +
+          Check if top item on stack is a long value.
+ voidsetAccessFlags(int flags) + +
+          Set access flags.
+ java.lang.ObjectsetKeyValue(java.lang.Object key, + java.lang.Object value) + +
+          Add keyed value to method definition.
+protected  voidsetTarget(org.apache.bcel.generic.InstructionHandle inst) + +
+          Target branches if pending.
+ voidtargetNext(BranchWrapper branch) + +
+          Set branch target as next instruction added to method.
+ voidtargetNext(BranchWrapper[] branches) + +
+          Set branch targets as next instruction added to method.
+private  java.lang.StringverifyArray() + +
+          Verify the top value in the stack state resulting from the current + instruction list is an array.
+private  voidverifyArray(java.lang.String type) + +
+          Verify the top value in the stack state resulting from the current + instruction list is an array of the specified type.
+private  voidverifyCallStack(java.lang.String[] types) + +
+          Verify the top values in the stack state resulting from the current + instruction list.
+private  voidverifyCallStack(java.lang.String clas, + java.lang.String[] types) + +
+          Verify the top values in the stack state resulting from the current + instruction list.
+private  voidverifyCompatible(java.lang.String type, + java.lang.String need) + +
+          Verify that a pair of value types represent compatible types.
+private  voidverifyStack(java.lang.String t1) + +
+          Verify the top value in the stack state resulting from the current + instruction list.
+private  voidverifyStack(java.lang.String t1, + java.lang.String t2) + +
+          Verify the top two values in the stack state resulting from the current + instruction list.
+private  voidverifyStackDepth(int count) + +
+          Verify that at least the specified number of items are present on the + stack.
+private  voidverifyStackObject() + +
+          Verify that the top value in the stack state resulting from the current + instruction list is an object reference.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+FRAMEWORK_EXCEPTION_CLASS

+
+public static final java.lang.String FRAMEWORK_EXCEPTION_CLASS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EXCEPTION_CONSTRUCTOR_SIGNATURE1

+
+public static final java.lang.String EXCEPTION_CONSTRUCTOR_SIGNATURE1
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EXCEPTION_CONSTRUCTOR_SIGNATURE2

+
+public static final java.lang.String EXCEPTION_CONSTRUCTOR_SIGNATURE2
+
+
+
See Also:
Constant Field Values
+
+
+ +

+s_argNameLists

+
+protected static java.util.ArrayList s_argNameLists
+
+
Table of argument name lists (generated as needed). +

+

+
+
+
+ +

+EMPTY_STRING_ARRAY

+
+protected static java.lang.String[] EMPTY_STRING_ARRAY
+
+
Zero-length string array. +

+

+
+
+
+ +

+m_instructionBuilder

+
+protected InstructionBuilder m_instructionBuilder
+
+
Builder for class instructions. +

+

+
+
+
+ +

+m_instructionList

+
+private org.apache.bcel.generic.InstructionList m_instructionList
+
+
List of instructions in method definition. +

+

+
+
+
+ +

+m_stackState

+
+private org.jibx.binding.util.StringStack m_stackState
+
+
List of types currently on stack. +

+

+
+
+
+ +

+m_generator

+
+protected org.apache.bcel.generic.MethodGen m_generator
+
+
Generator for constructing method. +

+

+
+
+
+ +

+m_method

+
+protected org.apache.bcel.classfile.Method m_method
+
+
Actual generated method information. +

+

+
+
+
+ +

+m_item

+
+protected ClassItem m_item
+
+
Method class item information. +

+

+
+
+
+ +

+m_localTypes

+
+private java.util.ArrayList m_localTypes
+
+
Value types associated with local variable slots. +

+

+
+
+
+ +

+m_exceptions

+
+protected java.util.ArrayList m_exceptions
+
+
Exceptions needing to be handled in method (lazy create, + null if not used). +

+

+
+
+
+ +

+m_hashCode

+
+protected int m_hashCode
+
+
Accumulated hash code from adding instructions. +

+

+
+
+
+ +

+m_targetBranches

+
+protected BranchWrapper[] m_targetBranches
+
+
Branch to be aimed at next appended instruction. +

+

+
+
+
+ +

+m_valueMap

+
+protected java.util.HashMap m_valueMap
+
+
Map for initialized properties (lazy create, null if not + used). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MethodBuilder

+
+protected MethodBuilder(java.lang.String name,
+                        org.apache.bcel.generic.Type ret,
+                        org.apache.bcel.generic.Type[] args,
+                        ClassFile cf,
+                        int access)
+                 throws JiBXException
+
+
Constructor. This sets up for constructing a method with public access. +

+

+
Parameters:
name - method name to be built
ret - method return type
args - types of arguments
cf - owning class file information
access - flags for method access +
Throws: +
JiBXException - on error in constructing method
+
+ + + + + + + + +
+Method Detail
+ +

+getName

+
+public java.lang.String getName()
+
+
Get name of method being constructed. +

+

+
Specified by:
getName in class BindingMethod
+
+
+ +
Returns:
name of method being constructed
+
+
+
+ +

+getSignature

+
+public java.lang.String getSignature()
+
+
Get signature. +

+

+
Specified by:
getSignature in class BindingMethod
+
+
+ +
Returns:
signature for method
+
+
+
+ +

+getAccessFlags

+
+public int getAccessFlags()
+
+
Get access flags. +

+

+
Specified by:
getAccessFlags in class BindingMethod
+
+
+ +
Returns:
flags for access type of method
+
+
+
+ +

+setAccessFlags

+
+public void setAccessFlags(int flags)
+
+
Set access flags. +

+

+
Specified by:
setAccessFlags in class BindingMethod
+
+
+
Parameters:
flags - access type to be set
+
+
+
+ +

+getMethod

+
+public org.apache.bcel.classfile.Method getMethod()
+
+
Get the actual method. This can only be called once code generation is + completed (after the codeComplete(boolean) method is called). +

+

+
Specified by:
getMethod in class BindingMethod
+
+
+ +
Returns:
constructed method information
+
+
+
+ +

+setKeyValue

+
+public java.lang.Object setKeyValue(java.lang.Object key,
+                                    java.lang.Object value)
+
+
Add keyed value to method definition. +

+

+
Parameters:
key - retrieval key
value - keyed value
+
+
+
+ +

+getKeyValue

+
+public java.lang.Object getKeyValue(java.lang.Object key)
+
+
Add local variable for created object. The current code in the method + must have the created object reference on the stack. +

+

+
+
+
+
+ +

+addException

+
+public void addException(java.lang.String name)
+
+
Add exception to those needing handling. +

+

+
Parameters:
name - fully qualified name of exception class
+
+
+
+ +

+addMethodExceptions

+
+public void addMethodExceptions(ClassItem method)
+
+
Add exceptions thrown by called method to those needing handling. +

+

+
Parameters:
method - information for method to be handled
+
+
+
+ +

+getFirstInstruction

+
+protected org.apache.bcel.generic.InstructionHandle getFirstInstruction()
+
+
Get first instruction in method. +

+

+ +
Returns:
handle for first instruction in method
+
+
+
+ +

+getLastInstruction

+
+protected org.apache.bcel.generic.InstructionHandle getLastInstruction()
+
+
Get last instruction in method. +

+

+ +
Returns:
handle for last instruction in method
+
+
+
+ +

+setTarget

+
+protected final void setTarget(org.apache.bcel.generic.InstructionHandle inst)
+
+
Target branches if pending. This implements setting the target of + branch instructions supplied using the targetNext(org.jibx.binding.classes.BranchWrapper) method. +

+

+
Parameters:
inst - handle for appended instruction
+
+
+
+ +

+describeStack

+
+private java.lang.String describeStack()
+
+
Generate description of current stack state. +

+

+ +
Returns:
stack state description
+
+
+
+ +

+verifyCompatible

+
+private void verifyCompatible(java.lang.String type,
+                              java.lang.String need)
+
+
Verify that a pair of value types represent compatible types. This checks + for equal types or downcast object types. +

+

+
Parameters:
type - actual known type of value
need - type needed
+
+
+
+ +

+verifyStackDepth

+
+private void verifyStackDepth(int count)
+
+
Verify that at least the specified number of items are present on the + stack. +

+

+
Parameters:
count - minimum number of items required
+
+
+
+ +

+verifyStack

+
+private void verifyStack(java.lang.String t1)
+
+
Verify the top value in the stack state resulting from the current + instruction list. +

+

+
Parameters:
t1 - expected type for top item on stack
+
+
+
+ +

+verifyArray

+
+private java.lang.String verifyArray()
+
+
Verify the top value in the stack state resulting from the current + instruction list is an array. +

+

+ +
Returns:
array item type
+
+
+
+ +

+verifyArray

+
+private void verifyArray(java.lang.String type)
+
+
Verify the top value in the stack state resulting from the current + instruction list is an array of the specified type. +

+

+
Parameters:
type - array item type
+
+
+
+ +

+verifyStack

+
+private void verifyStack(java.lang.String t1,
+                         java.lang.String t2)
+
+
Verify the top two values in the stack state resulting from the current + instruction list. +

+

+
Parameters:
t1 - expected type for first item on stack
t2 - expected type for second item on stack
+
+
+
+ +

+verifyCallStack

+
+private void verifyCallStack(java.lang.String[] types)
+
+
Verify the top values in the stack state resulting from the current + instruction list. This form checks only the actual call parameters. +

+

+
Parameters:
types - expected parameter types on stack
+
+
+
+ +

+verifyCallStack

+
+private void verifyCallStack(java.lang.String clas,
+                             java.lang.String[] types)
+
+
Verify the top values in the stack state resulting from the current + instruction list. This form checks both the object being called and the + actual call parameters. +

+

+
Parameters:
clas - name of method class
types - expected parameter types on stack
+
+
+
+ +

+verifyStackObject

+
+private void verifyStackObject()
+
+
Verify that the top value in the stack state resulting from the current + instruction list is an object reference. +

+

+
+
+
+
+ +

+appendIFEQ

+
+public BranchWrapper appendIFEQ(java.lang.Object src)
+
+
Append IFEQ branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIFGE

+
+public BranchWrapper appendIFGE(java.lang.Object src)
+
+
Append IFGE branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIFLT

+
+public BranchWrapper appendIFLT(java.lang.Object src)
+
+
Append IFLT branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIFNE

+
+public BranchWrapper appendIFNE(java.lang.Object src)
+
+
Append IFNE branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIFNONNULL

+
+public BranchWrapper appendIFNONNULL(java.lang.Object src)
+
+
Append IFNONNULL branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIFNULL

+
+public BranchWrapper appendIFNULL(java.lang.Object src)
+
+
Append IFNULL branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendIF_ICMPNE

+
+public BranchWrapper appendIF_ICMPNE(java.lang.Object src)
+
+
Append IF_ICMPNE branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended conditional branch
+
+
+
+ +

+appendUnconditionalBranch

+
+public BranchWrapper appendUnconditionalBranch(java.lang.Object src)
+
+
Append unconditional branch instruction to method. +

+

+
Parameters:
src - object responsible for generating branch +
Returns:
wrapper for appended unconditional branch
+
+
+
+ +

+append

+
+private void append(org.apache.bcel.generic.CompoundInstruction ins)
+
+
Append compound instruction to method. +

+

+
Parameters:
ins - instruction to be appended
+
+
+
+ +

+append

+
+private void append(org.apache.bcel.generic.Instruction ins)
+
+
Append instruction to method. +

+

+
Parameters:
ins - instruction to be appended
+
+
+
+ +

+appendLoadConstant

+
+public void appendLoadConstant(int value)
+
+
Create load constant instruction and append to method. Builds the most + appropriate type of instruction for the value. +

+

+
Parameters:
value - constant value to be loaded
+
+
+
+ +

+appendLoadConstant

+
+public void appendLoadConstant(java.lang.String value)
+
+
Create load constant instruction and append to method. Loads a + String reference from the constant pool. +

+

+
Parameters:
value - constant value to be loaded
+
+
+
+ +

+appendLoadConstant

+
+public void appendLoadConstant(java.lang.Object value)
+
+
Create load constant instruction and append to method. Loads an + unwrapped primitive value from the constant pool. +

+

+
Parameters:
value - constant value to be loaded
+
+
+
+ +

+appendGetField

+
+public void appendGetField(ClassItem item)
+
+
Create getfield instruction and append to method. Uses the target field + information to generate the instruction. +

+

+
Parameters:
item - information for field to be gotton
+
+
+
+ +

+appendGetStatic

+
+public void appendGetStatic(ClassItem item)
+
+
Create getstatic instruction and append to method. Uses the target field + information to generate the instruction. +

+

+
Parameters:
item - information for field to be set
+
+
+
+ +

+appendGet

+
+public void appendGet(ClassItem item)
+
+
Create get instruction and append to method. This generates either a + getstatic or a getfield instruction, as appropriate. +

+

+
Parameters:
item - information for field to be gotten
+
+
+
+ +

+appendPutField

+
+public void appendPutField(ClassItem item)
+
+
Create putfield instruction and append to method. Uses the target field + information to generate the instruction. +

+

+
Parameters:
item - information for field to be set
+
+
+
+ +

+appendPutStatic

+
+public void appendPutStatic(ClassItem item)
+
+
Create putstatic instruction and append to method. Uses the target field + information to generate the instruction. +

+

+
Parameters:
item - information for field to be set
+
+
+
+ +

+appendPut

+
+public void appendPut(ClassItem item)
+
+
Create put instruction and append to method. This generates either a + putstatic or a putfield instruction, as appropriate. +

+

+
Parameters:
item - information for field to be gotten
+
+
+
+ +

+appendCall

+
+public void appendCall(ClassItem item)
+
+
Create invoke instruction for static, member, or interface method and + append to method. Uses the target method information to generate the + correct instruction. +

+

+
Parameters:
item - information for method to be called
+
+
+
+ +

+appendCallStatic

+
+public void appendCallStatic(java.lang.String method,
+                             java.lang.String signature)
+
+
Create invoke static method instruction from signature and append to + method. +

+

+
Parameters:
method - fully qualified class and method name
signature - method signature in standard form
+
+
+
+ +

+appendCallVirtual

+
+public void appendCallVirtual(java.lang.String method,
+                              java.lang.String signature)
+
+
Create invoke virtual method instruction from signature and append to + method. +

+

+
Parameters:
method - fully qualified class and method name
signature - method signature in standard form
+
+
+
+ +

+appendCallInterface

+
+public void appendCallInterface(java.lang.String method,
+                                java.lang.String signature)
+
+
Create invoke interface method instruction from signature and append to + method. +

+

+
Parameters:
method - fully qualified interface and method name
signature - method signature in standard form
+
+
+
+ +

+appendCreateNew

+
+public void appendCreateNew(java.lang.String name)
+
+
Append instruction to create instance of class. +

+

+
Parameters:
name - fully qualified class name
+
+
+
+ +

+appendCallInit

+
+public void appendCallInit(java.lang.String name,
+                           java.lang.String signature)
+
+
Create invoke initializer instruction from signature and append to + method. +

+

+
Parameters:
name - fully qualified class name
signature - method signature in standard form
+
+
+
+ +

+appendCreateArray

+
+public void appendCreateArray(java.lang.String type)
+
+
Append instruction to create instance of array. +

+

+
Parameters:
type - fully qualified type name of array elements
+
+
+
+ +

+appendCreateCast

+
+public void appendCreateCast(java.lang.String from,
+                             java.lang.String to)
+
+
Append check cast instruction (if needed). +

+

+
Parameters:
from - fully qualified name of current type
to - fully qualified name of desired type
+
+
+
+ +

+appendCreateCast

+
+public void appendCreateCast(java.lang.String to)
+
+
Append check cast instruction from object (if needed). +

+

+
Parameters:
to - fully qualified name of desired type
+
+
+
+ +

+appendInstanceOf

+
+public void appendInstanceOf(java.lang.String to)
+
+
Append instanceof check instruction. +

+

+
Parameters:
to - fully qualified name of type to check
+
+
+
+ +

+createLocal

+
+protected org.apache.bcel.generic.LocalVariableGen createLocal(java.lang.String name,
+                                                               org.apache.bcel.generic.Type type)
+
+
Add local variable to method. The current code in the method must have + the initial value for the variable on the stack. The scope of the + variable is defined from the last instruction to the end of the + method unless otherwise modified. +

+

+
Parameters:
name - local variable name (may be null to use default)
type - variable type
+
+
+
+ +

+addLocal

+
+public int addLocal(java.lang.String name,
+                    org.apache.bcel.generic.Type type)
+
+
Add local variable to method. The current code in the method must have + the initial value for the variable on the stack. The scope of the + variable is defined from the preceding instruction to the end of the + method. +

+

+
Parameters:
name - local variable name
type - variable type +
Returns:
local variable slot number
+
+
+
+ +

+appendLoadLocal

+
+public void appendLoadLocal(int slot)
+
+
Append instruction to load local variable. +

+

+
Parameters:
slot - local variable slot to load
+
+
+
+ +

+appendStoreLocal

+
+public void appendStoreLocal(int slot)
+
+
Append instruction to store local variable. +

+

+
Parameters:
slot - local variable slot to store
+
+
+
+ +

+appendIncrementLocal

+
+public void appendIncrementLocal(int inc,
+                                 int slot)
+
+
Append instruction to increment local integer variable. +

+

+
Parameters:
inc - amount of incrment
slot - local variable slot to load
+
+
+
+ +

+appendReturn

+
+public void appendReturn()
+
+
Append simple return. +

+

+
+
+
+
+ +

+appendReturn

+
+public void appendReturn(org.apache.bcel.generic.Type type)
+
+
Append typed return. +

+

+
Parameters:
type - returned type (may be Type.VOID)
+
+
+
+ +

+appendReturn

+
+public void appendReturn(java.lang.String type)
+
+
Append typed return. +

+

+
Parameters:
type - returned type (may be void)
+
+
+
+ +

+appendThrow

+
+public void appendThrow()
+
+
Append exception throw. +

+

+
+
+
+
+ +

+appendALOAD

+
+public void appendALOAD(java.lang.String type)
+
+
Append appropriate array load to the instruction list. +

+

+
Parameters:
type - array item type expected
+
+
+
+ +

+appendAASTORE

+
+public void appendAASTORE()
+
+
Append an AASTORE to the instruction list. Doesn't actually check the + types, just the count of items present. +

+

+
+
+
+
+ +

+appendASTORE

+
+public void appendASTORE(java.lang.String type)
+
+
Append the appropriate array load to the instruction list. +

+

+
Parameters:
type - array item type expected
+
+
+
+ +

+appendACONST_NULL

+
+public void appendACONST_NULL()
+
+
Append an ACONST_NULL to the instruction list. +

+

+
+
+
+
+ +

+appendARRAYLENGTH

+
+public void appendARRAYLENGTH()
+
+
Append an ARRAYLENGTH to the instruction list. +

+

+
+
+
+
+ +

+appendDCMPG

+
+public void appendDCMPG()
+
+
Append an DCMPG to the instruction list. +

+

+
+
+
+
+ +

+appendDUP

+
+public void appendDUP()
+
+
Append a DUP to the instruction list. +

+

+
+
+
+
+ +

+appendDUP2

+
+public void appendDUP2()
+
+
Append a DUP2 to the instruction list. +

+

+
+
+
+
+ +

+appendDUP_X1

+
+public void appendDUP_X1()
+
+
Append a DUP_X1 to the instruction list. +

+

+
+
+
+
+ +

+appendFCMPG

+
+public void appendFCMPG()
+
+
Append an FCMPG to the instruction list. +

+

+
+
+
+
+ +

+appendIASTORE

+
+public void appendIASTORE()
+
+
Append an IASTORE to the instruction list. Doesn't actually check the + types, just the count of items present. +

+

+
+
+
+
+ +

+appendICONST_0

+
+public void appendICONST_0()
+
+
Append an ICONST_0 to the instruction list. +

+

+
+
+
+
+ +

+appendICONST_1

+
+public void appendICONST_1()
+
+
Append an ICONST_1 to the instruction list. +

+

+
+
+
+
+ +

+appendISUB

+
+public void appendISUB()
+
+
Append an ISUB to the instruction list. +

+

+
+
+
+
+ +

+appendIXOR

+
+public void appendIXOR()
+
+
Append an IXOR to the instruction list. +

+

+
+
+
+
+ +

+appendLCMP

+
+public void appendLCMP()
+
+
Append an LCMP to the instruction list. +

+

+
+
+
+
+ +

+appendPOP

+
+public void appendPOP()
+
+
Append a POP to the instruction list. +

+

+
+
+
+
+ +

+appendPOP2

+
+public void appendPOP2()
+
+
Append a POP2 to the instruction list. +

+

+
+
+
+
+ +

+appendSWAP

+
+public void appendSWAP()
+
+
Append a SWAP to the instruction list. +

+

+
+
+
+
+ +

+appendTargetInstruction

+
+private BranchTarget appendTargetInstruction(org.apache.bcel.generic.CompoundInstruction inst)
+
+
Append a compound instruction to the list as a branch target. +

+

+
Parameters:
inst - compound instruction to be appended as branch target +
Returns:
branch target information
+
+
+
+ +

+appendTargetInstruction

+
+private BranchTarget appendTargetInstruction(org.apache.bcel.generic.Instruction inst)
+
+
Append an instruction to the list as a branch target. +

+

+
Parameters:
inst - instruction to be appended as branch target +
Returns:
branch target information
+
+
+
+ +

+appendTargetNOP

+
+public BranchTarget appendTargetNOP()
+
+
Append a NOP to the instruction list as a branch target. +

+

+ +
Returns:
branch target information
+
+
+
+ +

+appendTargetACONST_NULL

+
+public BranchTarget appendTargetACONST_NULL()
+
+
Append an ACONST_NULL to the instruction list as a branch target. +

+

+ +
Returns:
branch target information
+
+
+
+ +

+appendTargetLoadConstant

+
+public BranchTarget appendTargetLoadConstant(int value)
+
+
Append a load constant instruction as a branch target. Builds the most + appropriate type of instruction for the value. +

+

+
Parameters:
value - constant value to be loaded +
Returns:
branch target information
+
+
+
+ +

+appendTargetLoadConstant

+
+public BranchTarget appendTargetLoadConstant(java.lang.String value)
+
+
Append a load constant instruction as a branch target. Loads a + String reference from the constant pool. +

+

+
Parameters:
value - constant value to be loaded +
Returns:
branch target information
+
+
+
+ +

+appendTargetCreateNew

+
+public BranchTarget appendTargetCreateNew(java.lang.String name)
+
+
Append instruction to create instance of class as a branch target. +

+

+
Parameters:
name - fully qualified class name +
Returns:
branch target information
+
+
+
+ +

+internalAppendCreateNew

+
+protected org.apache.bcel.generic.InstructionHandle internalAppendCreateNew(java.lang.String name)
+
+
Internal append instruction to create instance of class. This is used by + subclasses when they need access to the actual instruction handle. +

+

+
Parameters:
name - fully qualified class name
+
+
+
+ +

+isStackTopLong

+
+public boolean isStackTopLong()
+
+
Check if top item on stack is a long value. +

+

+ +
Returns:
true if long value, false if not
+
+
+
+ +

+initStackState

+
+public void initStackState(BranchWrapper branch)
+
+
Initialize stack state to match branch source. This can be used to set + the expected stack state following an unconditional transfer of control + instruction. The principle here is that the code to be generated must be + reached by a branch, so the stack state must match that of the branch + source. +

+

+
Parameters:
branch - wrapper for branch to be for stack initialization
+
+
+
+ +

+initStackState

+
+public void initStackState(BranchWrapper branch,
+                           int pop)
+
+
Initialize stack state to partially match branch source. This can be used + to set the expected stack state following an unconditional transfer of + control instruction. The specified number of items are removed from the + branch stack, with the assumption that code to add these items will be + appended before the branch join point is reached. +

+

+
Parameters:
branch - wrapper for branch to be for stack initialization
pop - number of items to be removed from branch source stack state
+
+
+
+ +

+initStackState

+
+protected void initStackState(java.lang.String[] types)
+
+
Initialize stack state to array of value types. This can be used to set + the expected stack state following an unconditional transfer of control + instruction. +

+

+
Parameters:
types - array of type names on stack
+
+
+
+ +

+targetNext

+
+public void targetNext(BranchWrapper branch)
+
+
Set branch target as next instruction added to method. This effectively + sets up a state trigger for the next append operation. The appended + instruction is set as the target for the branch. This requires that + instructions are only appended using the methods supplied in this class. +

+

+
Parameters:
branch - wrapper for branch to be aimed at next instruction (may be + null, in which case nothing is done)
+
+
+
+ +

+targetNext

+
+public void targetNext(BranchWrapper[] branches)
+
+
Set branch targets as next instruction added to method. This effectively + sets up a state trigger for the next append operation. The appended + instruction is set as the target for all the branches. This requires that + instructions are only appended using the methods supplied in this class. +

+

+
Parameters:
branches - wrappers for branches to be aimed at next instruction + (may be null, in which case nothing is done)
+
+
+
+ +

+handleExceptions

+
+protected abstract void handleExceptions()
+                                  throws JiBXException
+
+
Process accumulated exceptions. Each subclass must implement this + method to perform the appropriate handling of the checked exceptions + that may be thrown in the constructed method. +

+

+ +
Throws: +
JiBXException - on error in exception handling
+
+
+
+ +

+codeComplete

+
+public void codeComplete(boolean suffix)
+                  throws JiBXException
+
+
Complete method construction. Finalizes the instruction list and + generates the byte code for the constructed method, then computes the + hash code based on the byte code. If requested, an appropriate suffix is + tacked on the end of the supplied name in order to make sure that it will + not be duplicated (even in a superclass or subclass). +

+

+
Parameters:
suffix - add suffix to make method name unique +
Throws: +
JiBXException - on error in finishing method construction
+
+
+
+ +

+getItem

+
+public ClassItem getItem()
+
+
Get the method item. +

+

+
Specified by:
getItem in class BindingMethod
+
+
+ +
Returns:
method item information
+
+
+
+ +

+hashCode

+
+public int hashCode()
+
+
Get hash code. This is based only on the byte code in the method, and + is only valid after the codeComplete(boolean) method is called. +

+

+
Specified by:
hashCode in class BindingMethod
+
+
+ +
Returns:
hash code based on code sequence
+
+
+
+ +

+addMethod

+
+public ClassItem addMethod()
+                    throws JiBXException
+
+
Add constructed method to class. Makes the method callable, generating + the method information. +

+

+ +
Returns:
added method information +
Throws: +
JiBXException - on error in finishing method construction
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/package-frame.html @@ -0,0 +1,64 @@ + + + + + + +org.jibx.binding.classes (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.binding.classes + + + + +
+Classes  + +
+BindingMethod +
+BoundClass +
+BranchTarget +
+BranchWrapper +
+ClassCache +
+ClassFile +
+ClassItem +
+ContextMethodBuilder +
+ExceptionMethodBuilder +
+ExistingMethod +
+InstructionBuilder +
+MarshalBuilder +
+MarshalUnmarshalBuilder +
+MethodBuilder +
+MungedClass +
+MungedClass.JiBXFilter +
+UnmarshalBuilder
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/package-summary.html @@ -0,0 +1,214 @@ + + + + + + +org.jibx.binding.classes (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.binding.classes +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BindingMethodBinding method information.
BoundClassBound class handler.
BranchTargetWrapper for branch target information.
BranchWrapperWrapper for branch handle.
ClassCacheCache for class files being modified.
ClassFileClass file information.
ClassItemWrapper for field or method information.
ContextMethodBuilderBuilder for binding methods with a context and current object.
ExceptionMethodBuilderBuilder for simple methods that may just pass checked exceptions on to + caller.
ExistingMethodInformation for an existing binding method.
InstructionBuilderInstruction builder.
MarshalBuilderMarshalling method builder.
MarshalUnmarshalBuilderBuilder for marshal and unmarshal methods.
MethodBuilderMethod builder.
MungedClassModifiable class handler.
MungedClass.JiBXFilterFilter for class files generated by JiBX.
UnmarshalBuilderUnmarshalling method builder.
+  + +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/BranchTarget.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/BranchTarget.html @@ -0,0 +1,368 @@ + + + + + + +BranchTarget (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class BranchTarget

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BranchTarget
+
+
+
+
public class BranchTarget
extends java.lang.Object
+ + +

+Wrapper for branch target information. This preserves a snapshot of the stack + state for the branch target, allowing it to be matched against the stack + state for the branch source. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.String[]m_stackTypes + +
+          Stack state for branch target.
+private  org.apache.bcel.generic.InstructionHandlem_targetHandle + +
+          Actual wrapped instruction handle.
+  + + + + + + + + + + +
+Constructor Summary
BranchTarget(org.apache.bcel.generic.InstructionHandle hand, + java.lang.String[] types) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+(package private)  org.apache.bcel.generic.InstructionHandlegetInstruction() + +
+          Get actual target instruction.
+(package private)  java.lang.String[]getStack() + +
+          Get stack state information.
+(package private)  booleanmatchStacks(java.lang.String[] types) + +
+          Matches the branch target stack state against the supplied stack state.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_targetHandle

+
+private final org.apache.bcel.generic.InstructionHandle m_targetHandle
+
+
Actual wrapped instruction handle. +

+

+
+
+
+ +

+m_stackTypes

+
+private final java.lang.String[] m_stackTypes
+
+
Stack state for branch target. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BranchTarget

+
+BranchTarget(org.apache.bcel.generic.InstructionHandle hand,
+             java.lang.String[] types)
+
+
Constructor. +

+

+
Parameters:
hand - instruction handle
types - array of types of values on stack
+
+ + + + + + + + +
+Method Detail
+ +

+getInstruction

+
+org.apache.bcel.generic.InstructionHandle getInstruction()
+
+
Get actual target instruction. +

+

+ +
Returns:
handle for target instruction
+
+
+
+ +

+getStack

+
+java.lang.String[] getStack()
+
+
Get stack state information. +

+

+ +
Returns:
array of type names on stack
+
+
+
+ +

+matchStacks

+
+boolean matchStacks(java.lang.String[] types)
+
+
Matches the branch target stack state against the supplied stack state. +

+

+
Parameters:
types - array of types of values on stack +
Returns:
true if stack states match, false if + not
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ExistingMethod.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ExistingMethod.html @@ -0,0 +1,594 @@ + + + + + + +ExistingMethod (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ExistingMethod

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.ExistingMethod
+
+
+
+
public class ExistingMethod
extends BindingMethod
+ + +

+Information for an existing binding method. It supplies hash code and + equality checking based on the method signature and actual byte code of the + generated method, ignoring the method name. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_hashCode + +
+          Accumulated hash code from adding instructions.
+private  ClassItemm_item + +
+          Class item information.
+private  org.apache.bcel.classfile.Methodm_method + +
+          Actual method information.
+private  booleanm_used + +
+          Flag for method used in code.
+  + + + + + + + + + + +
+Constructor Summary
ExistingMethod(org.apache.bcel.classfile.Method method, + ClassItem item, + ClassFile file) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voiddelete() + +
+          Delete method from class.
+ intgetAccessFlags() + +
+          Get access flags.
+ ClassItemgetItem() + +
+          Get the method item.
+ org.apache.bcel.classfile.MethodgetMethod() + +
+          Get the actual method.
+ java.lang.StringgetName() + +
+          Get name of method.
+ java.lang.StringgetSignature() + +
+          Get signature.
+ inthashCode() + +
+          Get hash code.
+ booleanisUsed() + +
+          Check method used status.
+ voidsetAccessFlags(int flags) + +
+          Set access flags.
+ voidsetUsed() + +
+          Set method used status.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_item

+
+private ClassItem m_item
+
+
Class item information. +

+

+
+
+
+ +

+m_method

+
+private org.apache.bcel.classfile.Method m_method
+
+
Actual method information. +

+

+
+
+
+ +

+m_hashCode

+
+private int m_hashCode
+
+
Accumulated hash code from adding instructions. +

+

+
+
+
+ +

+m_used

+
+private boolean m_used
+
+
Flag for method used in code. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ExistingMethod

+
+public ExistingMethod(org.apache.bcel.classfile.Method method,
+                      ClassItem item,
+                      ClassFile file)
+
+
Constructor. +

+

+
Parameters:
method - actual method information
item - class item information for method
file - class file information
+
+ + + + + + + + +
+Method Detail
+ +

+getName

+
+public java.lang.String getName()
+
+
Get name of method. +

+

+
Specified by:
getName in class BindingMethod
+
+
+ +
Returns:
method name
+
+
+
+ +

+getSignature

+
+public java.lang.String getSignature()
+
+
Get signature. +

+

+
Specified by:
getSignature in class BindingMethod
+
+
+ +
Returns:
signature for method
+
+
+
+ +

+getAccessFlags

+
+public int getAccessFlags()
+
+
Get access flags. +

+

+
Specified by:
getAccessFlags in class BindingMethod
+
+
+ +
Returns:
flags for access type of method
+
+
+
+ +

+setAccessFlags

+
+public void setAccessFlags(int flags)
+
+
Set access flags. +

+

+
Specified by:
setAccessFlags in class BindingMethod
+
+
+
Parameters:
flags - access type to be set
+
+
+
+ +

+isUsed

+
+public boolean isUsed()
+
+
Check method used status. +

+

+ +
Returns:
method used status
+
+
+
+ +

+setUsed

+
+public void setUsed()
+
+
Set method used status. +

+

+
+
+
+
+ +

+getMethod

+
+public org.apache.bcel.classfile.Method getMethod()
+
+
Get the actual method. +

+

+
Specified by:
getMethod in class BindingMethod
+
+
+ +
Returns:
method information
+
+
+
+ +

+getItem

+
+public ClassItem getItem()
+
+
Get the method item. +

+

+
Specified by:
getItem in class BindingMethod
+
+
+ +
Returns:
method item information
+
+
+
+ +

+delete

+
+public void delete()
+            throws JiBXException
+
+
Delete method from class. +

+

+ +
Throws: +
JiBXException - if unable to delete method
+
+
+
+ +

+hashCode

+
+public int hashCode()
+
+
Get hash code. +

+

+
Specified by:
hashCode in class BindingMethod
+
+
+ +
Returns:
hash code for this method
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ClassItem.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ClassItem.html @@ -0,0 +1,1020 @@ + + + + + + +ClassItem (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ClassItem

+
+java.lang.Object
+  extended by org.jibx.binding.classes.ClassItem
+
+
+
+
public class ClassItem
extends java.lang.Object
+ + +

+Wrapper for field or method information. Provides the information needed + for access to either existing or added methods in existing classes. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.lang.String[]EMPTY_STRING_ARRAY + +
+          Empty array of strings.
+private  java.lang.String[]m_argTypes + +
+          Argument types for method.
+private  ClassFilem_classFile + +
+          Owning class information.
+private  org.apache.bcel.classfile.FieldOrMethodm_item + +
+          Wrapped existing item.
+private  java.lang.Stringm_name + +
+          Item name.
+private  java.lang.Stringm_signature + +
+          Encoded signature.
+private  java.lang.Stringm_typeName + +
+          Fully qualified class name of item type.
+private static java.util.HashMaps_primitiveMap + +
+          Map for primitive type signature variants.
+private static java.util.HashMaps_signatureParamsMap + +
+          Map from method signature to array of argument types.
+private static java.util.HashMaps_signatureTypeMap + +
+          Map from method signature to return type.
+private static java.util.HashMaps_typeMap + +
+          Map from type name to BCEL type.
+  + + + + + + + + + + +
+Constructor Summary
ClassItem(java.lang.String name, + ClassFile cf, + org.apache.bcel.classfile.FieldOrMethod item) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static ClassItemfindStaticMethod(java.lang.String name, + java.lang.String[] sigs) + +
+          Get static method by fully qualified name.
+static ClassItemfindVirtualMethod(java.lang.String name, + java.lang.String[] sigs) + +
+          Get virtual method by fully qualified name.
+ intgetAccessFlags() + +
+          Get access flags.
+ intgetArgumentCount() + +
+          Get number of arguments for method.
+ java.lang.StringgetArgumentType(int index) + +
+          Get argument type as fully qualified class name.
+ java.lang.String[]getArgumentTypes() + +
+          Get argument types as array of fully qualified class names.
+ ClassFilegetClassFile() + +
+          Get owning class information.
+ java.lang.String[]getExceptions() + +
+          Get names of exceptions thrown by method.
+ java.lang.StringgetName() + +
+          Get item name.
+static java.lang.String[]getParametersFromSignature(java.lang.String sig) + +
+          Get parameter type names from method signature.
+static java.lang.StringgetPrimitiveSignature(java.lang.String type) + +
+          Get the signature for a primitive.
+ java.lang.StringgetSignature() + +
+          Get method signature.
+static java.lang.String[]getSignatureVariants(java.lang.String name) + +
+          Get all variant signatures for a fully qualified class name.
+static java.lang.StringgetTypeFromSignature(java.lang.String sig) + +
+          Get return type names from method signature.
+ java.lang.StringgetTypeName() + +
+          Get item type as fully qualified class name.
+static booleanisAssignable(java.lang.String from, + java.lang.String to) + +
+          Check if a value of one type can be directly assigned to another type.
+ booleanisInitializer() + +
+          Check if item is an initializer.
+ booleanisMethod() + +
+          Check if item is a method.
+static booleanisPrimitive(java.lang.String type) + +
+          Check if type name is a primitive.
+ booleanisStatic() + +
+          Check if item is a static.
+ voidmakeAccessible(ClassFile src) + +
+          Make accessible item.
+ voidsetAccessFlags(int flags) + +
+          Set access flags.
+static org.apache.bcel.generic.TypetypeFromName(java.lang.String name) + +
+          Create type from name.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+EMPTY_STRING_ARRAY

+
+private static final java.lang.String[] EMPTY_STRING_ARRAY
+
+
Empty array of strings. +

+

+
+
+
+ +

+s_primitiveMap

+
+private static java.util.HashMap s_primitiveMap
+
+
Map for primitive type signature variants. +

+

+
+
+
+ +

+s_typeMap

+
+private static java.util.HashMap s_typeMap
+
+
Map from type name to BCEL type. +

+

+
+
+
+ +

+s_signatureParamsMap

+
+private static java.util.HashMap s_signatureParamsMap
+
+
Map from method signature to array of argument types. +

+

+
+
+
+ +

+s_signatureTypeMap

+
+private static java.util.HashMap s_signatureTypeMap
+
+
Map from method signature to return type. +

+

+
+
+
+ +

+m_classFile

+
+private ClassFile m_classFile
+
+
Owning class information. +

+

+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
Item name. +

+

+
+
+
+ +

+m_signature

+
+private java.lang.String m_signature
+
+
Encoded signature. +

+

+
+
+
+ +

+m_typeName

+
+private java.lang.String m_typeName
+
+
Fully qualified class name of item type. +

+

+
+
+
+ +

+m_argTypes

+
+private java.lang.String[] m_argTypes
+
+
Argument types for method. +

+

+
+
+
+ +

+m_item

+
+private org.apache.bcel.classfile.FieldOrMethod m_item
+
+
Wrapped existing item. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ClassItem

+
+public ClassItem(java.lang.String name,
+                 ClassFile cf,
+                 org.apache.bcel.classfile.FieldOrMethod item)
+
+
Constructor. Builds a wrapper for an item based on an existing field or + method. +

+

+
Parameters:
name - field or method name
cf - owning class information
item - field or method information
+
+ + + + + + + + +
+Method Detail
+ +

+getClassFile

+
+public ClassFile getClassFile()
+
+
Get owning class information. +

+

+ +
Returns:
owning class information
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+
+
Get item name. +

+

+ +
Returns:
item name
+
+
+
+ +

+getTypeName

+
+public java.lang.String getTypeName()
+
+
Get item type as fully qualified class name. +

+

+ +
Returns:
item type name
+
+
+
+ +

+getArgumentCount

+
+public int getArgumentCount()
+
+
Get number of arguments for method. +

+

+ +
Returns:
argument count for method, or zero if not a method
+
+
+
+ +

+getArgumentType

+
+public java.lang.String getArgumentType(int index)
+
+
Get argument type as fully qualified class name. +

+

+
Parameters:
index - argument number +
Returns:
argument type name
+
+
+
+ +

+getArgumentTypes

+
+public java.lang.String[] getArgumentTypes()
+
+
Get argument types as array of fully qualified class names. +

+

+ +
Returns:
array of argument types
+
+
+
+ +

+getAccessFlags

+
+public int getAccessFlags()
+
+
Get access flags. +

+

+ +
Returns:
flags for access type of field or method
+
+
+
+ +

+setAccessFlags

+
+public void setAccessFlags(int flags)
+
+
Set access flags. +

+

+
Parameters:
flags - access flags for field or method
+
+
+
+ +

+makeAccessible

+
+public void makeAccessible(ClassFile src)
+                    throws JiBXException
+
+
Make accessible item. Check if this field or method is accessible from + another class, and if not decreases the access restrictions to make it + accessible. +

+

+
Parameters:
src - class file for required access +
Throws: +
JiBXException - if cannot be accessed
+
+
+
+ +

+isStatic

+
+public boolean isStatic()
+
+
Check if item is a static. +

+

+ +
Returns:
true if a static, false if member
+
+
+
+ +

+getSignature

+
+public java.lang.String getSignature()
+
+
Get method signature. +

+

+ +
Returns:
encoded method signature
+
+
+
+ +

+isMethod

+
+public boolean isMethod()
+
+
Check if item is a method. +

+

+ +
Returns:
true if a method, false if a field
+
+
+
+ +

+isInitializer

+
+public boolean isInitializer()
+
+
Check if item is an initializer. +

+

+ +
Returns:
true if an initializer, false if a + field or normal method
+
+
+
+ +

+getExceptions

+
+public java.lang.String[] getExceptions()
+
+
Get names of exceptions thrown by method. +

+

+ +
Returns:
array of exceptions thrown by method, or null if + a field
+
+
+
+ +

+isPrimitive

+
+public static boolean isPrimitive(java.lang.String type)
+
+
Check if type name is a primitive. +

+

+ +
Returns:
true if a primitive, false if not
+
+
+
+ +

+getPrimitiveSignature

+
+public static java.lang.String getPrimitiveSignature(java.lang.String type)
+
+
Get the signature for a primitive. +

+

+ +
Returns:
signature for a primitive type
+
+
+
+ +

+getParametersFromSignature

+
+public static java.lang.String[] getParametersFromSignature(java.lang.String sig)
+
+
Get parameter type names from method signature. +

+

+
Parameters:
sig - method signature to be decoded +
Returns:
array of argument type names
+
+
+
+ +

+getTypeFromSignature

+
+public static java.lang.String getTypeFromSignature(java.lang.String sig)
+
+
Get return type names from method signature. +

+

+
Parameters:
sig - method signature to be decoded +
Returns:
return type name
+
+
+
+ +

+typeFromName

+
+public static org.apache.bcel.generic.Type typeFromName(java.lang.String name)
+
+
Create type from name. +

+

+
Parameters:
name - fully qualified type name +
Returns:
corresponding type
+
+
+
+ +

+findVirtualMethod

+
+public static ClassItem findVirtualMethod(java.lang.String name,
+                                          java.lang.String[] sigs)
+                                   throws JiBXException
+
+
Get virtual method by fully qualified name. This splits the class + name from the method name, finds the class, and then tries to find a + matching method name in that class or a superclass. +

+

+
Parameters:
name - fully qualified class and method name
sigs - possible method signatures +
Returns:
information for the method, or null if not found +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+findStaticMethod

+
+public static ClassItem findStaticMethod(java.lang.String name,
+                                         java.lang.String[] sigs)
+                                  throws JiBXException
+
+
Get static method by fully qualified name. This splits the class + name from the method name, finds the class, and then tries to find a + matching method name in that class. +

+

+
Parameters:
name - fully qualified class and method name
sigs - possible method signatures +
Returns:
information for the method, or null if not found +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+getSignatureVariants

+
+public static java.lang.String[] getSignatureVariants(java.lang.String name)
+                                               throws JiBXException
+
+
Get all variant signatures for a fully qualified class name. The + returned array gives all signatures (for interfaces or classes) which + instances of the class can match. +

+

+
Parameters:
name - fully qualified class name +
Returns:
possible signature variations for instances of the class +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+isAssignable

+
+public static boolean isAssignable(java.lang.String from,
+                                   java.lang.String to)
+                            throws JiBXException
+
+
Check if a value of one type can be directly assigned to another type. + This is basically the equivalent of the instanceof operator, but with + application to primitive types as well as object types. +

+

+
Parameters:
from - fully qualified class name of initial type
to - fully qualified class name of assignment type +
Returns:
true if assignable, false if not +
Throws: +
JiBXException - if configuration error
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ClassFile.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ClassFile.html @@ -0,0 +1,2715 @@ + + + + + + +ClassFile (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ClassFile

+
+java.lang.Object
+  extended by org.jibx.binding.classes.ClassFile
+
+
+
+
public class ClassFile
extends java.lang.Object
+ + +

+Class file information. Wraps the actual class file data as well as + associated management information. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static ExistingMethod[]EMPTY_METHOD_ARRAY + +
+           
+private  org.apache.bcel.classfile.JavaClassm_curClass + +
+          Base class information as loaded by BCEL.
+private  java.io.Filem_file + +
+          Actual class file information.
+private  org.apache.bcel.generic.ClassGenm_genClass + +
+          Modified class generator (lazy create, only if needed).
+private  org.apache.bcel.generic.ConstantPoolGenm_genPool + +
+          Constant pool generator for modified class (lazy create, only if + needed).
+private  intm_hashCode + +
+          Cached hash code value for class.
+private  intm_inheritDepth + +
+          Depth of superclass hierarchy for class (lazy computation).
+private  java.lang.String[]m_instanceOfs + +
+          All classes and interfaces of which this is an instance (lazy create, + only if needed.
+protected  InstructionBuilderm_instBuilder + +
+          Instruction factory for modified class (lazy create, only if needed).
+protected  java.lang.String[]m_interfaceNames + +
+          Names of all interfaces directly implemented by this class.
+private  booleanm_isHashCurrent + +
+          Hash code computation for class is current flag.
+private  booleanm_isModified + +
+          Flag for class modified.
+private  booleanm_isSamePackage + +
+          Class in same package as superclass flag.
+private  booleanm_isWritable + +
+          File is writable flag.
+private  java.util.HashMapm_itemMap + +
+          Map to class item information.
+private  org.apache.bcel.classfile.Method[]m_methods + +
+          All methods defined by this class or interface (lazy create, only if + needed.
+private  java.lang.Stringm_name + +
+          Fully qualified class name.
+private  java.io.Filem_root + +
+          Directory root for class.
+private  java.lang.Stringm_signature + +
+          Signature for class as type.
+private  java.util.HashMapm_suffixMap + +
+          Map for method names with possibly generated suffixes (lazy create, only + if needed).
+protected  ClassFilem_superClass + +
+          Super class of this class (set by caller, since it may require + additional information to find the class file).
+private  ClassFile[]m_superInterfaces + +
+          Class files of interfaces extended by interface.
+private  org.apache.bcel.generic.Typem_type + +
+          Class as type.
+private  intm_uniqueIndex + +
+          Suffix number for making method names unique (lazy computation).
+private  intm_useCount + +
+          Usage count for this class.
+static intPACKAGE_ACCESS + +
+           
+static intPRIVATE_ACCESS + +
+           
+protected static intPRIVATEFIELD_ACCESS + +
+           
+static intPROTECTED_ACCESS + +
+           
+static intPUBLIC_ACCESS + +
+           
+private static java.lang.ClassLoaders_directLoader + +
+          Direct class loader.
+private static org.apache.bcel.util.ClassPaths_loader + +
+          Singleton loader from classpath.
+  + + + + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
ClassFile(java.lang.String name) + +
+          Constructor for preexisting class file from classpath.
ClassFile(java.lang.String name, + java.io.File root, + ClassFile sclas, + int access, + java.lang.String[] impls) + +
+          Constructor for new class file.
ClassFile(java.lang.String name, + java.io.File root, + java.io.File file) + +
+          Constructor for preexisting class file.
ClassFile(java.lang.String name, + java.lang.String sig) + +
+          Constructor for synthetic placeholder classfile with no backing class + data.
ClassFile(java.lang.String name, + java.lang.String path, + java.io.InputStream ins) + +
+          Constructor for class file loaded from a stream.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  voidaccumulateInterfaces(java.lang.String[] intfs, + java.util.HashMap map, + java.util.ArrayList accs) + +
+          Accumulate interface signatures recursively.
+ ClassItemaddDefaultConstructor() + +
+          Add default constructor to a class.
+ ClassItemaddField(java.lang.String type, + java.lang.String name, + int access) + +
+          Add field to class without initialization.
+ ClassItemaddField(java.lang.String type, + java.lang.String name, + int access, + java.lang.String init) + +
+          Add field to class with initial String value.
+ booleanaddInterface(java.lang.String intf) + +
+          Add interface to class.
+ ClassItemaddMethod(org.apache.bcel.classfile.Method method) + +
+          Add method to class.
+ ClassItemaddPrivateField(java.lang.String type, + java.lang.String name) + +
+          Add private field to class without initialization.
+ voidcodeComplete() + +
+          Finalize current modified state of class.
+protected  intcomputeHashCode() + +
+          Computes a hash code based on characteristics of the class.
+ voiddelete() + +
+          Delete class file information.
+ booleandeleteField(java.lang.String name) + +
+          Delete field from class.
+ java.lang.StringderiveClassName(java.lang.String prefix, + java.lang.String suffix) + +
+          Derive generated class name.
+static booleanequalFieldOrMethods(org.apache.bcel.classfile.FieldOrMethod a, + org.apache.bcel.classfile.FieldOrMethod b) + +
+          Compare two field or method items to see if they're equal.
+static booleanequalMethods(org.apache.bcel.classfile.Method a, + org.apache.bcel.classfile.Method b) + +
+          Compare two methods to see if they're equal.
+ booleanequals(java.lang.Object obj) + +
+          Check if objects are equal.
+protected  org.apache.bcel.classfile.FieldgetAccessibleField(java.lang.String name) + +
+          Get internal information for field.
+protected  org.apache.bcel.classfile.MethodgetAccessibleMethod(java.lang.String name, + java.lang.String sig) + +
+          Get internal information for method without respect to potential trailing + arguments or return value.
+private  org.apache.bcel.classfile.MethodgetBestAccessibleMethod(java.lang.String name, + int access, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args) + +
+          Get information for best matching method.
+ ClassItemgetBestMethod(java.lang.String name, + java.lang.String ret, + java.lang.String[] args) + +
+          Get information for best matching method.
+ ExistingMethod[]getBindingMethods(java.lang.String prefix, + java.lang.String[] matches) + +
+          Get all binding methods currently defined in class.
+private  org.apache.bcel.generic.ClassGengetClassGen() + +
+          Get generator for modifying class.
+ org.apache.bcel.generic.ConstantPoolGengetConstPoolGen() + +
+          Get constant pool generator for modifying class.
+protected  org.apache.bcel.classfile.FieldgetDefinedField(java.lang.String name) + +
+          Get internal information for field.
+ ClassItemgetDirectField(java.lang.String name) + +
+          Get information for field.
+ ClassItemgetField(java.lang.String name) + +
+          Get information for field.
+ java.io.FilegetFile() + +
+          Get actual file for class.
+ ClassItemgetInitializerMethod(java.lang.String sig) + +
+          Get information for initializer.
+ java.lang.String[]getInstanceSigs() + +
+          Get signatures for all types of which instances of this type are + instances.
+ InstructionBuildergetInstructionBuilder() + +
+          Get instruction builder for modifying class.
+ java.lang.String[]getInterfaces() + +
+          Get names of all interfaces implemented by class.
+ ClassItemgetMethod(java.lang.String name, + java.lang.String sig) + +
+          Get information for method without respect to potential trailing + arguments or return value.
+ ClassItemgetMethod(java.lang.String name, + java.lang.String[] sigs) + +
+          Get information for method matching one of several possible signatures.
+private  org.apache.bcel.classfile.Method[]getMethods() + +
+          Get array of methods defined by class or interface.
+ java.lang.StringgetName() + +
+          Get fully qualified class name.
+ java.lang.StringgetPackage() + +
+          Get package name.
+ org.apache.bcel.classfile.JavaClassgetRawClass() + +
+          Get raw current class information.
+ java.io.FilegetRoot() + +
+          Get root directory for load path.
+ java.lang.StringgetSignature() + +
+          Get signature for class as type.
+ ClassItemgetStaticMethod(java.lang.String name, + java.lang.String sig) + +
+          Get information for static method without respect to return value.
+ ClassFilegetSuperFile() + +
+          Get superclass information.
+ java.lang.StringgetSuperName() + +
+          Get superclass name.
+ org.apache.bcel.generic.TypegetType() + +
+          Get class as type.
+ intgetUseCount() + +
+          Get use count for class.
+ inthashCode() + +
+          Get hash code.
+ intincrementUseCount() + +
+          Increment use count for class.
+private  voidinit(java.lang.String name, + java.lang.String path, + java.io.InputStream ins) + +
+          Internal initialization method.
+private  voidinitInterface() + +
+          Retrieve superinterfaces for an interface class.
+ booleanisAbstract() + +
+          Check if class is abstract.
+ booleanisAccessible(ClassItem item) + +
+          Check accessible method.
+ booleanisArray() + +
+          Check if class is an array.
+private static booleanisAssignmentCompatible(org.apache.bcel.generic.Type have, + org.apache.bcel.generic.Type need) + +
+          Check if one type is assignment compatible with another type.
+ booleanisComplete() + +
+          Check if class is in complete state.
+ booleanisImplements(java.lang.String sig) + +
+          Check if class implements an interface.
+ booleanisInterface() + +
+          Check if class is an interface.
+ booleanisModifiable() + +
+          Check if class is modifiable.
+ booleanisModified() + +
+          Check if class has been modified.
+private static booleanisSuffixName(java.lang.String name) + +
+          Check if a method name matches the pattern for a generated unique suffix.
+ booleanisSuperclass(java.lang.String name) + +
+          Check if another class is a superclass of this one.
+static java.lang.ClassloadClass(java.lang.String name) + +
+          Try loading class from classpath.
+ java.lang.StringmakeUniqueMethodName(java.lang.String name) + +
+          Make method name unique with generated suffix.
+private static booleanmatchAccess(org.apache.bcel.classfile.FieldOrMethod item, + int access) + +
+          Check for match to specified access level.
+ voidremoveMethod(org.apache.bcel.classfile.Method method) + +
+          Remove method from class.
+ voidsetModified() + +
+          Set class modified flag.
+static voidsetPaths(java.lang.String[] paths) + +
+          Set class paths to be searched.
+ voidsetSuperFile(ClassFile sclas) + +
+          Set superclass information.
+ ClassItemupdateField(java.lang.String type, + java.lang.String name, + int access, + java.lang.String init) + +
+          Update class field with initial String value.
+ voidwriteFile() + +
+          Write out modified class information.
+ voidwriteFile(java.io.OutputStream os) + +
+          Write out modified class information.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+PRIVATE_ACCESS

+
+public static final int PRIVATE_ACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PACKAGE_ACCESS

+
+public static final int PACKAGE_ACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PROTECTED_ACCESS

+
+public static final int PROTECTED_ACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PUBLIC_ACCESS

+
+public static final int PUBLIC_ACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PRIVATEFIELD_ACCESS

+
+protected static final int PRIVATEFIELD_ACCESS
+
+
+
See Also:
Constant Field Values
+
+
+ +

+EMPTY_METHOD_ARRAY

+
+protected static final ExistingMethod[] EMPTY_METHOD_ARRAY
+
+
+
+
+
+ +

+s_loader

+
+private static org.apache.bcel.util.ClassPath s_loader
+
+
Singleton loader from classpath. +

+

+
+
+
+ +

+s_directLoader

+
+private static java.lang.ClassLoader s_directLoader
+
+
Direct class loader. +

+

+
+
+
+ +

+m_name

+
+private java.lang.String m_name
+
+
Fully qualified class name. +

+

+
+
+
+ +

+m_signature

+
+private java.lang.String m_signature
+
+
Signature for class as type. +

+

+
+
+
+ +

+m_type

+
+private org.apache.bcel.generic.Type m_type
+
+
Class as type. +

+

+
+
+
+ +

+m_root

+
+private java.io.File m_root
+
+
Directory root for class. +

+

+
+
+
+ +

+m_file

+
+private java.io.File m_file
+
+
Actual class file information. +

+

+
+
+
+ +

+m_isSamePackage

+
+private boolean m_isSamePackage
+
+
Class in same package as superclass flag. +

+

+
+
+
+ +

+m_isWritable

+
+private boolean m_isWritable
+
+
File is writable flag. +

+

+
+
+
+ +

+m_superClass

+
+protected ClassFile m_superClass
+
+
Super class of this class (set by caller, since it may require + additional information to find the class file). +

+

+
+
+
+ +

+m_interfaceNames

+
+protected java.lang.String[] m_interfaceNames
+
+
Names of all interfaces directly implemented by this class. +

+

+
+
+
+ +

+m_superInterfaces

+
+private ClassFile[] m_superInterfaces
+
+
Class files of interfaces extended by interface. +

+

+
+
+
+ +

+m_instanceOfs

+
+private java.lang.String[] m_instanceOfs
+
+
All classes and interfaces of which this is an instance (lazy create, + only if needed. +

+

+
+
+
+ +

+m_methods

+
+private org.apache.bcel.classfile.Method[] m_methods
+
+
All methods defined by this class or interface (lazy create, only if + needed. +

+

+
+
+
+ +

+m_curClass

+
+private org.apache.bcel.classfile.JavaClass m_curClass
+
+
Base class information as loaded by BCEL. +

+

+
+
+
+ +

+m_genClass

+
+private org.apache.bcel.generic.ClassGen m_genClass
+
+
Modified class generator (lazy create, only if needed). +

+

+
+
+
+ +

+m_genPool

+
+private org.apache.bcel.generic.ConstantPoolGen m_genPool
+
+
Constant pool generator for modified class (lazy create, only if + needed). +

+

+
+
+
+ +

+m_instBuilder

+
+protected InstructionBuilder m_instBuilder
+
+
Instruction factory for modified class (lazy create, only if needed). +

+

+
+
+
+ +

+m_suffixMap

+
+private java.util.HashMap m_suffixMap
+
+
Map for method names with possibly generated suffixes (lazy create, only + if needed). +

+

+
+
+
+ +

+m_itemMap

+
+private java.util.HashMap m_itemMap
+
+
Map to class item information. +

+

+
+
+
+ +

+m_isModified

+
+private boolean m_isModified
+
+
Flag for class modified. +

+

+
+
+
+ +

+m_useCount

+
+private int m_useCount
+
+
Usage count for this class. +

+

+
+
+
+ +

+m_isHashCurrent

+
+private boolean m_isHashCurrent
+
+
Hash code computation for class is current flag. +

+

+
+
+
+ +

+m_hashCode

+
+private int m_hashCode
+
+
Cached hash code value for class. +

+

+
+
+
+ +

+m_inheritDepth

+
+private int m_inheritDepth
+
+
Depth of superclass hierarchy for class (lazy computation). +

+

+
+
+
+ +

+m_uniqueIndex

+
+private int m_uniqueIndex
+
+
Suffix number for making method names unique (lazy computation). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ClassFile

+
+public ClassFile(java.lang.String name,
+                 java.lang.String path,
+                 java.io.InputStream ins)
+          throws JiBXException
+
+
Constructor for class file loaded from a stream. Loads the class data + and prepares it for use. +

+

+
Parameters:
name - fully qualified class name
path - class file path
ins - input stream for class file data +
Throws: +
JiBXException - if unable to load class file
+
+
+ +

+ClassFile

+
+public ClassFile(java.lang.String name,
+                 java.io.File root,
+                 java.io.File file)
+          throws java.io.IOException,
+                 JiBXException
+
+
Constructor for preexisting class file. Loads the class data and + prepares it for use. +

+

+
Parameters:
name - fully qualified class name
root - directory root from class loading path list
file - actual class file +
Throws: +
java.io.IOException - if unable to open file +
JiBXException - if error in reading class file
+
+
+ +

+ClassFile

+
+public ClassFile(java.lang.String name)
+          throws java.io.IOException,
+                 JiBXException
+
+
Constructor for preexisting class file from classpath. Loads the class + data and prepares it for use. +

+

+
Parameters:
name - fully qualified class name +
Throws: +
java.io.IOException - if unable to open file +
JiBXException - if error in reading class file
+
+
+ +

+ClassFile

+
+public ClassFile(java.lang.String name,
+                 java.lang.String sig)
+
+
Constructor for synthetic placeholder classfile with no backing class + data. +

+

+
Parameters:
name - fully qualified class name
sig - corresponding class signature
+
+
+ +

+ClassFile

+
+public ClassFile(java.lang.String name,
+                 java.io.File root,
+                 ClassFile sclas,
+                 int access,
+                 java.lang.String[] impls)
+          throws JiBXException
+
+
Constructor for new class file. Initializes the class data and + prepares it for use. +

+

+
Parameters:
name - fully qualified class name
root - directory root from class loading path list
sclas - superclass of new class
access - access flags for class
impls - array of interfaces implemented by new class +
Throws: +
JiBXException - on error loading interface information
+
+ + + + + + + + +
+Method Detail
+ +

+init

+
+private void init(java.lang.String name,
+                  java.lang.String path,
+                  java.io.InputStream ins)
+           throws JiBXException
+
+
Internal initialization method. This is used to handle common + initialization for the constructors. +

+

+
Parameters:
name - fully qualified class name
path - class file path
ins - input stream for class file data +
Throws: +
JiBXException - if unable to load class file
+
+
+
+ +

+initInterface

+
+private void initInterface()
+                    throws JiBXException
+
+
Retrieve superinterfaces for an interface class. These are collected at + initialization so that we can support getting the full set of methods + later without worrying about throwing an exception. +

+

+ +
Throws: +
JiBXException - on error loading interface information
+
+
+
+ +

+isInterface

+
+public boolean isInterface()
+
+
Check if class is an interface. This only checks existing classes, + assuming that no generated classes are interfaces. +

+

+ +
Returns:
true if an interface, false if not
+
+
+
+ +

+isAbstract

+
+public boolean isAbstract()
+
+
Check if class is abstract. This only checks existing classes, + assuming that no generated classes are abstract. +

+

+ +
Returns:
true if an abstract class, false if not
+
+
+
+ +

+isArray

+
+public boolean isArray()
+
+
Check if class is an array. This only checks existing classes, + assuming that no generated classes are arrays. +

+

+ +
Returns:
true if an array class, false if not
+
+
+
+ +

+isModifiable

+
+public boolean isModifiable()
+
+
Check if class is modifiable. +

+

+ +
Returns:
true if class is modifiable, false if + not
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+
+
Get fully qualified class name. +

+

+ +
Returns:
fully qualified name for class
+
+
+
+ +

+getSignature

+
+public java.lang.String getSignature()
+
+
Get signature for class as type. +

+

+ +
Returns:
signature for class used as type
+
+
+
+ +

+getType

+
+public org.apache.bcel.generic.Type getType()
+
+
Get class as type. +

+

+ +
Returns:
class as type
+
+
+
+ +

+getPackage

+
+public java.lang.String getPackage()
+
+
Get package name. +

+

+ +
Returns:
package name for class
+
+
+
+ +

+getRoot

+
+public java.io.File getRoot()
+
+
Get root directory for load path. +

+

+ +
Returns:
root directory in path used for loading file
+
+
+
+ +

+getFile

+
+public java.io.File getFile()
+
+
Get actual file for class. +

+

+ +
Returns:
file used for class
+
+
+
+ +

+getRawClass

+
+public org.apache.bcel.classfile.JavaClass getRawClass()
+
+
Get raw current class information. +

+

+ +
Returns:
raw current class information
+
+
+
+ +

+getSuperName

+
+public java.lang.String getSuperName()
+
+
Get superclass name. +

+

+ +
Returns:
fully qualified name of superclass
+
+
+
+ +

+setSuperFile

+
+public void setSuperFile(ClassFile sclas)
+
+
Set superclass information. +

+

+
Parameters:
sclas - superclass information
+
+
+
+ +

+getSuperFile

+
+public ClassFile getSuperFile()
+
+
Get superclass information. +

+

+ +
Returns:
super class information as loaded (null if no + superclass - java.lang.Object, interface, or primitive)
+
+
+
+ +

+getInterfaces

+
+public java.lang.String[] getInterfaces()
+
+
Get names of all interfaces implemented by class. +

+

+ +
Returns:
names of all interfaces implemented directly by class
+
+
+
+ +

+addInterface

+
+public boolean addInterface(java.lang.String intf)
+                     throws JiBXException
+
+
Add interface to class. The interface is added to the class if not + already defined. +

+

+
Parameters:
intf - fully qualified interface name +
Returns:
true if added, false if already present +
Throws: +
JiBXException - on configuration error
+
+
+
+ +

+accumulateInterfaces

+
+protected void accumulateInterfaces(java.lang.String[] intfs,
+                                    java.util.HashMap map,
+                                    java.util.ArrayList accs)
+                             throws JiBXException
+
+
Accumulate interface signatures recursively. +

+

+
Parameters:
intfs - names of interfaces implemented
map - map for interfaces already accumulated
accs - accumulated interface names +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+getInstanceSigs

+
+public java.lang.String[] getInstanceSigs()
+                                   throws JiBXException
+
+
Get signatures for all types of which instances of this type are + instances. +

+

+ +
Returns:
all signatures suppored by instances +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+isImplements

+
+public boolean isImplements(java.lang.String sig)
+                     throws JiBXException
+
+
Check if class implements an interface. +

+

+
Parameters:
sig - signature of interface to be checked +
Returns:
true if interface is implemented by class, + false if not +
Throws: +
JiBXException - if configuration error
+
+
+
+ +

+isSuperclass

+
+public boolean isSuperclass(java.lang.String name)
+
+
Check if another class is a superclass of this one. +

+

+
Parameters:
name - of superclass to be checked +
Returns:
true if named class is a superclass of this one, + false if not
+
+
+
+ +

+getDefinedField

+
+protected org.apache.bcel.classfile.Field getDefinedField(java.lang.String name)
+
+
Get internal information for field. This can only be used with + existing classes, and only checks for fields that are actually members + of the class (not superclasses). +

+

+
Parameters:
name - field name +
Returns:
field information, or null if field not found
+
+
+
+ +

+getAccessibleField

+
+protected org.apache.bcel.classfile.Field getAccessibleField(java.lang.String name)
+
+
Get internal information for field. This can only be used with existing + classes. If the field is not found directly, superclasses are checked for + inherited fields matching the supplied name. +

+

+
Parameters:
name - field name +
Returns:
field information, or null if field not found
+
+
+
+ +

+getDirectField

+
+public ClassItem getDirectField(java.lang.String name)
+
+
Get information for field. This can only be used with existing classes, + and only checks for fields that are actually members of the class (not + superclasses). +

+

+
Parameters:
name - field name +
Returns:
field information, or null if field not found
+
+
+
+ +

+getField

+
+public ClassItem getField(java.lang.String name)
+                   throws JiBXException
+
+
Get information for field. This can only be used with existing classes. + If the field is not found directly, superclasses are checked for + inherited fields matching the supplied name. +

+

+
Parameters:
name - field name +
Returns:
field information +
Throws: +
JiBXException - if field not found
+
+
+
+ +

+getMethods

+
+private org.apache.bcel.classfile.Method[] getMethods()
+
+
Get array of methods defined by class or interface. In the case of an + interface, this merges all methods from superinterfaces in the array + returned. +

+

+ +
Returns:
array of methods defined by class
+
+
+
+ +

+getAccessibleMethod

+
+protected org.apache.bcel.classfile.Method getAccessibleMethod(java.lang.String name,
+                                                               java.lang.String sig)
+
+
Get internal information for method without respect to potential trailing + arguments or return value. This can only be used with existing classes. + If the method is not found directly, superclasses are checked for + inherited methods matching the supplied name. This compares the supplied + partial signature against the actual method signature, and considers it + a match if the actual sigature starts with the supplied signature.. +

+

+
Parameters:
name - method name
sig - partial method signature to be matched +
Returns:
method information, or null if method not found
+
+
+
+ +

+getMethod

+
+public ClassItem getMethod(java.lang.String name,
+                           java.lang.String sig)
+
+
Get information for method without respect to potential trailing + arguments or return value. This can only be used with existing classes. + If the method is not found directly, superclasses are checked for + inherited methods matching the supplied name. This compares the supplied + partial signature against the actual method signature, and considers it + a match if the actual sigature starts with the supplied signature.. +

+

+
Parameters:
name - method name
sig - partial method signature to be matched +
Returns:
method information, or null if method not found
+
+
+
+ +

+getMethod

+
+public ClassItem getMethod(java.lang.String name,
+                           java.lang.String[] sigs)
+
+
Get information for method matching one of several possible signatures. + This can only be used with existing classes. If a match is not found + directly, superclasses are checked for inherited methods matching the + supplied name and signatures. The signature variations are checked in + the order supplied. +

+

+
Parameters:
name - method name
sigs - possible signatures for method (including return type) +
Returns:
method information, or null if method not found
+
+
+
+ +

+matchAccess

+
+private static boolean matchAccess(org.apache.bcel.classfile.FieldOrMethod item,
+                                   int access)
+
+
Check for match to specified access level. This treats a field or method + as matching if the access level is the same as or more open than the + required level. +

+

+
Parameters:
item - information for field or method to be checked
access - required access level for match +
Returns:
true if access level match, false if + not
+
+
+
+ +

+isAssignmentCompatible

+
+private static boolean isAssignmentCompatible(org.apache.bcel.generic.Type have,
+                                              org.apache.bcel.generic.Type need)
+
+
Check if one type is assignment compatible with another type. This is an + ugly replacement for apparently broken BCEL code. +

+

+
Parameters:
have - type being checked
need - type needed +
Returns:
true if compatible, false if not
+
+
+
+ +

+getBestAccessibleMethod

+
+private org.apache.bcel.classfile.Method getBestAccessibleMethod(java.lang.String name,
+                                                                 int access,
+                                                                 org.apache.bcel.generic.Type ret,
+                                                                 org.apache.bcel.generic.Type[] args)
+
+
Get information for best matching method. This tries to find a method + which matches the specified name, return type, and argument types. If an + exact match is not found it looks for a method with a return type that + is extended or implemented by the specified type and arguments that are + extended or implemented by the specified types. This can only be used + with existing classes. If the method is not found directly, superclasses + are checked for inherited methods. +

+

+
Parameters:
name - method name
access - access level required for matching methods
ret - return value type (null if indeterminant)
args - argument value types +
Returns:
method information, or null if method not found
+
+
+
+ +

+getBestMethod

+
+public ClassItem getBestMethod(java.lang.String name,
+                               java.lang.String ret,
+                               java.lang.String[] args)
+
+
Get information for best matching method. This tries to find a method + which matches the specified name, return type, and argument types. If an + exact match is not found it looks for a method with a return type that + is extended or implemented by the specified type and arguments that are + extended or implemented by the specified types. This can only be used + with existing classes. If the method is not found directly, superclasses + are checked for inherited methods. +

+

+
Parameters:
name - method name
ret - return value type (null if indeterminant)
args - argument value types +
Returns:
method information, or null if method not found
+
+
+
+ +

+getInitializerMethod

+
+public ClassItem getInitializerMethod(java.lang.String sig)
+
+
Get information for initializer. This can only be used with existing + classes. Only the class itself is checked for an initializer matching + the argument list signature. +

+

+
Parameters:
sig - encoded argument list signature +
Returns:
method information, or null if method not found
+
+
+
+ +

+getStaticMethod

+
+public ClassItem getStaticMethod(java.lang.String name,
+                                 java.lang.String sig)
+
+
Get information for static method without respect to return value. This + can only be used with existing classes. Only the class itself is checked + for a method matching the supplied name and argument list signature. +

+

+
Parameters:
name - method name
sig - encoded argument list signature +
Returns:
method information, or null if method not found
+
+
+
+ +

+getBindingMethods

+
+public ExistingMethod[] getBindingMethods(java.lang.String prefix,
+                                          java.lang.String[] matches)
+
+
Get all binding methods currently defined in class. Binding methods are + generally identified by a supplied prefix, but additional methods + can be specified the the combination of exact name and signature. This + is a little kludgy, but necessary to handle the "marshal" method added + to mapped classes. +

+

+
Parameters:
prefix - identifying prefix for binding methods
matches - pairs of method name and signature to be matched as + exceptions to the prefix matching +
Returns:
existing binding methods
+
+
+
+ +

+isAccessible

+
+public boolean isAccessible(ClassItem item)
+
+
Check accessible method. Check if a field or method in another class is + accessible from within this class. +

+

+
Parameters:
item - field or method information +
Returns:
true if accessible, false if not
+
+
+
+ +

+getClassGen

+
+private org.apache.bcel.generic.ClassGen getClassGen()
+                                              throws JiBXException
+
+
Get generator for modifying class. +

+

+ +
Returns:
generator for class +
Throws: +
JiBXException - if class not modifiable
+
+
+
+ +

+getConstPoolGen

+
+public org.apache.bcel.generic.ConstantPoolGen getConstPoolGen()
+                                                        throws JiBXException
+
+
Get constant pool generator for modifying class. +

+

+ +
Returns:
constant pool generator for class +
Throws: +
JiBXException - if class not modifiable
+
+
+
+ +

+getInstructionBuilder

+
+public InstructionBuilder getInstructionBuilder()
+                                         throws JiBXException
+
+
Get instruction builder for modifying class. +

+

+ +
Returns:
instruction builder for class +
Throws: +
JiBXException - if class not modifiable
+
+
+
+ +

+addMethod

+
+public ClassItem addMethod(org.apache.bcel.classfile.Method method)
+                    throws JiBXException
+
+
Add method to class. +

+

+
Parameters:
method - method to be added +
Returns:
added method information +
Throws: +
JiBXException - on error in adding method
+
+
+
+ +

+removeMethod

+
+public void removeMethod(org.apache.bcel.classfile.Method method)
+                  throws JiBXException
+
+
Remove method from class. +

+

+
Parameters:
method - method to be removed +
Throws: +
JiBXException - on error in removing method
+
+
+
+ +

+addField

+
+public ClassItem addField(java.lang.String type,
+                          java.lang.String name,
+                          int access,
+                          java.lang.String init)
+                   throws JiBXException
+
+
Add field to class with initial String value. If a field + with the same name already exists, it is overwritten. +

+

+
Parameters:
type - fully qualified class name of field type
name - field name
access - access flags for field
init - initial value for field +
Returns:
field information +
Throws: +
JiBXException - if unable to add field
+
+
+
+ +

+updateField

+
+public ClassItem updateField(java.lang.String type,
+                             java.lang.String name,
+                             int access,
+                             java.lang.String init)
+                      throws JiBXException
+
+
Update class field with initial String value. If the field + already exists with the same characteristics it is left unchanged; + otherwise any existing field with the same name is overwritten. +

+

+
Parameters:
type - fully qualified class name of field type
name - field name
access - access flags for field
init - initial value for field +
Returns:
field information +
Throws: +
JiBXException - if unable to add field
+
+
+
+ +

+addField

+
+public ClassItem addField(java.lang.String type,
+                          java.lang.String name,
+                          int access)
+                   throws JiBXException
+
+
Add field to class without initialization. If a field with the same name + already exists, it is overwritten. +

+

+
Parameters:
type - fully qualified class name of field type
name - field name
access - access flags for field +
Returns:
field information +
Throws: +
JiBXException - if unable to add field
+
+
+
+ +

+addPrivateField

+
+public ClassItem addPrivateField(java.lang.String type,
+                                 java.lang.String name)
+                          throws JiBXException
+
+
Add private field to class without initialization. If a field + with the same name already exists, it is overwritten. +

+

+
Parameters:
type - fully qualified class name of field type
name - field name +
Returns:
field information +
Throws: +
JiBXException - if unable to add field
+
+
+
+ +

+addDefaultConstructor

+
+public ClassItem addDefaultConstructor()
+                                throws JiBXException
+
+
Add default constructor to a class. Just calls the default constructor + for the parent class (which must exist). +

+

+ +
Returns:
constructor information +
Throws: +
JiBXException - if unable to add constructor
+
+
+
+ +

+isSuffixName

+
+private static boolean isSuffixName(java.lang.String name)
+
+
Check if a method name matches the pattern for a generated unique suffix. +

+

+
Parameters:
name - method name to be checked +
Returns:
true if name matches suffix pattern, + false if not
+
+
+
+ +

+makeUniqueMethodName

+
+public java.lang.String makeUniqueMethodName(java.lang.String name)
+
+
Make method name unique with generated suffix. The suffixed method name + is tracked so that it will not be used again. +

+

+
Parameters:
name - base name before suffix is appended +
Returns:
name with unique suffix appended
+
+
+
+ +

+deleteField

+
+public boolean deleteField(java.lang.String name)
+                    throws JiBXException
+
+
Delete field from class. +

+

+
Parameters:
name - field name +
Returns:
true if field was present, false if not +
Throws: +
JiBXException - if unable to delete field
+
+
+
+ +

+getUseCount

+
+public int getUseCount()
+
+
Get use count for class. +

+

+ +
Returns:
use count for this class
+
+
+
+ +

+incrementUseCount

+
+public int incrementUseCount()
+
+
Increment use count for class. +

+

+ +
Returns:
use count (after increment)
+
+
+
+ +

+isModified

+
+public boolean isModified()
+
+
Check if class has been modified. +

+

+ +
Returns:
true if class is modified, false if not
+
+
+
+ +

+setModified

+
+public void setModified()
+
+
Set class modified flag. +

+

+
+
+
+
+ +

+isComplete

+
+public boolean isComplete()
+
+
Check if class is in complete state. +

+

+ +
Returns:
true if class is complete, false if not
+
+
+
+ +

+computeHashCode

+
+protected int computeHashCode()
+
+
Computes a hash code based on characteristics of the class. The + characteristics used in computing the hash code include the base class, + implemented interfaces, method names, field names, and package, but not + the actual class name or signature. The current static version of the + class is used for this computation, so if the class is being modified + codeComplete() should be called before this method. Note that this + is designed for use with the classes generated by JiBX, and is not + necessarily a good model for general usage. +

+

+ +
Returns:
computed hash code value
+
+
+
+ +

+codeComplete

+
+public void codeComplete()
+
+
Finalize current modified state of class. This converts the modified + class state into a static form, then computes a hash code based on + characteristics of the class. If the class has not been modified it + just computes the hash code. Note that this won't initialize the array + of superinterfaces if used with an interface, but that shouldn't be a + problem since we don't create any interfaces. +

+

+
+
+
+
+ +

+hashCode

+
+public int hashCode()
+
+
Get hash code. This is based on most characteristics of the class, + including the actual methods, but excluding the class name. It is only + valid after the codeComplete() method is called. +

+

+
Overrides:
hashCode in class java.lang.Object
+
+
+ +
Returns:
hash code based on code sequence
+
+
+
+ +

+equalFieldOrMethods

+
+public static boolean equalFieldOrMethods(org.apache.bcel.classfile.FieldOrMethod a,
+                                          org.apache.bcel.classfile.FieldOrMethod b)
+
+
Compare two field or method items to see if they're equal. This handles + only the comparisons that apply to both fields and methods. It does not + include comparing access flags, since these may be different due to + access requirements. +

+

+
Parameters:
a - first field or method item
b - second field or method item +
Returns:
true if the equal, false if not
+
+
+
+ +

+equalMethods

+
+public static boolean equalMethods(org.apache.bcel.classfile.Method a,
+                                   org.apache.bcel.classfile.Method b)
+
+
Compare two methods to see if they're equal. This checks only the details + of the exception handling and actual code, not the name or signature. +

+

+
Parameters:
a - first method
b - second method +
Returns:
true if the equal, false if not
+
+
+
+ +

+equals

+
+public boolean equals(java.lang.Object obj)
+
+
Check if objects are equal. Compares first based on hash code, then on + the actual contents of the class, including package, implemented + interfaces, superclass, methods, and fields (but not the actual class + name). It is only valid after the codeComplete() method is called. +

+

+
Overrides:
equals in class java.lang.Object
+
+
+ +
Returns:
true if equal objects, false if not
+
+
+
+ +

+delete

+
+public void delete()
+
+
Delete class file information. Deletes the class file for this class, + if it exists. Does nothing if no class file has been generated. +

+

+
+
+
+
+ +

+writeFile

+
+public void writeFile(java.io.OutputStream os)
+               throws java.io.IOException
+
+
Write out modified class information. Writes the modified class file to + an output stream. +

+

+
Parameters:
os - output stream for writing modified class +
Throws: +
java.io.IOException - if error writing to file
+
+
+
+ +

+writeFile

+
+public void writeFile()
+               throws java.io.IOException
+
+
Write out modified class information. Writes the modified class file + back out to the original file. If the class file has not been modified, + the original file is kept unchanged. +

+

+ +
Throws: +
java.io.IOException - if error writing to file
+
+
+
+ +

+deriveClassName

+
+public java.lang.String deriveClassName(java.lang.String prefix,
+                                        java.lang.String suffix)
+
+
Derive generated class name. This generates a JiBX class name from the + name of this class, using the supplied prefix and suffix information. The + derived class name is always in the same package as this class. +

+

+
Parameters:
prefix - generated class name prefix
suffix - generated class name suffix +
Returns:
derived class name
+
+
+
+ +

+setPaths

+
+public static void setPaths(java.lang.String[] paths)
+
+
Set class paths to be searched. +

+

+
Parameters:
paths - ordered set of paths to be searched for class files
+
+
+
+ +

+loadClass

+
+public static java.lang.Class loadClass(java.lang.String name)
+
+
Try loading class from classpath. +

+

+
Parameters:
name - fully qualified name of class to be loaded +
Returns:
loaded class, or null if not found
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/InstructionBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/InstructionBuilder.html @@ -0,0 +1,649 @@ + + + + + + +InstructionBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class InstructionBuilder

+
+java.lang.Object
+  extended by org.apache.bcel.generic.InstructionFactory
+      extended by org.jibx.binding.classes.InstructionBuilder
+
+
+
All Implemented Interfaces:
java.io.Serializable, org.apache.bcel.generic.InstructionConstants
+
+
+
+
public class InstructionBuilder
extends org.apache.bcel.generic.InstructionFactory
+ + +

+Instruction builder. Extends the basic instruction construction tools in + BCEL with some convenience methods. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
See Also:
Serialized Form
+
+ +

+ + + + + + + +
+Nested Class Summary
+ + + + + + + +
Nested classes/interfaces inherited from interface org.apache.bcel.generic.InstructionConstants
org.apache.bcel.generic.InstructionConstants.Clinit
+  + + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.apache.bcel.generic.InstructionFactory
cg, cp
+ + + + + + + +
Fields inherited from interface org.apache.bcel.generic.InstructionConstants
AALOAD, AASTORE, ACONST_NULL, ALOAD_0, ALOAD_1, ALOAD_2, ARETURN, ARRAYLENGTH, ASTORE_0, ASTORE_1, ASTORE_2, ATHROW, BALOAD, BASTORE, bla, CALOAD, CASTORE, D2F, D2I, D2L, DADD, DALOAD, DASTORE, DCMPG, DCMPL, DCONST_0, DCONST_1, DDIV, DMUL, DNEG, DREM, DRETURN, DSUB, DUP, DUP_X1, DUP_X2, DUP2, DUP2_X1, DUP2_X2, F2D, F2I, F2L, FADD, FALOAD, FASTORE, FCMPG, FCMPL, FCONST_0, FCONST_1, FCONST_2, FDIV, FMUL, FNEG, FREM, FRETURN, FSUB, I2B, I2C, I2D, I2F, I2L, I2S, IADD, IALOAD, IAND, IASTORE, ICONST_0, ICONST_1, ICONST_2, ICONST_3, ICONST_4, ICONST_5, ICONST_M1, IDIV, ILOAD_0, ILOAD_1, ILOAD_2, IMUL, INEG, INSTRUCTIONS, IOR, IREM, IRETURN, ISHL, ISHR, ISTORE_0, ISTORE_1, ISTORE_2, ISUB, IUSHR, IXOR, L2D, L2F, L2I, LADD, LALOAD, LAND, LASTORE, LCMP, LCONST_0, LCONST_1, LDIV, LMUL, LNEG, LOR, LREM, LRETURN, LSHL, LSHR, LSUB, LUSHR, LXOR, MONITORENTER, MONITOREXIT, NOP, POP, POP2, RETURN, SALOAD, SASTORE, SWAP, THIS
+  + + + + + + + + + + +
+Constructor Summary
InstructionBuilder(org.apache.bcel.generic.ClassGen cg, + org.apache.bcel.generic.ConstantPoolGen cp) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ org.apache.bcel.generic.InvokeInstructioncreateCallInit(java.lang.String name, + java.lang.String signature) + +
+          Create invoke initializer instruction from signature.
+ org.apache.bcel.generic.InvokeInstructioncreateCallInterface(ClassItem item) + +
+          Create invoke instruction for interface method.
+ org.apache.bcel.generic.InvokeInstructioncreateCallInterface(java.lang.String method, + java.lang.String signature) + +
+          Create invoke interface method instruction from signature.
+ org.apache.bcel.generic.InvokeInstructioncreateCallStatic(ClassItem item) + +
+          Create invoke instruction for static method.
+ org.apache.bcel.generic.InvokeInstructioncreateCallStatic(java.lang.String method, + java.lang.String signature) + +
+          Create invoke static method instruction from signature.
+ org.apache.bcel.generic.InvokeInstructioncreateCallVirtual(ClassItem item) + +
+          Create invoke instruction for virtual method.
+ org.apache.bcel.generic.InvokeInstructioncreateCallVirtual(java.lang.String method, + java.lang.String signature) + +
+          Create invoke virtual method instruction from signature.
+ org.apache.bcel.generic.FieldInstructioncreateGetField(ClassItem item) + +
+          Create getfield instruction.
+ org.apache.bcel.generic.FieldInstructioncreateGetStatic(ClassItem item) + +
+          Create getstatic instruction.
+ org.apache.bcel.generic.CompoundInstructioncreateLoadConstant(int value) + +
+          Create load constant instruction.
+ org.apache.bcel.generic.CompoundInstructioncreateLoadConstant(java.lang.Object value) + +
+          Create load constant instruction.
+ org.apache.bcel.generic.CompoundInstructioncreateLoadConstant(java.lang.String value) + +
+          Create load constant instruction.
+ org.apache.bcel.generic.FieldInstructioncreatePutField(ClassItem item) + +
+          Create putfield instruction.
+ org.apache.bcel.generic.FieldInstructioncreatePutStatic(ClassItem item) + +
+          Create putstatic instruction.
+ org.apache.bcel.generic.ConstantPoolGengetConstantPoolGen() + +
+          Get constant pool generator.
+ + + + + + + +
Methods inherited from class org.apache.bcel.generic.InstructionFactory
createAppend, createArrayLoad, createArrayStore, createBinaryOperation, createBranchInstruction, createCast, createCheckCast, createConstant, createDup_1, createDup_2, createDup, createFieldAccess, createGetField, createGetStatic, createInstanceOf, createInvoke, createLoad, createNew, createNew, createNewArray, createNull, createPop, createPrintln, createPutField, createPutStatic, createReturn, createStore, createThis, getClassGen, getConstantPool, setClassGen, setConstantPool
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+InstructionBuilder

+
+public InstructionBuilder(org.apache.bcel.generic.ClassGen cg,
+                          org.apache.bcel.generic.ConstantPoolGen cp)
+
+
Constructor. +

+

+
Parameters:
cg - class generation information
cp - constant pool generator
+
+ + + + + + + + +
+Method Detail
+ +

+getConstantPoolGen

+
+public org.apache.bcel.generic.ConstantPoolGen getConstantPoolGen()
+
+
Get constant pool generator. +

+

+ +
Returns:
constant pool generator for class
+
+
+
+ +

+createLoadConstant

+
+public org.apache.bcel.generic.CompoundInstruction createLoadConstant(int value)
+
+
Create load constant instruction. Builds the most appropriate type of + instruction for the value. +

+

+
Parameters:
value - constant value to be loaded +
Returns:
generated instruction information
+
+
+
+ +

+createLoadConstant

+
+public org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.String value)
+
+
Create load constant instruction. Loads a String reference + from the constant pool. +

+

+
Parameters:
value - constant value to be loaded +
Returns:
generated instruction information
+
+
+
+ +

+createLoadConstant

+
+public org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.Object value)
+
+
Create load constant instruction. Loads an unwrapped primitive value or + String from the constant pool. +

+

+
Parameters:
value - constant value to be loaded +
Returns:
generated instruction information
+
+
+
+ +

+createGetField

+
+public org.apache.bcel.generic.FieldInstruction createGetField(ClassItem item)
+
+
Create getfield instruction. Uses the field information to generate + the instruction. +

+

+
Parameters:
item - information for field to be set +
Returns:
generated instruction information
+
+
+
+ +

+createPutField

+
+public org.apache.bcel.generic.FieldInstruction createPutField(ClassItem item)
+
+
Create putfield instruction. Uses the field information to generate + the instruction. +

+

+
Parameters:
item - information for field to be set +
Returns:
generated instruction information
+
+
+
+ +

+createGetStatic

+
+public org.apache.bcel.generic.FieldInstruction createGetStatic(ClassItem item)
+
+
Create getstatic instruction. Uses the field information to generate + the instruction. +

+

+
Parameters:
item - information for field to be set +
Returns:
generated instruction information
+
+
+
+ +

+createPutStatic

+
+public org.apache.bcel.generic.FieldInstruction createPutStatic(ClassItem item)
+
+
Create putstatic instruction. Uses the field information to generate + the instruction. +

+

+
Parameters:
item - information for field to be set +
Returns:
generated instruction information
+
+
+
+ +

+createCallStatic

+
+public org.apache.bcel.generic.InvokeInstruction createCallStatic(ClassItem item)
+
+
Create invoke instruction for static method. Uses the method information + to generate the instruction. +

+

+
Parameters:
item - information for method to be called +
Returns:
generated instruction information
+
+
+
+ +

+createCallVirtual

+
+public org.apache.bcel.generic.InvokeInstruction createCallVirtual(ClassItem item)
+
+
Create invoke instruction for virtual method. Uses the method information + to generate the instruction. +

+

+
Parameters:
item - information for method to be called +
Returns:
generated instruction information
+
+
+
+ +

+createCallInterface

+
+public org.apache.bcel.generic.InvokeInstruction createCallInterface(ClassItem item)
+
+
Create invoke instruction for interface method. Uses the method + information to generate the instruction. +

+

+
Parameters:
item - information for method to be called +
Returns:
generated instruction information
+
+
+
+ +

+createCallStatic

+
+public org.apache.bcel.generic.InvokeInstruction createCallStatic(java.lang.String method,
+                                                                  java.lang.String signature)
+
+
Create invoke static method instruction from signature. +

+

+
Parameters:
method - fully qualified class and method name
signature - method signature in standard form +
Returns:
generated instruction information
+
+
+
+ +

+createCallVirtual

+
+public org.apache.bcel.generic.InvokeInstruction createCallVirtual(java.lang.String method,
+                                                                   java.lang.String signature)
+
+
Create invoke virtual method instruction from signature. +

+

+
Parameters:
method - fully qualified class and method name
signature - method signature in standard form +
Returns:
generated instruction information
+
+
+
+ +

+createCallInterface

+
+public org.apache.bcel.generic.InvokeInstruction createCallInterface(java.lang.String method,
+                                                                     java.lang.String signature)
+
+
Create invoke interface method instruction from signature. +

+

+
Parameters:
method - fully qualified interface and method name
signature - method signature in standard form +
Returns:
generated instruction information
+
+
+
+ +

+createCallInit

+
+public org.apache.bcel.generic.InvokeInstruction createCallInit(java.lang.String name,
+                                                                java.lang.String signature)
+
+
Create invoke initializer instruction from signature. +

+

+
Parameters:
name - fully qualified class name
signature - method signature in standard form +
Returns:
generated instruction information
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/binding/classes/ContextMethodBuilder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/binding/classes/ContextMethodBuilder.html @@ -0,0 +1,643 @@ + + + + + + +ContextMethodBuilder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.binding.classes +
+Class ContextMethodBuilder

+
+java.lang.Object
+  extended by org.jibx.binding.classes.BindingMethod
+      extended by org.jibx.binding.classes.MethodBuilder
+          extended by org.jibx.binding.classes.ExceptionMethodBuilder
+              extended by org.jibx.binding.classes.ContextMethodBuilder
+
+
+
Direct Known Subclasses:
MarshalUnmarshalBuilder
+
+
+
+
public class ContextMethodBuilder
extends ExceptionMethodBuilder
+ + +

+Builder for binding methods with a context and current object. Tracks the + current object reference and the context object reference positions in the + local variables table. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  intm_contextSlot + +
+          Variable slot for context reference.
+private  java.lang.Stringm_contextType + +
+          Context type as accessed by method.
+private  booleanm_isStatic + +
+          Context type as accessed by method.
+private  intm_objectSlot + +
+          Variable slot for current object reference.
+private  java.lang.Stringm_objectType + +
+          Object type as accessed by method.
+ + + + + + + +
Fields inherited from class org.jibx.binding.classes.MethodBuilder
EMPTY_STRING_ARRAY, EXCEPTION_CONSTRUCTOR_SIGNATURE1, EXCEPTION_CONSTRUCTOR_SIGNATURE2, FRAMEWORK_EXCEPTION_CLASS, m_exceptions, m_generator, m_hashCode, m_instructionBuilder, m_item, m_method, m_targetBranches, m_valueMap, s_argNameLists
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
ContextMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf, + int access, + int obj, + java.lang.String type, + int ctx, + java.lang.String ctype) + +
+          Constructor from signature.
ContextMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf, + int obj, + java.lang.String type, + int ctx, + java.lang.String ctype) + +
+          Constructor from signature for public, final method.
ContextMethodBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile cf, + int access, + int obj, + java.lang.String type, + int ctx, + java.lang.String ctype) + +
+          Constructor with types specified.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisStaticMethod() + +
+          Check if method is static.
+ voidloadContext() + +
+          Append instruction to load context to stack.
+ voidloadContext(java.lang.String type) + +
+          Append instruction(s) to load context to stack as specified type.
+ voidloadObject() + +
+          Append instruction to load object to stack.
+ voidloadObject(java.lang.String type) + +
+          Append instruction(s) to load object to stack as specified type.
+ voidsetObjectSlot(int slot) + +
+          Set current object slot.
+ voidstoreObject() + +
+          Append instruction to store object from stack.
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.ExceptionMethodBuilder
defineSlot, freeSlot, getSlot, handleExceptions
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.MethodBuilder
addException, addLocal, addMethod, addMethodExceptions, appendAASTORE, appendACONST_NULL, appendALOAD, appendARRAYLENGTH, appendASTORE, appendCall, appendCallInit, appendCallInterface, appendCallStatic, appendCallVirtual, appendCreateArray, appendCreateCast, appendCreateCast, appendCreateNew, appendDCMPG, appendDUP_X1, appendDUP, appendDUP2, appendFCMPG, appendGet, appendGetField, appendGetStatic, appendIASTORE, appendICONST_0, appendICONST_1, appendIF_ICMPNE, appendIFEQ, appendIFGE, appendIFLT, appendIFNE, appendIFNONNULL, appendIFNULL, appendIncrementLocal, appendInstanceOf, appendISUB, appendIXOR, appendLCMP, appendLoadConstant, appendLoadConstant, appendLoadConstant, appendLoadLocal, appendPOP, appendPOP2, appendPut, appendPutField, appendPutStatic, appendReturn, appendReturn, appendReturn, appendStoreLocal, appendSWAP, appendTargetACONST_NULL, appendTargetCreateNew, appendTargetLoadConstant, appendTargetLoadConstant, appendTargetNOP, appendThrow, appendUnconditionalBranch, codeComplete, createLocal, getAccessFlags, getFirstInstruction, getItem, getKeyValue, getLastInstruction, getMethod, getName, getSignature, hashCode, initStackState, initStackState, initStackState, internalAppendCreateNew, isStackTopLong, setAccessFlags, setKeyValue, setTarget, targetNext, targetNext
+ + + + + + + +
Methods inherited from class org.jibx.binding.classes.BindingMethod
computeMethodHash, equals, getClassFile, makeAccessible
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_objectSlot

+
+private int m_objectSlot
+
+
Variable slot for current object reference. +

+

+
+
+
+ +

+m_objectType

+
+private java.lang.String m_objectType
+
+
Object type as accessed by method. +

+

+
+
+
+ +

+m_contextSlot

+
+private int m_contextSlot
+
+
Variable slot for context reference. +

+

+
+
+
+ +

+m_contextType

+
+private java.lang.String m_contextType
+
+
Context type as accessed by method. +

+

+
+
+
+ +

+m_isStatic

+
+private final boolean m_isStatic
+
+
Context type as accessed by method. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ContextMethodBuilder

+
+public ContextMethodBuilder(java.lang.String name,
+                            org.apache.bcel.generic.Type ret,
+                            org.apache.bcel.generic.Type[] args,
+                            ClassFile cf,
+                            int access,
+                            int obj,
+                            java.lang.String type,
+                            int ctx,
+                            java.lang.String ctype)
+                     throws JiBXException
+
+
Constructor with types specified. This sets up for constructing a + binding method that uses a current object and a marshalling or + unmarshalling context. +

+

+
Parameters:
name - method name to be built
ret - method return type
args - types of arguments
cf - owning class file information
access - flags for method access
obj - variable slot for current object (negative value if to be + defined later)
type - current object type as defined in method
ctx - variable slot for marshalling/unmarshalling context
ctype - context type as defined in method +
Throws: +
JiBXException - on error in initializing method construction
+
+
+ +

+ContextMethodBuilder

+
+public ContextMethodBuilder(java.lang.String name,
+                            java.lang.String sig,
+                            ClassFile cf,
+                            int access,
+                            int obj,
+                            java.lang.String type,
+                            int ctx,
+                            java.lang.String ctype)
+                     throws JiBXException
+
+
Constructor from signature. +

+

+
Parameters:
name - method name to be built
sig - method signature
cf - owning class file information
access - flags for method access
obj - variable slot for current object (negative value if to be + defined later)
type - current object type
ctx - variable slot for marshalling/unmarshalling context
ctype - context type as defined in method +
Throws: +
JiBXException - on error in initializing method construction
+
+
+ +

+ContextMethodBuilder

+
+public ContextMethodBuilder(java.lang.String name,
+                            java.lang.String sig,
+                            ClassFile cf,
+                            int obj,
+                            java.lang.String type,
+                            int ctx,
+                            java.lang.String ctype)
+                     throws JiBXException
+
+
Constructor from signature for public, final method. +

+

+
Parameters:
name - method name to be built
sig - method signature
cf - owning class file information
obj - variable slot for current object (negative value if to be + defined later)
type - current object type
ctx - variable slot for marshalling/unmarshalling context
ctype - context type as defined in method +
Throws: +
JiBXException - on error in initializing method construction
+
+ + + + + + + + +
+Method Detail
+ +

+setObjectSlot

+
+public void setObjectSlot(int slot)
+
+
Set current object slot. Sets the local variable position of the current + object, as required when the object is actually created within the + method. +

+

+
Parameters:
slot - local variable slot for current object
+
+
+
+ +

+loadObject

+
+public void loadObject()
+
+
Append instruction to load object to stack. +

+

+
+
+
+
+ +

+storeObject

+
+public void storeObject()
+
+
Append instruction to store object from stack. +

+

+
+
+
+
+ +

+loadObject

+
+public void loadObject(java.lang.String type)
+
+
Append instruction(s) to load object to stack as specified type. +

+

+
Parameters:
type - loaded type expected on stack
+
+
+
+ +

+loadContext

+
+public void loadContext()
+
+
Append instruction to load context to stack. +

+

+
+
+
+
+ +

+loadContext

+
+public void loadContext(java.lang.String type)
+
+
Append instruction(s) to load context to stack as specified type. +

+

+
Parameters:
type - loaded type expected on stack
+
+
+
+ +

+isStaticMethod

+
+public boolean isStaticMethod()
+
+
Check if method is static. +

+

+ +
Returns:
true if static, false if not
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IXMLWriter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IXMLWriter.html @@ -0,0 +1,952 @@ + + + + + + +IXMLWriter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IXMLWriter

+
+
All Known Implementing Classes:
GenericXMLWriter, ISO88591StreamWriter, JDOMWriter, StreamWriterBase, UTF8StreamWriter, XMLWriterBase, XMLWriterNamespaceBase
+
+
+
+
public interface IXMLWriter
+ + +

+XML writer interface used for output of marshalled document. This interface + allows easy substitution of different output formats, including parse event + stream equivalents. This makes heavy use of state information, so each + method call defined is only valid in certain states. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddAttribute(int index, + java.lang.String name, + java.lang.String value) + +
+          Add attribute to current open start tag.
+ voidclose() + +
+          Close document output.
+ voidcloseEmptyTag() + +
+          Close the current open start tag as an empty element.
+ voidcloseStartTag() + +
+          Close the current open start tag.
+ voidendTag(int index, + java.lang.String name) + +
+          Generate end tag.
+ voidflush() + +
+          Flush document output.
+ java.lang.String[][]getExtensionNamespaces() + +
+          Get extension namespace URIs added to those in mapping.
+ intgetNamespaceCount() + +
+          Get the number of namespaces currently defined.
+ java.lang.StringgetNamespacePrefix(int index) + +
+          Get current prefix defined for namespace.
+ java.lang.String[]getNamespaces() + +
+          Get namespace URIs for mapping.
+ java.lang.StringgetNamespaceUri(int index) + +
+          Get URI for namespace.
+ intgetNestingDepth() + +
+          Get the current element nesting depth.
+ intgetPrefixIndex(java.lang.String prefix) + +
+          Get index of namespace mapped to prefix.
+ voidindent() + +
+          Request output indent.
+ int[]openNamespaces(int[] nums, + java.lang.String[] prefs) + +
+          Open the specified namespaces for use.
+ voidpopExtensionNamespaces() + +
+          Remove extension namespace URIs.
+ voidpushExtensionNamespaces(java.lang.String[] uris) + +
+          Append extension namespace URIs to those in mapping.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidsetIndentSpaces(int count, + java.lang.String newline, + char indent) + +
+          Set nesting indentation.
+ voidstartTagClosed(int index, + java.lang.String name) + +
+          Generate closed start tag.
+ voidstartTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + +
+          Generate start tag for element with namespaces.
+ voidstartTagOpen(int index, + java.lang.String name) + +
+          Generate open start tag.
+ voidwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+ voidwriteComment(java.lang.String text) + +
+          Write comment to document.
+ voidwriteDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + +
+          Write DOCTYPE declaration to document.
+ voidwriteEntityRef(java.lang.String name) + +
+          Write entity reference to document.
+ voidwritePI(java.lang.String target, + java.lang.String data) + +
+          Write processing instruction to document.
+ voidwriteTextContent(java.lang.String text) + +
+          Write ordinary character data text content to document.
+ voidwriteXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + +
+          Write XML declaration to document.
+  +

+ + + + + + + + +
+Method Detail
+ +

+getNestingDepth

+
+int getNestingDepth()
+
+
Get the current element nesting depth. Elements are only counted in the + depth returned when they're officially open - after the start tag has + been output and before the end tag has been output. +

+

+ +
Returns:
number of nested elements at current point in output
+
+
+
+ +

+getNamespaceCount

+
+int getNamespaceCount()
+
+
Get the number of namespaces currently defined. This is equivalent to the + index of the next extension namespace added. +

+

+ +
Returns:
namespace count
+
+
+
+ +

+setIndentSpaces

+
+void setIndentSpaces(int count,
+                     java.lang.String newline,
+                     char indent)
+
+
Set nesting indentation. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+writeXMLDecl

+
+void writeXMLDecl(java.lang.String version,
+                  java.lang.String encoding,
+                  java.lang.String standalone)
+                  throws java.io.IOException
+
+
Write XML declaration to document. This can only be called before any + other methods in the interface are called. +

+

+
Parameters:
version - XML version text
encoding - text for encoding attribute (unspecified if + null)
standalone - text for standalone attribute (unspecified if + null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagOpen

+
+void startTagOpen(int index,
+                  java.lang.String name)
+                  throws java.io.IOException
+
+
Generate open start tag. This allows attributes and/or namespace + declarations to be added to the start tag, but must be followed by a + closeStartTag() call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagNamespaces

+
+void startTagNamespaces(int index,
+                        java.lang.String name,
+                        int[] nums,
+                        java.lang.String[] prefs)
+                        throws java.io.IOException
+
+
Generate start tag for element with namespaces. This creates the actual + start tag, along with any necessary namespace declarations. Previously + active namespace declarations are not duplicated. The tag is + left incomplete, allowing other attributes to be added. +

+

+
Parameters:
index - namespace URI index number
name - element name
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until end of element)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+addAttribute

+
+void addAttribute(int index,
+                  java.lang.String name,
+                  java.lang.String value)
+                  throws java.io.IOException
+
+
Add attribute to current open start tag. This is only valid after a call + to startTagOpen(int, java.lang.String) and before the corresponding call to closeStartTag(). +

+

+
Parameters:
index - namespace URI index number
name - unqualified attribute name
value - text value for attribute +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeStartTag

+
+void closeStartTag()
+                   throws java.io.IOException
+
+
Close the current open start tag. This is only valid after a call to + startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeEmptyTag

+
+void closeEmptyTag()
+                   throws java.io.IOException
+
+
Close the current open start tag as an empty element. This is only valid + after a call to startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagClosed

+
+void startTagClosed(int index,
+                    java.lang.String name)
+                    throws java.io.IOException
+
+
Generate closed start tag. No attributes or namespaces can be added to a + start tag written using this call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+endTag

+
+void endTag(int index,
+            java.lang.String name)
+            throws java.io.IOException
+
+
Generate end tag. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeTextContent

+
+void writeTextContent(java.lang.String text)
+                      throws java.io.IOException
+
+
Write ordinary character data text content to document. +

+

+
Parameters:
text - content value text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+void writeCData(java.lang.String text)
+                throws java.io.IOException
+
+
Write CDATA text to document. +

+

+
Parameters:
text - content value text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeComment

+
+void writeComment(java.lang.String text)
+                  throws java.io.IOException
+
+
Write comment to document. +

+

+
Parameters:
text - comment text (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeEntityRef

+
+void writeEntityRef(java.lang.String name)
+                    throws java.io.IOException
+
+
Write entity reference to document. +

+

+
Parameters:
name - entity name (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeDocType

+
+void writeDocType(java.lang.String name,
+                  java.lang.String sys,
+                  java.lang.String pub,
+                  java.lang.String subset)
+                  throws java.io.IOException
+
+
Write DOCTYPE declaration to document. +

+

+
Parameters:
name - root element name
sys - system ID (null if none, must be + non-null for public ID to be used)
pub - public ID (null if none)
subset - internal subset (null if none) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writePI

+
+void writePI(java.lang.String target,
+             java.lang.String data)
+             throws java.io.IOException
+
+
Write processing instruction to document. +

+

+
Parameters:
target - processing instruction target name (must not be + null)
data - processing instruction data (must not be null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+indent

+
+void indent()
+            throws java.io.IOException
+
+
Request output indent. The writer implementation should normally indent + output as appropriate. This method can be used to request indenting of + output that might otherwise not be indented. The normal effect when used + with a text-oriented writer should be to output the appropriate line end + sequence followed by the appropriate number of indent characters for the + current nesting level. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+flush

+
+void flush()
+           throws java.io.IOException
+
+
Flush document output. Forces out all output generated to this point. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+close

+
+void close()
+           throws java.io.IOException
+
+
Close document output. Completes writing of document output, including + closing the output medium. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+reset

+
+void reset()
+
+
Reset to initial state for reuse. The context is serially reusable, + as long as this method is called to clear any retained state information + between uses. It is automatically called when output is set. +

+

+
+
+
+
+ +

+getNamespaces

+
+java.lang.String[] getNamespaces()
+
+
Get namespace URIs for mapping. This gets the full ordered array of + namespaces known in the binding used for this marshalling, where the + index number of each namespace URI is the namespace index used to lookup + the prefix when marshalling a name in that namespace. The returned array + must not be modified. +

+

+ +
Returns:
array of namespaces
+
+
+
+ +

+getNamespaceUri

+
+java.lang.String getNamespaceUri(int index)
+
+
Get URI for namespace. +

+

+
Parameters:
index - namespace URI index number +
Returns:
namespace URI text, or null if the namespace index + is invalid
+
+
+
+ +

+getNamespacePrefix

+
+java.lang.String getNamespacePrefix(int index)
+
+
Get current prefix defined for namespace. +

+

+
Parameters:
index - namespace URI index number +
Returns:
current prefix text, or null if the namespace is not + currently mapped
+
+
+
+ +

+getPrefixIndex

+
+int getPrefixIndex(java.lang.String prefix)
+
+
Get index of namespace mapped to prefix. This can be an expensive + operation with time proportional to the number of namespaces defined, so + it should be used with care. +

+

+
Parameters:
prefix - text to match (non-null, use "" for default + prefix) +
Returns:
index namespace URI index number mapped to prefix
+
+
+
+ +

+pushExtensionNamespaces

+
+void pushExtensionNamespaces(java.lang.String[] uris)
+
+
Append extension namespace URIs to those in mapping. +

+

+
Parameters:
uris - namespace URIs to extend those in mapping
+
+
+
+ +

+popExtensionNamespaces

+
+void popExtensionNamespaces()
+
+
Remove extension namespace URIs. This removes the last set of + extension namespaces pushed using pushExtensionNamespaces(java.lang.String[]). +

+

+
+
+
+
+ +

+getExtensionNamespaces

+
+java.lang.String[][] getExtensionNamespaces()
+
+
Get extension namespace URIs added to those in mapping. This gets the + current set of extension definitions. The returned arrays must not be + modified. +

+

+ +
Returns:
array of arrays of extension namespaces (null if + none)
+
+
+
+ +

+openNamespaces

+
+int[] openNamespaces(int[] nums,
+                     java.lang.String[] prefs)
+                     throws java.io.IOException
+
+
Open the specified namespaces for use. This method is normally only + called internally, when namespace declarations are actually written to + output. It is exposed as part of this interface to allow for special + circumstances where namespaces are being written outside the usual + processing. The namespaces will remain open for use until the current + element is closed. +

+

+
Parameters:
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until namespaces are closed)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Returns:
array of indexes for namespaces not previously active (the ones + actually needing to be declared, in the case of text output) +
Throws: +
java.io.IOException - on error writing to document
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IAbstractMarshaller.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IAbstractMarshaller.html @@ -0,0 +1,241 @@ + + + + + + +IAbstractMarshaller (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IAbstractMarshaller

+
+
All Superinterfaces:
IMarshaller
+
+
+
+
public interface IAbstractMarshaller
extends IMarshaller
+ + +

+Abstract base marshaller interface definition. This interface must be + implemented by the handler for marshalling an object as an instance of a + binding with extension mappings.

+ + This extension to the normal marshaller interface allows the base + marshalling to determine the proper marshaller implementation to use at + runtime. The code needs to check that the object to be marshalled has a + marshaller that extends this base mapping. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidbaseMarshal(java.lang.Object obj, + IMarshallingContext ctx) + +
+          Marshal instance of class with mapping extending this abstract mapping.
+ + + + + + + +
Methods inherited from interface org.jibx.runtime.IMarshaller
isExtension, marshal
+  +

+ + + + + + + + +
+Method Detail
+ +

+baseMarshal

+
+void baseMarshal(java.lang.Object obj,
+                 IMarshallingContext ctx)
+                 throws JiBXException
+
+
Marshal instance of class with mapping extending this abstract mapping. + This method call is responsible for all handling of the marshalling of an + appropriate object to XML text. It is called at the point where the start + tag for the associated element should be generated. +

+

+
+
+
+
Parameters:
obj - object to be marshalled (may be null, in the case + of a non-optional property with no value supplied)
ctx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IMarshallable.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IMarshallable.html @@ -0,0 +1,244 @@ + + + + + + +IMarshallable (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IMarshallable

+
+
+
public interface IMarshallable
+ + +

+Marshallable interface definition. This interface must be implemented by all + classes which can be marshalled as independent units (not just as children of + other objects). Classes implementing this interface may either marshal + themselves directly (if there's only one marshalling format defined), or + obtain an instance of the appropriate marshaller from the context and use + that. This interface is automatically added by the binding compiler to all + classes targeted by <mapping> elements in a binding. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ intJiBX_getIndex() + +
+          Get class index.
+ voidmarshal(IMarshallingContext ctx) + +
+          Marshal self.
+  +

+ + + + + + + + +
+Method Detail
+ +

+JiBX_getIndex

+
+int JiBX_getIndex()
+
+
Get class index. This returns the mapping index number for a class within + the compiled bindings. It's intended primarily for internal use by the + binding framework. +

+

+ +
Returns:
mapping index number
+
+
+
+ +

+marshal

+
+void marshal(IMarshallingContext ctx)
+             throws JiBXException
+
+
Marshal self. This method call is responsible for all handling of the + marshalling of an object to XML text. +

+

+
Parameters:
ctx - marshalling context +
Throws: +
JiBXException - on error in marshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/RecoverableException.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/RecoverableException.html @@ -0,0 +1,278 @@ + + + + + + +RecoverableException (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class RecoverableException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by org.jibx.runtime.JiBXException
+              extended by org.jibx.runtime.RecoverableException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
Direct Known Subclasses:
ValidationException
+
+
+
+
public class RecoverableException
extends JiBXException
+ + +

+Recoverable exception class. This is used for non-fatal errors in marshalling + and unmarshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
RecoverableException(java.lang.String msg) + +
+          Constructor from message.
RecoverableException(java.lang.String msg, + java.lang.Throwable root) + +
+          Constructor from message and wrapped exception.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class org.jibx.runtime.JiBXException
getRootCause, printStackTrace, printStackTrace, printStackTrace
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+RecoverableException

+
+public RecoverableException(java.lang.String msg)
+
+
Constructor from message. +

+

+
Parameters:
msg - message describing the exception condition
+
+
+ +

+RecoverableException

+
+public RecoverableException(java.lang.String msg,
+                            java.lang.Throwable root)
+
+
Constructor from message and wrapped exception. +

+

+
Parameters:
msg - message describing the exception condition
root - exception which caused this exception
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IUnmarshallingContext.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IUnmarshallingContext.html @@ -0,0 +1,694 @@ + + + + + + +IUnmarshallingContext (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IUnmarshallingContext

+
+
All Known Implementing Classes:
UnmarshallingContext
+
+
+
+
public interface IUnmarshallingContext
+ + +

+User interface for deserializer from XML. This provides methods used to set + up and control the marshalling process, as well as access to the + unmarshalling object stack while unmarshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringgetDocumentName() + +
+          Return the supplied document name.
+ intgetStackDepth() + +
+          Get current unmarshalling object stack depth.
+ java.lang.ObjectgetStackObject(int depth) + +
+          Get object from unmarshalling stack.
+ java.lang.ObjectgetStackTop() + +
+          Get top object on unmarshalling stack.
+ IUnmarshallergetUnmarshaller(int index) + +
+          Find the unmarshaller for a particular class index in the current + context.
+ booleanisAt(java.lang.String ns, + java.lang.String name) + +
+          Check if next tag is start of element.
+ booleanisEnd() + +
+          Check if next tag is an end tag.
+ voidpopObject() + +
+          Pop unmarshalled object from stack.
+ voidpushObject(java.lang.Object obj) + +
+          Push created object to unmarshalling stack.
+ voidreset() + +
+          Reset unmarshalling information.
+ voidsetDocument(java.io.InputStream ins, + java.lang.String enc) + +
+          Set document to be parsed from stream.
+ voidsetDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + +
+          Set named document to be parsed from stream.
+ voidsetDocument(java.io.Reader rdr) + +
+          Set document to be parsed from reader.
+ voidsetDocument(java.io.Reader rdr, + java.lang.String name) + +
+          Set named document to be parsed from reader.
+ java.lang.ObjectunmarshalDocument(java.io.InputStream ins, + java.lang.String enc) + +
+          Unmarshal document from stream to object.
+ java.lang.ObjectunmarshalDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + +
+          Unmarshal named document from stream to object.
+ java.lang.ObjectunmarshalDocument(java.io.Reader rdr) + +
+          Unmarshal document from reader to object.
+ java.lang.ObjectunmarshalDocument(java.io.Reader rdr, + java.lang.String name) + +
+          Unmarshal named document from reader to object.
+ java.lang.ObjectunmarshalElement() + +
+          Unmarshal the current element.
+  +

+ + + + + + + + +
+Method Detail
+ +

+setDocument

+
+void setDocument(java.io.InputStream ins,
+                 java.lang.String enc)
+                 throws JiBXException
+
+
Set document to be parsed from stream. +

+

+
Parameters:
ins - stream supplying document data
enc - document input encoding, or null if to be + determined by parser +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+void setDocument(java.io.Reader rdr)
+                 throws JiBXException
+
+
Set document to be parsed from reader. +

+

+
Parameters:
rdr - reader supplying document data +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+void setDocument(java.io.InputStream ins,
+                 java.lang.String name,
+                 java.lang.String enc)
+                 throws JiBXException
+
+
Set named document to be parsed from stream. +

+

+
Parameters:
ins - stream supplying document data
name - document name
enc - document input encoding, or null if to be + determined by parser +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+void setDocument(java.io.Reader rdr,
+                 java.lang.String name)
+                 throws JiBXException
+
+
Set named document to be parsed from reader. +

+

+
Parameters:
rdr - reader supplying document data
name - document name +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+reset

+
+void reset()
+
+
Reset unmarshalling information. This releases all references to + unmarshalled objects and prepares the context for potential reuse. + It is automatically called when input is set. +

+

+
+
+
+
+ +

+unmarshalElement

+
+java.lang.Object unmarshalElement()
+                                  throws JiBXException
+
+
Unmarshal the current element. If not currently positioned at a start + or end tag this first advances the parse to the next start or end tag. + There must be an unmarshalling defined for the current element, and this + unmarshalling is used to build an object from that element. +

+

+ +
Returns:
unmarshalled object from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+unmarshalDocument

+
+java.lang.Object unmarshalDocument(java.io.InputStream ins,
+                                   java.lang.String enc)
+                                   throws JiBXException
+
+
Unmarshal document from stream to object. The effect of this is the same + as if setDocument(java.io.InputStream, java.lang.String) were called, followed by unmarshalElement() +

+

+
Parameters:
ins - stream supplying document data
enc - document input encoding, or null if to be + determined by parser +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+java.lang.Object unmarshalDocument(java.io.Reader rdr)
+                                   throws JiBXException
+
+
Unmarshal document from reader to object. The effect of this is the same + as if setDocument(java.io.InputStream, java.lang.String) were called, followed by unmarshalElement() +

+

+
Parameters:
rdr - reader supplying document data +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+java.lang.Object unmarshalDocument(java.io.InputStream ins,
+                                   java.lang.String name,
+                                   java.lang.String enc)
+                                   throws JiBXException
+
+
Unmarshal named document from stream to object. The effect of this is the + same as if setDocument(java.io.InputStream, java.lang.String) were called, followed by unmarshalElement() +

+

+
Parameters:
ins - stream supplying document data
name - document name
enc - document input encoding, or null if to be + determined by parser +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+java.lang.Object unmarshalDocument(java.io.Reader rdr,
+                                   java.lang.String name)
+                                   throws JiBXException
+
+
Unmarshal named document from reader to object. The effect of this is the + same as if setDocument(java.io.InputStream, java.lang.String) were called, followed by unmarshalElement() +

+

+
Parameters:
rdr - reader supplying document data
name - document name +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+getDocumentName

+
+java.lang.String getDocumentName()
+
+
Return the supplied document name. +

+

+ +
Returns:
supplied document name (null if none)
+
+
+
+ +

+isAt

+
+boolean isAt(java.lang.String ns,
+             java.lang.String name)
+             throws JiBXException
+
+
Check if next tag is start of element. If not currently positioned at a + start or end tag this first advances the parse to the next start or end + tag. +

+

+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Returns:
true if at start of element with supplied name, + false if not +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+isEnd

+
+boolean isEnd()
+              throws JiBXException
+
+
Check if next tag is an end tag. If not currently positioned at a + start or end tag this first advances the parse to the next start or + end tag. +

+

+ +
Returns:
true if at end of element, false if + at start +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getUnmarshaller

+
+IUnmarshaller getUnmarshaller(int index)
+                              throws JiBXException
+
+
Find the unmarshaller for a particular class index in the current + context. +

+

+
Parameters:
index - class index for unmarshalling definition +
Returns:
unmarshalling handler for class +
Throws: +
JiBXException - if unable to create unmarshaller
+
+
+
+ +

+pushObject

+
+void pushObject(java.lang.Object obj)
+
+
Push created object to unmarshalling stack. This must be called before + beginning the unmarshalling of the object. It is only called for objects + with structure, not for those converted directly to and from text. +

+

+
Parameters:
obj - object being unmarshalled
+
+
+
+ +

+popObject

+
+void popObject()
+               throws JiBXException
+
+
Pop unmarshalled object from stack. +

+

+ +
Throws: +
JiBXException - if stack empty
+
+
+
+ +

+getStackDepth

+
+int getStackDepth()
+
+
Get current unmarshalling object stack depth. This allows tracking + nested calls to unmarshal one object while in the process of + unmarshalling another object. The bottom item on the stack is always the + root object being unmarshalled. +

+

+ +
Returns:
number of objects in unmarshalling stack
+
+
+
+ +

+getStackObject

+
+java.lang.Object getStackObject(int depth)
+
+
Get object from unmarshalling stack. This stack allows tracking nested + calls to unmarshal one object while in the process of unmarshalling + another object. The bottom item on the stack is always the root object + being unmarshalled. +

+

+
Parameters:
depth - object depth in stack to be retrieved (must be in the range + of zero to the current depth minus one). +
Returns:
object from unmarshalling stack
+
+
+
+ +

+getStackTop

+
+java.lang.Object getStackTop()
+
+
Get top object on unmarshalling stack. This is safe to call even when no + objects are on the stack. +

+

+ +
Returns:
object from unmarshalling stack, or null if none
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/Utility.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/Utility.html @@ -0,0 +1,2136 @@ + + + + + + +Utility (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class Utility

+
+java.lang.Object
+  extended by org.jibx.runtime.Utility
+
+
+
+
public abstract class Utility
extends java.lang.Object
+ + +

+Utility class supplying static methods. Date serialization is based on the + algorithms published by Peter Baum (http://www.capecod.net/~pbaum). All date + handling is done according to the W3C Schema specification, which uses a + proleptic Gregorian calendar with no year 0. Note that this differs from the + Java date handling, which uses a discontinuous Gregorian calendar. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static java.util.DateBEGINNING_OF_TIME + +
+          Date for setting change to Gregorian calendar.
+private static long[]BIAS_MONTHMS + +
+          Millisecond count prior to start of month in March 1-biased year.
+private static longLMSPERDAY + +
+          Number of milliseconds in a day as a long.
+static intMINIMUM_GROWN_ARRAY_SIZE + +
+          Minimum size for array returned by growArray(java.lang.Object).
+private static int[]MONTHS_LEAP + +
+          Day number for start of month in non-leap year.
+private static int[]MONTHS_NONLEAP + +
+          Day number for start of month in non-leap year.
+private static longMSPERAVGYEAR + +
+          Average number of milliseconds in a year within century.
+private static longMSPERCENTURY + +
+          Number of milliseconds in a normal century.
+private static intMSPERDAY + +
+          Number of milliseconds in a day.
+private static intMSPERHOUR + +
+          Number of milliseconds in an hour.
+private static intMSPERMINUTE + +
+          Number of milliseconds in a minute.
+private static longMSPERYEAR + +
+          Number of milliseconds in a (non-leap) year.
+private static charPAD_CHAR + +
+          Pad character for base64 encoding.
+private static char[]s_base64Chars + +
+          Characters used in base64 encoding.
+private static byte[]s_base64Values + +
+          Values corresponding to characters used in bas64 encoding.
+private static longTIME_BASE + +
+          Millisecond value of base time for internal representation.
+  + + + + + + + + + + +
+Constructor Summary
Utility() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.util.ListarrayListFactory() + +
+          Factory method to create a java.util.ArrayList as the + implementation of a java.util.List.
+private static intdecodeChunk(int base, + char[] chrs, + int fill, + byte[] byts) + +
+          Decode a chunk of data from base64 encoding.
+static byte[]deserializeBase64(java.lang.String text) + +
+          Parse base64 data from text.
+static chardeserializeCharString(java.lang.String text) + +
+          Deserialize char value from text as character value.
+static java.util.DatedeserializeDate(java.lang.String text) + +
+          Deserialize date from text.
+static java.util.DatedeserializeDateTime(java.lang.String text) + +
+          Deserialize date from general dateTime text.
+static java.sql.DatedeserializeSqlDate(java.lang.String text) + +
+          Deserialize SQL date from text.
+static java.sql.TimedeserializeSqlTime(java.lang.String text) + +
+          Deserialize time from text.
+static java.sql.TimestampdeserializeTimestamp(java.lang.String text) + +
+          Deserialize timestamp from general dateTime text.
+static voidencodeChunk(int base, + byte[] byts, + java.lang.StringBuffer buff) + +
+          Encode a chunk of data to base64 encoding.
+static intenumValue(java.lang.String target, + java.lang.String[] enums, + int[] vals) + +
+          Find text value in enumeration.
+protected static voidformatTwoDigits(int value, + java.lang.StringBuffer buff) + +
+          Format a positive number as two digits.
+protected static voidformatYear(long value, + java.lang.StringBuffer buff) + +
+          Format time in milliseconds to year number.
+protected static longformatYearMonth(long value, + java.lang.StringBuffer buff) + +
+          Format time in milliseconds to year number and month number.
+protected static intformatYearMonthDay(long value, + java.lang.StringBuffer buff) + +
+          Format time in milliseconds to year number, month number, and day + number.
+protected static voidformatYearNumber(long year, + java.lang.StringBuffer buff) + +
+          Format year number consistent with W3C XML Schema definitions, using a + minimum of four digits padded with zeros if necessary.
+static java.lang.ObjectgrowArray(java.lang.Object base) + +
+          Grow array of arbitrary type.
+static booleanisEqual(java.lang.Object a, + java.lang.Object b) + +
+          General object comparison method.
+static byte[]parseBase64(java.lang.String text) + +
+          Parse base64 data from text.
+static booleanparseBoolean(java.lang.String text) + +
+          Parse boolean value from text.
+static byteparseByte(java.lang.String text) + +
+          Parse byte value from text.
+static charparseChar(java.lang.String text) + +
+          Parse char value from text as unsigned 16-bit integer.
+static charparseCharString(java.lang.String text) + +
+          Parse char value from text as character value.
+static longparseDate(java.lang.String text) + +
+          Convert date text to Java date.
+static longparseDateTime(java.lang.String text) + +
+          Parse general dateTime value from text.
+private static intparseDigits(java.lang.String text, + int offset, + int length) + +
+          Parse digits in text as integer value.
+static doubleparseDouble(java.lang.String text) + +
+          Parse double value from text.
+static floatparseFloat(java.lang.String text) + +
+          Parse float value from text.
+static intparseInt(java.lang.String text) + +
+          Parse integer value from text.
+static longparseLong(java.lang.String text) + +
+          Parse long value from text.
+static shortparseShort(java.lang.String text) + +
+          Parse short value from text.
+static longparseTime(java.lang.String text, + int start, + int length) + +
+          Parse general time value from text.
+static longparseYear(java.lang.String text) + +
+          Convert gYear text to Java date.
+static longparseYearMonth(java.lang.String text) + +
+          Convert gYearMonth text to Java date.
+static java.lang.ObjectresizeArray(int size, + java.lang.Object base) + +
+          Resize array of arbitrary type.
+static java.lang.StringserializeBase64(byte[] byts) + +
+          Serialize byte array to base64 text.
+static java.lang.StringserializeBoolean(boolean value) + +
+          Serialize boolean value to text.
+static java.lang.StringserializeByte(byte value) + +
+          Serialize byte value to text.
+static java.lang.StringserializeChar(char value) + +
+          Serialize char value to text as unsigned 16-bit integer.
+static java.lang.StringserializeCharString(char value) + +
+          Serialize char value to text as string of length one.
+static java.lang.StringserializeDate(java.util.Date date) + +
+          Serialize date to general date text.
+static java.lang.StringserializeDate(long time) + +
+          Serialize time to general date text.
+static java.lang.StringserializeDateTime(java.util.Date date) + +
+          Serialize date to general dateTime text.
+static java.lang.StringserializeDateTime(long time) + +
+          Serialize time to general dateTime text.
+static java.lang.StringserializeDateTime(long time, + boolean zone) + +
+          Serialize time to general dateTime text.
+static java.lang.StringserializeDouble(double value) + +
+          Serialize double value to text.
+static java.lang.StringserializeFloat(float value) + +
+          Serialize float value to text.
+static java.lang.StringserializeInt(int value) + +
+          Serialize int value to text.
+static java.lang.StringserializeLong(long value) + +
+          Serialize long value to text.
+static java.lang.StringserializeShort(short value) + +
+          Serialize short value to text.
+static java.lang.StringserializeSqlDate(java.sql.Date date) + +
+          Serialize SQL date to general date text.
+static java.lang.StringserializeSqlTime(java.sql.Time time) + +
+          Serialize time to standard text.
+static voidserializeTime(int time, + java.lang.StringBuffer buff) + +
+          Serialize time to general time text in buffer.
+static java.lang.StringserializeTimestamp(java.sql.Timestamp stamp) + +
+          Serialize timestamp to general dateTime text.
+static java.lang.StringserializeYear(java.util.Date date) + +
+          Serialize date to general gYear text.
+static java.lang.StringserializeYear(long time) + +
+          Serialize time to general gYear text.
+static java.lang.StringserializeYearMonth(java.util.Date date) + +
+          Serialize date to general gYearMonth text.
+static java.lang.StringserializeYearMonth(long time) + +
+          Serialize time to general gYearMonth text.
+private static intvalidateDate(java.lang.String text) + +
+          Validate a date text string.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+MINIMUM_GROWN_ARRAY_SIZE

+
+public static final int MINIMUM_GROWN_ARRAY_SIZE
+
+
Minimum size for array returned by growArray(java.lang.Object). +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERMINUTE

+
+private static final int MSPERMINUTE
+
+
Number of milliseconds in a minute. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERHOUR

+
+private static final int MSPERHOUR
+
+
Number of milliseconds in an hour. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERDAY

+
+private static final int MSPERDAY
+
+
Number of milliseconds in a day. +

+

+
See Also:
Constant Field Values
+
+
+ +

+LMSPERDAY

+
+private static final long LMSPERDAY
+
+
Number of milliseconds in a day as a long. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERYEAR

+
+private static final long MSPERYEAR
+
+
Number of milliseconds in a (non-leap) year. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERAVGYEAR

+
+private static final long MSPERAVGYEAR
+
+
Average number of milliseconds in a year within century. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MSPERCENTURY

+
+private static final long MSPERCENTURY
+
+
Number of milliseconds in a normal century. +

+

+
See Also:
Constant Field Values
+
+
+ +

+TIME_BASE

+
+private static final long TIME_BASE
+
+
Millisecond value of base time for internal representation. This gives + the bias relative to January 1 of the year 1 C.E. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MONTHS_NONLEAP

+
+private static final int[] MONTHS_NONLEAP
+
+
Day number for start of month in non-leap year. +

+

+
+
+
+ +

+MONTHS_LEAP

+
+private static final int[] MONTHS_LEAP
+
+
Day number for start of month in non-leap year. +

+

+
+
+
+ +

+BIAS_MONTHMS

+
+private static final long[] BIAS_MONTHMS
+
+
Millisecond count prior to start of month in March 1-biased year. +

+

+
+
+
+ +

+BEGINNING_OF_TIME

+
+private static java.util.Date BEGINNING_OF_TIME
+
+
Date for setting change to Gregorian calendar. +

+

+
+
+
+ +

+PAD_CHAR

+
+private static final char PAD_CHAR
+
+
Pad character for base64 encoding. +

+

+
See Also:
Constant Field Values
+
+
+ +

+s_base64Chars

+
+private static final char[] s_base64Chars
+
+
Characters used in base64 encoding. +

+

+
+
+
+ +

+s_base64Values

+
+private static final byte[] s_base64Values
+
+
Values corresponding to characters used in bas64 encoding. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+Utility

+
+public Utility()
+
+
+ + + + + + + + +
+Method Detail
+ +

+parseDigits

+
+private static int parseDigits(java.lang.String text,
+                               int offset,
+                               int length)
+                        throws JiBXException
+
+
Parse digits in text as integer value. This internal method is used + for number values embedded within lexical structures. Only decimal + digits can be included in the text range parsed. +

+

+
Parameters:
text - text to be parsed
offset - starting offset in text
length - number of digits to be parsed +
Returns:
converted positive integer value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+parseInt

+
+public static int parseInt(java.lang.String text)
+                    throws JiBXException
+
+
Parse integer value from text. Integer values are parsed with optional + leading sign flag, followed by any number of digits. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted integer value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeInt

+
+public static java.lang.String serializeInt(int value)
+
+
Serialize int value to text. +

+

+
Parameters:
value - int value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseLong

+
+public static long parseLong(java.lang.String text)
+                      throws JiBXException
+
+
Parse long value from text. Long values are parsed with optional + leading sign flag, followed by any number of digits. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted long value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeLong

+
+public static java.lang.String serializeLong(long value)
+
+
Serialize long value to text. +

+

+
Parameters:
value - long value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseYear

+
+public static long parseYear(java.lang.String text)
+                      throws JiBXException
+
+
Convert gYear text to Java date. Date values are expected to be in + W3C XML Schema standard format as CCYY, with optional leading sign. +

+

+
Parameters:
text - text to be parsed +
Returns:
start of year date as millisecond value from 1 C.E. +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+parseShort

+
+public static short parseShort(java.lang.String text)
+                        throws JiBXException
+
+
Parse short value from text. Short values are parsed with optional + leading sign flag, followed by any number of digits. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted short value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeShort

+
+public static java.lang.String serializeShort(short value)
+
+
Serialize short value to text. +

+

+
Parameters:
value - short value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseByte

+
+public static byte parseByte(java.lang.String text)
+                      throws JiBXException
+
+
Parse byte value from text. Byte values are parsed with optional + leading sign flag, followed by any number of digits. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted byte value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeByte

+
+public static java.lang.String serializeByte(byte value)
+
+
Serialize byte value to text. +

+

+
Parameters:
value - byte value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseBoolean

+
+public static boolean parseBoolean(java.lang.String text)
+                            throws JiBXException
+
+
Parse boolean value from text. Boolean values are parsed as either text + "true" and "false", or "1" and "0" numeric equivalents. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted boolean value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeBoolean

+
+public static java.lang.String serializeBoolean(boolean value)
+
+
Serialize boolean value to text. This serializes the value using the + text representation as "true" or "false". +

+

+
Parameters:
value - boolean value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseChar

+
+public static char parseChar(java.lang.String text)
+                      throws JiBXException
+
+
Parse char value from text as unsigned 16-bit integer. Char values are + parsed with optional leading sign flag, followed by any number of digits. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted char value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeChar

+
+public static java.lang.String serializeChar(char value)
+
+
Serialize char value to text as unsigned 16-bit integer. +

+

+
Parameters:
value - char value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseCharString

+
+public static char parseCharString(java.lang.String text)
+                            throws JiBXException
+
+
Parse char value from text as character value. This requires that the + string must be of length one. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted char value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+deserializeCharString

+
+public static char deserializeCharString(java.lang.String text)
+                                  throws JiBXException
+
+
Deserialize char value from text as character value. This requires that + the string must be null or of length one. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted char value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeCharString

+
+public static java.lang.String serializeCharString(char value)
+
+
Serialize char value to text as string of length one. +

+

+
Parameters:
value - char value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseFloat

+
+public static float parseFloat(java.lang.String text)
+                        throws JiBXException
+
+
Parse float value from text. This uses the W3C XML Schema format for + floats, with the exception that it will accept "+NaN" and "-NaN" as + valid formats. This is not in strict compliance with the specification, + but is included for interoperability with other Java XML processing. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted float value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeFloat

+
+public static java.lang.String serializeFloat(float value)
+
+
Serialize float value to text. +

+

+
Parameters:
value - float value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseDouble

+
+public static double parseDouble(java.lang.String text)
+                          throws JiBXException
+
+
Parse double value from text. This uses the W3C XML Schema format for + doubles, with the exception that it will accept "+NaN" and "-NaN" as + valid formats. This is not in strict compliance with the specification, + but is included for interoperability with other Java XML processing. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted double value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+serializeDouble

+
+public static java.lang.String serializeDouble(double value)
+
+
Serialize double value to text. +

+

+
Parameters:
value - double value to be serialized +
Returns:
text representation of value
+
+
+
+ +

+parseYearMonth

+
+public static long parseYearMonth(java.lang.String text)
+                           throws JiBXException
+
+
Convert gYearMonth text to Java date. Date values are expected to be in + W3C XML Schema standard format as CCYY-MM, with optional + leading sign. +

+

+
Parameters:
text - text to be parsed +
Returns:
start of month in year date as millisecond value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+parseDate

+
+public static long parseDate(java.lang.String text)
+                      throws JiBXException
+
+
Convert date text to Java date. Date values are expected to be in + W3C XML Schema standard format as CCYY-MM-DD, with optional + leading sign and trailing time zone (though the time zone is ignored + in this case). +

+

+
Parameters:
text - text to be parsed +
Returns:
start of day in month and year date as millisecond value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+deserializeDate

+
+public static java.util.Date deserializeDate(java.lang.String text)
+                                      throws JiBXException
+
+
Deserialize date from text. Date values are expected to match W3C XML + Schema standard format as CCYY-MM-DD, with optional leading minus sign + if necessary. This method follows standard JiBX deserializer usage + requirements by accepting a null input. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted date, or null if passed null + input +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+validateDate

+
+private static int validateDate(java.lang.String text)
+                         throws JiBXException
+
+
Validate a date text string. +

+

+
Parameters:
text - +
Returns:
offset past end of year in text +
Throws: +
JiBXException - on validation error
+
+
+
+ +

+deserializeSqlDate

+
+public static java.sql.Date deserializeSqlDate(java.lang.String text)
+                                        throws JiBXException
+
+
Deserialize SQL date from text. Date values are expected to match W3C XML + Schema standard format as CCYY-MM-DD, with optional leading minus sign + if necessary. This method follows standard JiBX deserializer usage + requirements by accepting a null input. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted date, or null if passed null + input +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+parseTime

+
+public static long parseTime(java.lang.String text,
+                             int start,
+                             int length)
+                      throws JiBXException
+
+
Parse general time value from text. Time values are expected to be in W3C + XML Schema standard format as hh:mm:ss.fff, with optional leading sign + and trailing time zone. +

+

+
Parameters:
text - text to be parsed
start - offset of first character of time value
length - number of characters in time value +
Returns:
converted time as millisecond value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+parseDateTime

+
+public static long parseDateTime(java.lang.String text)
+                          throws JiBXException
+
+
Parse general dateTime value from text. Date values are expected to be in + W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss.fff, with optional + leading sign and trailing time zone. +

+

+
Parameters:
text - text to be parsed +
Returns:
converted date as millisecond value +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+deserializeDateTime

+
+public static java.util.Date deserializeDateTime(java.lang.String text)
+                                          throws JiBXException
+
+
Deserialize date from general dateTime text. Date values are expected to + match W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss, with + optional leading minus sign and trailing seconds decimal, as necessary. + This method follows standard JiBX deserializer usage requirements by + accepting a null input. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted date, or null if passed null + input +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+deserializeTimestamp

+
+public static java.sql.Timestamp deserializeTimestamp(java.lang.String text)
+                                               throws JiBXException
+
+
Deserialize timestamp from general dateTime text. Timestamp values are + represented in the same way as regular dates, but allow more precision in + the fractional second value (down to nanoseconds). This method follows + standard JiBX deserializer usage requirements by accepting a + null input. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted timestamp, or null if passed + null input +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+deserializeSqlTime

+
+public static java.sql.Time deserializeSqlTime(java.lang.String text)
+                                        throws JiBXException
+
+
Deserialize time from text. Time values obey the rules of the time + portion of a dataTime value. This method follows standard JiBX + deserializer usage requirements by accepting a null input. +

+

+
Parameters:
text - text to be parsed (may be null) +
Returns:
converted time, or null if passed null + input +
Throws: +
JiBXException - on parse error
+
+
+
+ +

+formatYearNumber

+
+protected static void formatYearNumber(long year,
+                                       java.lang.StringBuffer buff)
+
+
Format year number consistent with W3C XML Schema definitions, using a + minimum of four digits padded with zeros if necessary. A leading minus + sign is included for years prior to 1 C.E. +

+

+
Parameters:
year - number to be formatted
buff - text formatting buffer
+
+
+
+ +

+formatTwoDigits

+
+protected static void formatTwoDigits(int value,
+                                      java.lang.StringBuffer buff)
+
+
Format a positive number as two digits. This uses an optional leading + zero digit for values less than ten. +

+

+
Parameters:
value - number to be formatted (0 to 99)
buff - text formatting buffer
+
+
+
+ +

+formatYear

+
+protected static void formatYear(long value,
+                                 java.lang.StringBuffer buff)
+
+
Format time in milliseconds to year number. The resulting year number + format is consistent with W3C XML Schema definitions, using a minimum + of four digits padded with zeros if necessary. A leading minus sign is + included for years prior to 1 C.E. +

+

+
Parameters:
value - time in milliseconds to be converted (from 1 C.E.)
buff - text formatting buffer
+
+
+
+ +

+formatYearMonth

+
+protected static long formatYearMonth(long value,
+                                      java.lang.StringBuffer buff)
+
+
Format time in milliseconds to year number and month number. The + resulting year number format is consistent with W3C XML Schema + definitions, using a minimum of four digits for the year and exactly + two digits for the month. +

+

+
Parameters:
value - time in milliseconds to be converted (from 1 C.E.)
buff - text formatting buffer +
Returns:
number of milliseconds into month
+
+
+
+ +

+formatYearMonthDay

+
+protected static int formatYearMonthDay(long value,
+                                        java.lang.StringBuffer buff)
+
+
Format time in milliseconds to year number, month number, and day + number. The resulting year number format is consistent with W3C XML + Schema definitions, using a minimum of four digits for the year and + exactly two digits each for the month and day. +

+

+
Parameters:
value - time in milliseconds to be converted (from 1 C.E.)
buff - text formatting buffer +
Returns:
number of milliseconds into day
+
+
+
+ +

+serializeYear

+
+public static java.lang.String serializeYear(long time)
+                                      throws JiBXException
+
+
Serialize time to general gYear text. Date values are formatted in + W3C XML Schema standard format as CCYY, with optional + leading sign included if necessary. +

+

+
Parameters:
time - time to be converted, as milliseconds from January 1, 1970 +
Returns:
converted gYear text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeYear

+
+public static java.lang.String serializeYear(java.util.Date date)
+                                      throws JiBXException
+
+
Serialize date to general gYear text. Date values are formatted in + W3C XML Schema standard format as CCYY, with optional + leading sign included if necessary. +

+

+
Parameters:
date - date to be converted +
Returns:
converted gYear text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeYearMonth

+
+public static java.lang.String serializeYearMonth(long time)
+                                           throws JiBXException
+
+
Serialize time to general gYearMonth text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM, with optional + leading sign included if necessary. +

+

+
Parameters:
time - time to be converted, as milliseconds from January 1, 1970 +
Returns:
converted gYearMonth text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeYearMonth

+
+public static java.lang.String serializeYearMonth(java.util.Date date)
+                                           throws JiBXException
+
+
Serialize date to general gYearMonth text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM, with optional + leading sign included if necessary. +

+

+
Parameters:
date - date to be converted +
Returns:
converted gYearMonth text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeDate

+
+public static java.lang.String serializeDate(long time)
+                                      throws JiBXException
+
+
Serialize time to general date text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM-DD, with optional + leading sign included if necessary. +

+

+
Parameters:
time - time to be converted, as milliseconds from January 1, 1970 +
Returns:
converted date text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeDate

+
+public static java.lang.String serializeDate(java.util.Date date)
+                                      throws JiBXException
+
+
Serialize date to general date text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM-DD, with optional + leading sign included if necessary. +

+

+
Parameters:
date - date to be converted +
Returns:
converted date text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeSqlDate

+
+public static java.lang.String serializeSqlDate(java.sql.Date date)
+                                         throws JiBXException
+
+
Serialize SQL date to general date text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM-DD, with optional + leading sign included if necessary. +

+

+
Parameters:
date - date to be converted +
Returns:
converted date text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeTime

+
+public static void serializeTime(int time,
+                                 java.lang.StringBuffer buff)
+                          throws JiBXException
+
+
Serialize time to general time text in buffer. Time values are formatted + in W3C XML Schema standard format as hh:mm:ss, with optional trailing + seconds decimal, as necessary. This form uses a supplied buffer to + support flexible use, including with dateTime combination values. +

+

+
Parameters:
time - time to be converted, as milliseconds in day
buff - buffer for appending time text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeDateTime

+
+public static java.lang.String serializeDateTime(long time,
+                                                 boolean zone)
+                                          throws JiBXException
+
+
Serialize time to general dateTime text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM-DDThh:mm:ss, with optional + leading sign and trailing seconds decimal, as necessary. +

+

+
Parameters:
time - time to be converted, as milliseconds from January 1, 1970
zone - flag for trailing 'Z' to be appended to indicate UTC +
Returns:
converted dateTime text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeDateTime

+
+public static java.lang.String serializeDateTime(long time)
+                                          throws JiBXException
+
+
Serialize time to general dateTime text. This method is provided for + backward compatibility. It generates the dateTime text without the + trailing 'Z' to indicate UTC. +

+

+
Parameters:
time - time to be converted, as milliseconds from January 1, 1970 +
Returns:
converted dateTime text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeDateTime

+
+public static java.lang.String serializeDateTime(java.util.Date date)
+                                          throws JiBXException
+
+
Serialize date to general dateTime text. Date values are formatted in + W3C XML Schema standard format as CCYY-MM-DDThh:mm:ssZ, with optional + leading sign and trailing seconds decimal, as necessary. +

+

+
Parameters:
date - date to be converted +
Returns:
converted dateTime text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeTimestamp

+
+public static java.lang.String serializeTimestamp(java.sql.Timestamp stamp)
+                                           throws JiBXException
+
+
Serialize timestamp to general dateTime text. Timestamp values are + represented in the same way as regular dates, but allow more precision in + the fractional second value (down to nanoseconds). +

+

+
Parameters:
stamp - timestamp to be converted +
Returns:
converted dateTime text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+serializeSqlTime

+
+public static java.lang.String serializeSqlTime(java.sql.Time time)
+                                         throws JiBXException
+
+
Serialize time to standard text. Time values are formatted in W3C XML + Schema standard format as hh:mm:ss, with optional trailing seconds + decimal, as necessary. The standard conversion does not append a time + zone indication. +

+

+
Parameters:
time - time to be converted +
Returns:
converted time text +
Throws: +
JiBXException - on conversion error
+
+
+
+ +

+isEqual

+
+public static boolean isEqual(java.lang.Object a,
+                              java.lang.Object b)
+
+
General object comparison method. Don't know why Sun hasn't seen fit to + include this somewhere, but at least it's easy to write (over and over + again). +

+

+
Parameters:
a - first object to be compared
b - second object to be compared +
Returns:
true if both objects are null, or if + a.equals(b); false otherwise
+
+
+
+ +

+enumValue

+
+public static int enumValue(java.lang.String target,
+                            java.lang.String[] enums,
+                            int[] vals)
+                     throws JiBXException
+
+
Find text value in enumeration. This first does a binary search through + an array of allowed text matches. If a separate array of corresponding + values is supplied, the value at the matched position is returned; + otherwise the match index is returned directly. +

+

+
Parameters:
target - text to be found in enumeration
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null) +
Returns:
enumeration value for target text +
Throws: +
JiBXException - if target text not found in enumeration
+
+
+
+ +

+decodeChunk

+
+private static int decodeChunk(int base,
+                               char[] chrs,
+                               int fill,
+                               byte[] byts)
+                        throws JiBXException
+
+
Decode a chunk of data from base64 encoding. The length of a chunk is + always 4 characters in the base64 representation, but may be 1, 2, or 3 + bytes of data, as determined by whether there are any pad characters at + the end of the base64 representation +

+

+
Parameters:
base - starting offset within base64 character array
chrs - character array for base64 text representation
fill - starting offset within byte data array
byts - byte data array +
Returns:
number of decoded bytes +
Throws: +
JiBXException - if invalid character in base64 representation
+
+
+
+ +

+parseBase64

+
+public static byte[] parseBase64(java.lang.String text)
+                          throws JiBXException
+
+
Parse base64 data from text. This converts the base64 data into a byte + array of the appopriate length. In keeping with the recommendations, +

+

+
Parameters:
text - text to be parsed (may include extra characters) +
Returns:
byte array of data +
Throws: +
JiBXException - if invalid character in base64 representation
+
+
+
+ +

+deserializeBase64

+
+public static byte[] deserializeBase64(java.lang.String text)
+                                throws JiBXException
+
+
Parse base64 data from text. This converts the base64 data into a byte + array of the appopriate length. In keeping with the recommendations, +

+

+
Parameters:
text - text to be parsed (may be null, or include extra characters) +
Returns:
byte array of data +
Throws: +
JiBXException - if invalid character in base64 representation
+
+
+
+ +

+encodeChunk

+
+public static void encodeChunk(int base,
+                               byte[] byts,
+                               java.lang.StringBuffer buff)
+
+
Encode a chunk of data to base64 encoding. Converts the next three bytes + of data into four characters of text representation, using padding at the + end of less than three bytes of data remain. +

+

+
Parameters:
base - starting offset within byte array
byts - byte data array
buff - buffer for encoded text
+
+
+
+ +

+serializeBase64

+
+public static java.lang.String serializeBase64(byte[] byts)
+
+
Serialize byte array to base64 text. In keeping with the specification, + this adds a line break every 76 characters in the encoded representation. +

+

+
Parameters:
byts - byte data array +
Returns:
base64 encoded text
+
+
+
+ +

+resizeArray

+
+public static java.lang.Object resizeArray(int size,
+                                           java.lang.Object base)
+
+
Resize array of arbitrary type. +

+

+
Parameters:
size - new aray size
base - array to be resized +
Returns:
resized array, with all data to minimum of the two sizes copied
+
+
+
+ +

+growArray

+
+public static java.lang.Object growArray(java.lang.Object base)
+
+
Grow array of arbitrary type. The returned array is double the size of + the original array, providing this is at least the defined minimum size. +

+

+
Parameters:
base - array to be grown +
Returns:
array of twice the size as original array, with all data copied
+
+
+
+ +

+arrayListFactory

+
+public static java.util.List arrayListFactory()
+
+
Factory method to create a java.util.ArrayList as the + implementation of a java.util.List. +

+

+ +
Returns:
new java.util.ArrayList
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/UnrecoverableException.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/UnrecoverableException.html @@ -0,0 +1,275 @@ + + + + + + +UnrecoverableException (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class UnrecoverableException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by org.jibx.runtime.JiBXException
+              extended by org.jibx.runtime.UnrecoverableException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class UnrecoverableException
extends JiBXException
+ + +

+Unrecoverable exception class. This is used for fatal errors in marshalling + and unmarshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + +
+Constructor Summary
UnrecoverableException(java.lang.String msg) + +
+          Constructor from message.
UnrecoverableException(java.lang.String msg, + java.lang.Throwable root) + +
+          Constructor from message and wrapped exception.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class org.jibx.runtime.JiBXException
getRootCause, printStackTrace, printStackTrace, printStackTrace
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+UnrecoverableException

+
+public UnrecoverableException(java.lang.String msg)
+
+
Constructor from message. +

+

+
Parameters:
msg - message describing the exception condition
+
+
+ +

+UnrecoverableException

+
+public UnrecoverableException(java.lang.String msg,
+                              java.lang.Throwable root)
+
+
Constructor from message and wrapped exception. +

+

+
Parameters:
msg - message describing the exception condition
root - exception which caused this exception
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/ITrackSource.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/ITrackSource.html @@ -0,0 +1,262 @@ + + + + + + +ITrackSource (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface ITrackSource

+
+
All Known Subinterfaces:
ITrackSourceImpl
+
+
+
+
public interface ITrackSource
+ + +

+Unmarshalling source tracking interface. This interface is added to bound + classes when requested by the binding definition. It allows the user to + retrieve information about the location in the input document corresponding + to an unmarshalled object, if the parser used for unmarshalling supports + reporting this information. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intjibx_getColumnNumber() + +
+          Get source document column number.
+ java.lang.Stringjibx_getDocumentName() + +
+          Get source document name.
+ intjibx_getLineNumber() + +
+          Get source document line number.
+  +

+ + + + + + + + +
+Method Detail
+ +

+jibx_getDocumentName

+
+java.lang.String jibx_getDocumentName()
+
+
Get source document name. +

+

+ +
Returns:
name given for source document, or null if none
+
+
+
+ +

+jibx_getLineNumber

+
+int jibx_getLineNumber()
+
+
Get source document line number. +

+

+ +
Returns:
line number in source document, or -1 if unknown
+
+
+
+ +

+jibx_getColumnNumber

+
+int jibx_getColumnNumber()
+
+
Get source document column number. +

+

+ +
Returns:
column number in source document, or -1 if unknown
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/BindingDirectory.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/BindingDirectory.html @@ -0,0 +1,466 @@ + + + + + + +BindingDirectory (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class BindingDirectory

+
+java.lang.Object
+  extended by org.jibx.runtime.BindingDirectory
+
+
+
+
public abstract class BindingDirectory
extends java.lang.Object
+ + +

+Abstract class with static method to find the binding factory corresponding + to a binding name. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static java.lang.StringBINDINGFACTORY_PREFIX + +
+          Prefix of binding factory name.
+static java.lang.StringBINDINGFACTORY_SUFFIX + +
+          Suffix of binding factory name.
+static java.lang.StringBINDINGLIST_NAME + +
+          Name of String[] field giving binding factory name list.
+static java.lang.Class[]EMPTY_ARGS + +
+          Empty argument list.
+static java.lang.StringFACTORY_INSTMETHOD + +
+          Binding factory method to get instance of factory.
+  + + + + + + + + + + +
+Constructor Summary
BindingDirectory() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private static java.lang.StringgetBindingList(java.lang.Class clas) + +
+          Get list of bindings for class.
+static IBindingFactorygetFactory(java.lang.Class clas) + +
+          Get instance of binding factory.
+static IBindingFactorygetFactory(java.lang.String name, + java.lang.Class clas) + +
+          Get instance of binding factory.
+private static IBindingFactorygetFactoryFromName(java.lang.String name, + java.lang.Class clas) + +
+          Get instance of factory.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+BINDINGLIST_NAME

+
+public static final java.lang.String BINDINGLIST_NAME
+
+
Name of String[] field giving binding factory name list. +

+

+
See Also:
Constant Field Values
+
+
+ +

+BINDINGFACTORY_PREFIX

+
+public static final java.lang.String BINDINGFACTORY_PREFIX
+
+
Prefix of binding factory name. +

+

+
See Also:
Constant Field Values
+
+
+ +

+BINDINGFACTORY_SUFFIX

+
+public static final java.lang.String BINDINGFACTORY_SUFFIX
+
+
Suffix of binding factory name. +

+

+
See Also:
Constant Field Values
+
+
+ +

+FACTORY_INSTMETHOD

+
+public static final java.lang.String FACTORY_INSTMETHOD
+
+
Binding factory method to get instance of factory. +

+

+
See Also:
Constant Field Values
+
+
+ +

+EMPTY_ARGS

+
+public static final java.lang.Class[] EMPTY_ARGS
+
+
Empty argument list. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BindingDirectory

+
+public BindingDirectory()
+
+
+ + + + + + + + +
+Method Detail
+ +

+getBindingList

+
+private static java.lang.String getBindingList(java.lang.Class clas)
+                                        throws JiBXException
+
+
Get list of bindings for class. This just accesses the static variable + added to each class with a top-level mapping. +

+

+
Parameters:
clas - class with top-level mapping in binding +
Returns:
list of bindings defined for that class (as a text string) +
Throws: +
JiBXException - on error accessing binding information
+
+
+
+ +

+getFactoryFromName

+
+private static IBindingFactory getFactoryFromName(java.lang.String name,
+                                                  java.lang.Class clas)
+                                           throws JiBXException
+
+
Get instance of factory. Loads the factory class using the classloader + for the supplied class, then calls the get instance method of the + factory class. +

+

+
Parameters:
name - fully qualified name of factory class
clas - class with class loader to be used for loading factory +
Returns:
binding factory instance +
Throws: +
JiBXException - on error loading or accessing factory
+
+
+
+ +

+getFactory

+
+public static IBindingFactory getFactory(java.lang.String name,
+                                         java.lang.Class clas)
+                                  throws JiBXException
+
+
Get instance of binding factory. Finds the binding factory for the + named binding on the target class, then loads that factory and returns + an instance. +

+

+
Parameters:
name - binding name
clas - target class for binding +
Returns:
binding factory instance +
Throws: +
JiBXException - on any error in finding or accessing factory
+
+
+
+ +

+getFactory

+
+public static IBindingFactory getFactory(java.lang.Class clas)
+                                  throws JiBXException
+
+
Get instance of binding factory. Finds the binding factory for the + target class, then loads that factory and returns an instance. This + method can only be used with target classes that are mapped in only + one binding. +

+

+
Parameters:
clas - target class for binding +
Returns:
binding factory instance +
Throws: +
JiBXException - on any error in finding or accessing factory
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/EnumSet.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/EnumSet.html @@ -0,0 +1,546 @@ + + + + + + +EnumSet (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class EnumSet

+
+java.lang.Object
+  extended by org.jibx.runtime.EnumSet
+
+
+
+
public class EnumSet
extends java.lang.Object
+ + +

+Named value set support class. This provides convenience methods to support + working with a set of named static final int values, including + translating them to and from String representations. It's + intended for use with relatively small nonnegative int values. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+static classEnumSet.EnumItem + +
+          Enumeration pair information.
+ + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.String[]m_indexedNames + +
+          Enumeration names in index number order.
+private  EnumSet.EnumItem[]m_items + +
+          Actual item definitions (used for extensions).
+private  int[]m_orderedIndexes + +
+          Index values corresponding to sorted names.
+private  java.lang.String[]m_orderedNames + +
+          Enumeration names in sort order.
+static intVALUE_LIMIT + +
+          Maximum int value supported for enumerations.
+  + + + + + + + + + + + + + + + + +
+Constructor Summary
EnumSet(EnumSet.EnumItem[] items) + +
+          Constructor from array of enumeration items.
EnumSet(EnumSet base, + int start, + java.lang.String[] names) + +
+          Constructor from existing enumeration with added names.
EnumSet(int start, + java.lang.String[] names) + +
+          Constructor from array of names.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private static EnumSet.EnumItem[]buildItems(int start, + java.lang.String[] names) + +
+          Generate array of enumeration items from array of names.
+ java.lang.StringgetName(int value) + +
+          Get name for value.
+ intgetValue(java.lang.String name) + +
+          Get value for name if defined.
+ intgetValueChecked(java.lang.String name) + +
+          Get value for name.
+private static EnumSet.EnumItem[]mergeItems(EnumSet base, + int start, + java.lang.String[] names) + +
+          Generate array of enumeration items from base enumeration and array of + names.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+VALUE_LIMIT

+
+public static final int VALUE_LIMIT
+
+
Maximum int value supported for enumerations. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_items

+
+private final EnumSet.EnumItem[] m_items
+
+
Actual item definitions (used for extensions). +

+

+
+
+
+ +

+m_indexedNames

+
+private final java.lang.String[] m_indexedNames
+
+
Enumeration names in index number order. +

+

+
+
+
+ +

+m_orderedNames

+
+private final java.lang.String[] m_orderedNames
+
+
Enumeration names in sort order. +

+

+
+
+
+ +

+m_orderedIndexes

+
+private final int[] m_orderedIndexes
+
+
Index values corresponding to sorted names. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+EnumSet

+
+public EnumSet(EnumSet.EnumItem[] items)
+
+
Constructor from array of enumeration items. The supplied items can be in + any order, and the numeric values do not need to be contiguous (but must + be unique, nonnegative, and should be fairly small). Note that this + constructor will reorder the items in the supplied array as a side + effect. +

+

+
Parameters:
items - array of enumeration items (will be reordered)
+
+
+ +

+EnumSet

+
+public EnumSet(int start,
+               java.lang.String[] names)
+
+
Constructor from array of names. The value associated with each name is + just the position index in the array added to the start value. +

+

+
Parameters:
start - item value for first added name
names - array of names (no null entries allowed)
+
+
+ +

+EnumSet

+
+public EnumSet(EnumSet base,
+               int start,
+               java.lang.String[] names)
+
+
Constructor from existing enumeration with added names. The value + associated with each name is just the position index in the array added + to the start value. +

+

+
Parameters:
base - base enumeration to be extended
start - item value for first added name
names - array of names (no null entries allowed)
+
+ + + + + + + + +
+Method Detail
+ +

+buildItems

+
+private static EnumSet.EnumItem[] buildItems(int start,
+                                             java.lang.String[] names)
+
+
Generate array of enumeration items from array of names. The value + associated with each name is just the position index in the array added + to the start value. +

+

+
Parameters:
start - item value for first added name
names - array of names (no null entries allowed)
+
+
+
+ +

+mergeItems

+
+private static EnumSet.EnumItem[] mergeItems(EnumSet base,
+                                             int start,
+                                             java.lang.String[] names)
+
+
Generate array of enumeration items from base enumeration and array of + names. The value associated with each name is just the position index in + the array added to the start value. +

+

+
Parameters:
base - base enumeration to be extended
start - item value for first added name
names - array of names (no null entries allowed)
+
+
+
+ +

+getName

+
+public java.lang.String getName(int value)
+
+
Get name for value. +

+

+
Parameters:
value - enumeration value +
Returns:
name for value
+
+
+
+ +

+getValue

+
+public int getValue(java.lang.String name)
+
+
Get value for name if defined. +

+

+
Parameters:
name - possible enumeration name +
Returns:
value for name, or -1 if not found in enumeration
+
+
+
+ +

+getValueChecked

+
+public int getValueChecked(java.lang.String name)
+
+
Get value for name. If the supplied name is not present in the + enumeration this throws an exception. +

+

+
Parameters:
name - enumeration name +
Returns:
value for name
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IMarshallingContext.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IMarshallingContext.html @@ -0,0 +1,838 @@ + + + + + + +IMarshallingContext (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IMarshallingContext

+
+
All Known Implementing Classes:
MarshallingContext
+
+
+
+
public interface IMarshallingContext
+ + +

+User interface for serializer to XML. This provides methods used to set up + and control the marshalling process, as well as access to the marshalling + object stack while marshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidendDocument() + +
+          End document.
+ intgetIndent() + +
+          Get current nesting indent spaces.
+ IMarshallergetMarshaller(int index, + java.lang.String name) + +
+          Find the marshaller for a particular class index + in the current context.
+ intgetStackDepth() + +
+          Get current marshalling object stack depth.
+ java.lang.ObjectgetStackObject(int depth) + +
+          Get object from marshalling stack.
+ java.lang.ObjectgetStackTop() + +
+          Get top object on marshalling stack.
+ IXMLWritergetXmlWriter() + +
+          Get the writer being used for output.
+ voidmarshalDocument(java.lang.Object root) + +
+          Marshal document from root object without XML declaration.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone) + +
+          Marshal document from root object.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + +
+          Marshal document from root object to output stream with encoding.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + +
+          Marshal document from root object to writer.
+ voidpopObject() + +
+          Pop marshalled object from stack.
+ voidpushObject(java.lang.Object obj) + +
+          Push created object to marshalling stack.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidsetIndent(int count) + +
+          Set nesting indent spaces.
+ voidsetIndent(int count, + java.lang.String newline, + char indent) + +
+          Set nesting indentation.
+ voidsetOutput(java.io.OutputStream outs, + java.lang.String enc) + +
+          Set output stream and encoding.
+ voidsetOutput(java.io.OutputStream outs, + java.lang.String enc, + ICharacterEscaper esc) + +
+          Set output stream with encoding and escaper.
+ voidsetOutput(java.io.Writer outw) + +
+          Set output writer.
+ voidsetOutput(java.io.Writer outw, + ICharacterEscaper esc) + +
+          Set output writer and escaper.
+ voidsetXmlWriter(IXMLWriter xwrite) + +
+          Set the writer being used for output.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone) + +
+          Start document, writing the XML declaration.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + +
+          Start document with output stream and encoding.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + +
+          Start document with writer.
+  +

+ + + + + + + + +
+Method Detail
+ +

+setOutput

+
+void setOutput(java.io.OutputStream outs,
+               java.lang.String enc,
+               ICharacterEscaper esc)
+               throws JiBXException
+
+
Set output stream with encoding and escaper. This forces handling of the + output stream to use the Java character encoding support with the + supplied escaper. +

+

+
Parameters:
outs - stream for document data output
enc - document output encoding, or null uses UTF-8 + default
esc - escaper for writing characters to stream +
Throws: +
JiBXException - if error setting output
+
+
+
+ +

+setOutput

+
+void setOutput(java.io.OutputStream outs,
+               java.lang.String enc)
+               throws JiBXException
+
+
Set output stream and encoding. +

+

+
Parameters:
outs - stream for document data output
enc - document output encoding, or null uses UTF-8 + default +
Throws: +
JiBXException - if error setting output
+
+
+
+ +

+setOutput

+
+void setOutput(java.io.Writer outw,
+               ICharacterEscaper esc)
+
+
Set output writer and escaper. +

+

+
Parameters:
outw - writer for document data output
esc - escaper for writing characters
+
+
+
+ +

+setOutput

+
+void setOutput(java.io.Writer outw)
+
+
Set output writer. This assumes the standard UTF-8 encoding. +

+

+
Parameters:
outw - writer for document data output
+
+
+
+ +

+getXmlWriter

+
+IXMLWriter getXmlWriter()
+
+
Get the writer being used for output. +

+

+ +
Returns:
XML writer used for output
+
+
+
+ +

+setXmlWriter

+
+void setXmlWriter(IXMLWriter xwrite)
+
+
Set the writer being used for output. +

+

+
Parameters:
xwrite - XML writer used for output
+
+
+
+ +

+getIndent

+
+int getIndent()
+
+
Get current nesting indent spaces. This returns the number of spaces used + to show indenting, if used. +

+

+ +
Returns:
number of spaces indented per level, or negative if indentation + disabled
+
+
+
+ +

+setIndent

+
+void setIndent(int count)
+
+
Set nesting indent spaces. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Parameters:
count - number of spaces to indent per level, or disable + indentation if negative
+
+
+
+ +

+setIndent

+
+void setIndent(int count,
+               java.lang.String newline,
+               char indent)
+
+
Set nesting indentation. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+reset

+
+void reset()
+
+
Reset to initial state for reuse. The context is serially reusable, + as long as this method is called to clear any retained state information + between uses. It is automatically called when output is set. +

+

+
+
+
+
+ +

+startDocument

+
+void startDocument(java.lang.String enc,
+                   java.lang.Boolean alone)
+                   throws JiBXException
+
+
Start document, writing the XML declaration. This can only be validly + called immediately following one of the set output methods; otherwise the + output document will be corrupt. +

+

+
Parameters:
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+startDocument

+
+void startDocument(java.lang.String enc,
+                   java.lang.Boolean alone,
+                   java.io.OutputStream outs)
+                   throws JiBXException
+
+
Start document with output stream and encoding. The effect is the same + as from first setting the output stream and encoding, then making the + call to start document. +

+

+
Parameters:
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified
outs - stream for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+startDocument

+
+void startDocument(java.lang.String enc,
+                   java.lang.Boolean alone,
+                   java.io.Writer outw)
+                   throws JiBXException
+
+
Start document with writer. The effect is the same as from first + setting the writer, then making the call to start document. +

+

+
Parameters:
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified
outw - writer for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+endDocument

+
+void endDocument()
+                 throws JiBXException
+
+
End document. Finishes all output and closes the document. Note that if + this is called with an imcomplete marshalling the result will not be + well-formed XML. +

+

+ +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+void marshalDocument(java.lang.Object root)
+                     throws JiBXException
+
+
Marshal document from root object without XML declaration. This can only + be validly called immediately following one of the set output methods; + otherwise the output document will be corrupt. The effect of this method + is the same as the sequence of a call to marshal the root object using + this context followed by a call to endDocument(). +

+

+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+void marshalDocument(java.lang.Object root,
+                     java.lang.String enc,
+                     java.lang.Boolean alone)
+                     throws JiBXException
+
+
Marshal document from root object. This can only be validly called + immediately following one of the set output methods; otherwise the output + document will be corrupt. The effect of this method is the same as the + sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call to marshal the root + object using this context, and finally a call to endDocument(). +

+

+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+void marshalDocument(java.lang.Object root,
+                     java.lang.String enc,
+                     java.lang.Boolean alone,
+                     java.io.OutputStream outs)
+                     throws JiBXException
+
+
Marshal document from root object to output stream with encoding. The + effect of this method is the same as the sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call to marshal the root object using this context, + and finally a call to endDocument(). +

+

+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified
outs - stream for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+void marshalDocument(java.lang.Object root,
+                     java.lang.String enc,
+                     java.lang.Boolean alone,
+                     java.io.Writer outw)
+                     throws JiBXException
+
+
Marshal document from root object to writer. The effect of this method + is the same as the sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call + to marshal the root object using this context, and finally a call to + endDocument(). +

+

+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null uses UTF-8 default
alone - standalone document flag, null if not + specified
outw - writer for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+pushObject

+
+void pushObject(java.lang.Object obj)
+
+
Push created object to marshalling stack. This must be called before + beginning the marshalling of the object. It is only called for objects + with structure, not for those converted directly to and from text. +

+

+
Parameters:
obj - object being marshalled
+
+
+
+ +

+popObject

+
+void popObject()
+               throws JiBXException
+
+
Pop marshalled object from stack. +

+

+ +
Throws: +
JiBXException - if no object on stack
+
+
+
+ +

+getStackDepth

+
+int getStackDepth()
+
+
Get current marshalling object stack depth. This allows tracking + nested calls to marshal one object while in the process of marshalling + another object. The bottom item on the stack is always the root object + of the marshalling. +

+

+ +
Returns:
number of objects in marshalling stack
+
+
+
+ +

+getStackObject

+
+java.lang.Object getStackObject(int depth)
+
+
Get object from marshalling stack. This stack allows tracking nested + calls to marshal one object while in the process of marshalling + another object. The bottom item on the stack is always the root object + of the marshalling. +

+

+
Parameters:
depth - object depth in stack to be retrieved (must be in the range + of zero to the current depth minus one). +
Returns:
object from marshalling stack
+
+
+
+ +

+getStackTop

+
+java.lang.Object getStackTop()
+
+
Get top object on marshalling stack. This is safe to call even when no + objects are on the stack. +

+

+ +
Returns:
object from marshalling stack, or null if none
+
+
+
+ +

+getMarshaller

+
+IMarshaller getMarshaller(int index,
+                          java.lang.String name)
+                          throws JiBXException
+
+
Find the marshaller for a particular class index + in the current context. +

+

+
Parameters:
index - class index for marshalling definition
name - fully qualified name of class to be marshalled (used only + for validation) +
Returns:
marshalling handler for class +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/EnumSet.EnumItem.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/EnumSet.EnumItem.html @@ -0,0 +1,280 @@ + + + + + + +EnumSet.EnumItem (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class EnumSet.EnumItem

+
+java.lang.Object
+  extended by org.jibx.runtime.EnumSet.EnumItem
+
+
+
Enclosing class:
EnumSet
+
+
+
+
public static class EnumSet.EnumItem
extends java.lang.Object
+ + +

+Enumeration pair information. This gives an int value along + with the associated String representation. +

+ +

+


+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+ java.lang.Stringm_name + +
+           
+ intm_value + +
+           
+  + + + + + + + + + + +
+Constructor Summary
EnumSet.EnumItem(int value, + java.lang.String name) + +
+           
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_value

+
+public final int m_value
+
+
+
+
+
+ +

+m_name

+
+public final java.lang.String m_name
+
+
+
+
+ + + + + + + + +
+Constructor Detail
+ +

+EnumSet.EnumItem

+
+public EnumSet.EnumItem(int value,
+                        java.lang.String name)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/ICharacterEscaper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/ICharacterEscaper.html @@ -0,0 +1,275 @@ + + + + + + +ICharacterEscaper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface ICharacterEscaper

+
+
All Known Implementing Classes:
ISO88591Escaper, USASCIIEscaper, UTF8Escaper
+
+
+
+
public interface ICharacterEscaper
+ + +

+Escaper for character data to be written to output document. This allows + special character encodings to be handled appropriately on output. It's used + by the generic output handler class during document marshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidwriteAttribute(java.lang.String text, + java.io.Writer writer) + +
+          Write attribute value with character entity substitutions.
+ voidwriteCData(java.lang.String text, + java.io.Writer writer) + +
+          Write CDATA to document.
+ voidwriteContent(java.lang.String text, + java.io.Writer writer) + +
+          Write content value with character entity substitutions.
+  +

+ + + + + + + + +
+Method Detail
+ +

+writeAttribute

+
+void writeAttribute(java.lang.String text,
+                    java.io.Writer writer)
+                    throws java.io.IOException
+
+
Write attribute value with character entity substitutions. This assumes + that attributes use the regular quote ('"') delimitor. +

+

+
Parameters:
text - attribute value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeContent

+
+void writeContent(java.lang.String text,
+                  java.io.Writer writer)
+                  throws java.io.IOException
+
+
Write content value with character entity substitutions. +

+

+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+void writeCData(java.lang.String text,
+                java.io.Writer writer)
+                throws java.io.IOException
+
+
Write CDATA to document. This writes the beginning and ending sequences + for a CDATA section as well as the actual text, verifying that only + characters allowed by the encoding are included in the text. +

+

+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IUnmarshaller.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IUnmarshaller.html @@ -0,0 +1,266 @@ + + + + + + +IUnmarshaller (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IUnmarshaller

+
+
All Known Implementing Classes:
DiscardElementMapper, DiscardListMapper, Dom4JElementMapper, Dom4JListMapper, DomElementMapper, DomFragmentMapper, DomListMapper, HashMapperStringToComplex, HashMapperStringToSchemaType, IdDefRefMapperBase, IdRefMapperBase, ObjectArrayMapper, TypedArrayMapper
+
+
+
+
public interface IUnmarshaller
+ + +

+Unmarshaller interface definition. This interface must be implemented + by the handler for unmarshalling an object. + + Instances of classes implementing this interface must be serially + reusable, meaning they can store state information while in the process + of unmarshalling an object but must reset all state when called to + unmarshal another object after the first one is done (even if the first + object throws an exception during unmarshalling). + + The JiBX framework will only create one instance of an unmarshaller class + for each mapped class using that unmarshaller. Generally the unmarshaller + instance will not be called recursively, but this may happen in cases where + the binding definition includes recursive mappings and the unmarshaller + uses other unmarshallers (as opposed to handling all children directly). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisPresent(IUnmarshallingContext ctx) + +
+          Check if instance present in XML.
+ java.lang.Objectunmarshal(java.lang.Object obj, + IUnmarshallingContext ctx) + +
+          Unmarshal instance of handled class.
+  +

+ + + + + + + + +
+Method Detail
+ +

+isPresent

+
+boolean isPresent(IUnmarshallingContext ctx)
+                  throws JiBXException
+
+
Check if instance present in XML. This method can be called when the + unmarshalling context is positioned at or just before the start of the + data corresponding to an instance of this mapping. It verifies that the + expected data is present. +

+

+
Parameters:
ctx - unmarshalling context +
Returns:
true if expected parse data found, + false if not +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+
+ +

+unmarshal

+
+java.lang.Object unmarshal(java.lang.Object obj,
+                           IUnmarshallingContext ctx)
+                           throws JiBXException
+
+
Unmarshal instance of handled class. This method call is responsible + for all handling of the unmarshalling of an object from XML text, + including creating the instance of the handled class if an instance is + not supplied. When it is called the unmarshalling context is always + positioned at or just before the start tag corresponding to the start of + the class data. +

+

+
Parameters:
obj - object to be unmarshalled (may be null)
ctx - unmarshalling context +
Returns:
unmarshalled object (may be null) +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IMarshaller.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IMarshaller.html @@ -0,0 +1,263 @@ + + + + + + +IMarshaller (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IMarshaller

+
+
All Known Subinterfaces:
IAbstractMarshaller
+
+
+
All Known Implementing Classes:
DiscardElementMapper, DiscardListMapper, Dom4JElementMapper, Dom4JListMapper, DomElementMapper, DomFragmentMapper, DomListMapper, HashMapperStringToComplex, HashMapperStringToSchemaType, IdDefRefMapperBase, IdRefMapperBase, ObjectArrayMapper, TypedArrayMapper
+
+
+
+
public interface IMarshaller
+ + +

+Marshaller interface definition. This interface must be implemented + by the handler for marshalling an object.

+ + Instances of classes implementing this interface must be serially + reusable, meaning they can store state information while in the process + of marshalling an object but must reset all state when called to + marshal another object after the first one is done (even if the first + object throws an exception during marshalling). + + The JiBX framework will only create one instance of a marshaller class + for each mapped class using that marshaller. Generally the marshaller + instance will not be called recursively, but this may happen in cases where + the binding definition includes recursive mappings and the marshaller + uses other marshallers (as opposed to handling all children directly). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + +
+Method Summary
+ booleanisExtension(int index) + +
+          Check if marshaller represents an extension mapping.
+ voidmarshal(java.lang.Object obj, + IMarshallingContext ctx) + +
+          Marshal instance of handled class.
+  +

+ + + + + + + + +
+Method Detail
+ +

+isExtension

+
+boolean isExtension(int index)
+
+
Check if marshaller represents an extension mapping. This is used by the + framework in generated code to verify compatibility of objects being + marshalled using an abstract mapping. +

+

+
Parameters:
index - abstract mapping index to be checked +
Returns:
true if this mapping is an extension of the abstract + mapping, false if not
+
+
+
+ +

+marshal

+
+void marshal(java.lang.Object obj,
+             IMarshallingContext ctx)
+             throws JiBXException
+
+
Marshal instance of handled class. This method call is responsible + for all handling of the marshalling of an object to XML text. It is + called at the point where the start tag for the associated element + should be generated. +

+

+
Parameters:
obj - object to be marshalled (may be null if property + is not optional)
ctx - XML text output context +
Throws: +
JiBXException - on error in marshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IAliasable.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IAliasable.html @@ -0,0 +1,184 @@ + + + + + + +IAliasable (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IAliasable

+
+
All Known Implementing Classes:
Dom4JElementMapper, DomElementMapper, HashMapperStringToComplex, HashMapperStringToSchemaType, IdDefRefMapperBase, IdRefMapperBase, ObjectArrayMapper, TypedArrayMapper
+
+
+
+
public interface IAliasable
+ + +

+Nameable extension interface definition. This interface must be implemented + by a marshaller IMarshaller or unmarshaller IUnmarshaller that can use different top-level element + names. Although it does not define any methods, it designates the marshaller + or unmarshaller as being usable with a namespace and element name, and + particular bound class name, defined within a binding. + + If this interface is implemented by a marshaller or unmarshaller class used + with a specified element name in a binding the binding compiler will actually + generate a subclass of the original class. The subclass uses a standard + no-argument constructor, but calls a superclass constructor with the + specified element name and bound class information. The superclass code can + then make use of the specified name in marshalling and/or unmarshalling. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ +

+ +


+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/ValidationException.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/ValidationException.html @@ -0,0 +1,424 @@ + + + + + + +ValidationException (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class ValidationException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by org.jibx.runtime.JiBXException
+              extended by org.jibx.runtime.RecoverableException
+                  extended by org.jibx.runtime.ValidationException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
+
public class ValidationException
extends RecoverableException
+ + +

+Validation exception class. This is used for marshalling and unmarshalling + errors that relate to data content. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
ValidationException(java.lang.String msg) + +
+          Constructor from message.
ValidationException(java.lang.String msg, + java.lang.Object obj) + +
+          Constructor from message and validation object.
ValidationException(java.lang.String msg, + java.lang.Object obj, + IUnmarshallingContext ctx) + +
+          Constructor from message, validation object, and unmarshalling context.
ValidationException(java.lang.String msg, + java.lang.Throwable root) + +
+          Constructor from message and wrapped exception.
ValidationException(java.lang.String msg, + java.lang.Throwable root, + java.lang.Object obj) + +
+          Constructor from message, wrapped exception, and validation object.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.lang.StringaddDescription(java.lang.String msg, + java.lang.Object obj) + +
+          Add description information for a validation object to message.
+static java.lang.Stringdescribe(java.lang.Object obj) + +
+          Get description information for a validation object.
+ java.lang.StringgetMessage() + +
+          Get exception description.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.JiBXException
getRootCause, printStackTrace, printStackTrace, printStackTrace
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ValidationException

+
+public ValidationException(java.lang.String msg)
+
+
Constructor from message. +

+

+
Parameters:
msg - message describing the exception condition
+
+
+ +

+ValidationException

+
+public ValidationException(java.lang.String msg,
+                           java.lang.Throwable root)
+
+
Constructor from message and wrapped exception. +

+

+
Parameters:
msg - message describing the exception condition
root - exception which caused this exception
+
+
+ +

+ValidationException

+
+public ValidationException(java.lang.String msg,
+                           java.lang.Object obj)
+
+
Constructor from message and validation object. +

+

+
Parameters:
msg - message describing the exception condition
obj - source object for validation error
+
+
+ +

+ValidationException

+
+public ValidationException(java.lang.String msg,
+                           java.lang.Throwable root,
+                           java.lang.Object obj)
+
+
Constructor from message, wrapped exception, and validation object. +

+

+
Parameters:
msg - message describing the exception condition
root - exception which caused this exception
obj - source object for validation error
+
+
+ +

+ValidationException

+
+public ValidationException(java.lang.String msg,
+                           java.lang.Object obj,
+                           IUnmarshallingContext ctx)
+
+
Constructor from message, validation object, and unmarshalling context. +

+

+
Parameters:
msg - message describing the exception condition
obj - source object for validation error
ctx - context used for unmarshalling
+
+ + + + + + + + +
+Method Detail
+ +

+describe

+
+public static java.lang.String describe(java.lang.Object obj)
+
+
Get description information for a validation object. For an unmarshalled + object with source references available this returns the source position + description. Otherwise, it returns the result of a Object.toString() method call. +

+

+
Parameters:
obj - source object for validation error +
Returns:
object description text
+
+
+
+ +

+addDescription

+
+public static java.lang.String addDescription(java.lang.String msg,
+                                              java.lang.Object obj)
+
+
Add description information for a validation object to message. This just + appends the result of a describe(java.lang.Object) call to the supplied message, + with some appropriate formatting. +

+

+
Parameters:
msg - base message text
obj - source object for validation error +
Returns:
message with object description appended
+
+
+
+ +

+getMessage

+
+public java.lang.String getMessage()
+
+
Get exception description. +

+

+
Overrides:
getMessage in class java.lang.Throwable
+
+
+ +
Returns:
message describing the exception condition
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/JiBXException.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/JiBXException.html @@ -0,0 +1,412 @@ + + + + + + +JiBXException (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Class JiBXException

+
+java.lang.Object
+  extended by java.lang.Throwable
+      extended by java.lang.Exception
+          extended by org.jibx.runtime.JiBXException
+
+
+
All Implemented Interfaces:
java.io.Serializable
+
+
+
Direct Known Subclasses:
RecoverableException, UnrecoverableException
+
+
+
+
public class JiBXException
extends java.lang.Exception
+ + +

+Binding exception class. This is used for all types of errors that + can be generated by the runtime. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
See Also:
Serialized Form
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private  java.lang.Throwablem_rootCause + +
+          Exception that caused this exception.
+  + + + + + + + + + + + + + +
+Constructor Summary
JiBXException(java.lang.String msg) + +
+          Constructor from message.
JiBXException(java.lang.String msg, + java.lang.Throwable root) + +
+          Constructor from message and wrapped exception.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.ThrowablegetRootCause() + +
+          Get root cause exception.
+ voidprintStackTrace() + +
+          Print stack trace to standard error.
+ voidprintStackTrace(java.io.PrintStream s) + +
+          Print stack trace to stream.
+ voidprintStackTrace(java.io.PrintWriter s) + +
+          Print stack trace to writer.
+ + + + + + + +
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, setStackTrace, toString
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_rootCause

+
+private java.lang.Throwable m_rootCause
+
+
Exception that caused this exception. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+JiBXException

+
+public JiBXException(java.lang.String msg)
+
+
Constructor from message. +

+

+
Parameters:
msg - message describing the exception condition
+
+
+ +

+JiBXException

+
+public JiBXException(java.lang.String msg,
+                     java.lang.Throwable root)
+
+
Constructor from message and wrapped exception. +

+

+
Parameters:
msg - message describing the exception condition
root - exception which caused this exception
+
+ + + + + + + + +
+Method Detail
+ +

+getRootCause

+
+public java.lang.Throwable getRootCause()
+
+
Get root cause exception. +

+

+ +
Returns:
exception that caused this exception
+
+
+
+ +

+printStackTrace

+
+public void printStackTrace()
+
+
Print stack trace to standard error. This is an override of the base + class method to implement exception chaining. +

+

+
Overrides:
printStackTrace in class java.lang.Throwable
+
+
+
+
+
+
+ +

+printStackTrace

+
+public void printStackTrace(java.io.PrintStream s)
+
+
Print stack trace to stream. This is an override of the base class method + to implement exception chaining. +

+

+
Overrides:
printStackTrace in class java.lang.Throwable
+
+
+
Parameters:
s - stream for printing stack trace
+
+
+
+ +

+printStackTrace

+
+public void printStackTrace(java.io.PrintWriter s)
+
+
Print stack trace to writer. This is an override of the base class method + to implement exception chaining. +

+

+
Overrides:
printStackTrace in class java.lang.Throwable
+
+
+
Parameters:
s - writer for printing stack trace
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/package-frame.html @@ -0,0 +1,88 @@ + + + + + + +org.jibx.runtime (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.runtime + + + + +
+Interfaces  + +
+IAbstractMarshaller +
+IAliasable +
+IBindingFactory +
+ICharacterEscaper +
+IMarshallable +
+IMarshaller +
+IMarshallingContext +
+ITrackSource +
+IUnmarshallable +
+IUnmarshaller +
+IUnmarshallingContext +
+IXMLWriter
+ + + + + + +
+Classes  + +
+BindingDirectory +
+EnumSet +
+EnumSet.EnumItem +
+Utility
+ + + + + + +
+Exceptions  + +
+JiBXException +
+RecoverableException +
+UnrecoverableException +
+ValidationException
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/package-summary.html @@ -0,0 +1,263 @@ + + + + + + +org.jibx.runtime (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.runtime +

+User interface to JiBX data binding framework runtime. +

+See: +
+          Description +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Interface Summary
IAbstractMarshallerAbstract base marshaller interface definition.
IAliasableNameable extension interface definition.
IBindingFactoryBinding factory interface definition.
ICharacterEscaperEscaper for character data to be written to output document.
IMarshallableMarshallable interface definition.
IMarshallerMarshaller interface definition.
IMarshallingContextUser interface for serializer to XML.
ITrackSourceUnmarshalling source tracking interface.
IUnmarshallableUnmarshallable interface definition.
IUnmarshallerUnmarshaller interface definition.
IUnmarshallingContextUser interface for deserializer from XML.
IXMLWriterXML writer interface used for output of marshalled document.
+  + +

+ + + + + + + + + + + + + + + + + + + + + +
+Class Summary
BindingDirectoryAbstract class with static method to find the binding factory corresponding + to a binding name.
EnumSetNamed value set support class.
EnumSet.EnumItemEnumeration pair information.
UtilityUtility class supplying static methods.
+  + +

+ + + + + + + + + + + + + + + + + + + + + +
+Exception Summary
JiBXExceptionBinding exception class.
RecoverableExceptionRecoverable exception class.
UnrecoverableExceptionUnrecoverable exception class.
ValidationExceptionValidation exception class.
+  + +

+

+Package org.jibx.runtime Description +

+ +

+User interface to JiBX data binding framework runtime. These are the classes and interfaces +generally intended for direct use by end users, and are considered published APIs +which will remain stable. +

+ +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IBindingFactory.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IBindingFactory.html @@ -0,0 +1,523 @@ + + + + + + +IBindingFactory (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IBindingFactory

+
+
+
public interface IBindingFactory
+ + +

+Binding factory interface definition. This interface is implemented by + the binding factory class generated by each binding definition. All binding + factory instances are guaranteed to be threadsafe and reusable. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intCOMPATIBLE_VERSION_MASK + +
+          Mask for portions of version number that effect compatibility.
+static java.lang.StringCURRENT_VERSION_NAME + +
+          Current distribution file name.
+static intCURRENT_VERSION_NUMBER + +
+          Current binary version number.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ IMarshallingContextcreateMarshallingContext() + +
+          Create marshalling context instance.
+ IUnmarshallingContextcreateUnmarshallingContext() + +
+          Create unmarshalling context instance.
+ java.lang.StringgetCompilerDistribution() + +
+          Get distribution name for binding compiler used.
+ intgetCompilerVersion() + +
+          Get version number for binding compiler used.
+ java.lang.String[]getElementNames() + +
+          Get names of elements corresponding to mapped classes.
+ java.lang.String[]getElementNamespaces() + +
+          Get namespaces of elements corresponding to mapped classes.
+ java.lang.String[]getMappedClasses() + +
+          Get mapped class names (or type names, in the case of abstract mappings).
+ java.lang.String[]getNamespaces() + +
+          Get namespaces defined in mapping.
+ java.lang.String[]getPrefixes() + +
+          Get initial prefixes for namespaces defined in mapping.
+ intgetTypeIndex(java.lang.String type) + +
+          Get mapped class index from type name for abstract non-base mappings + included in the binding.
+  +

+ + + + + + + + +
+Field Detail
+ +

+CURRENT_VERSION_NUMBER

+
+static final int CURRENT_VERSION_NUMBER
+
+
Current binary version number. This is a byte-ordered value, allowing + for two levels of major and two levels of minor version. +

+

+
See Also:
Constant Field Values
+
+
+ +

+CURRENT_VERSION_NAME

+
+static final java.lang.String CURRENT_VERSION_NAME
+
+
Current distribution file name. This is filled in by the Ant build + process to match the current distribution. +

+

+
See Also:
Constant Field Values
+
+
+ +

+COMPATIBLE_VERSION_MASK

+
+static final int COMPATIBLE_VERSION_MASK
+
+
Mask for portions of version number that effect compatibility. +

+

+
See Also:
Constant Field Values
+
+ + + + + + + + +
+Method Detail
+ +

+createMarshallingContext

+
+IMarshallingContext createMarshallingContext()
+                                             throws JiBXException
+
+
Create marshalling context instance. +

+

+ +
Returns:
created marshalling context instance +
Throws: +
JiBXException - if error creating context +
java.lang.UnsupportedOperationException - if marshalling not supported + by binding
+
+
+
+ +

+createUnmarshallingContext

+
+IUnmarshallingContext createUnmarshallingContext()
+                                                 throws JiBXException
+
+
Create unmarshalling context instance. +

+

+ +
Returns:
created unmarshalling context instance +
Throws: +
JiBXException - if error creating context +
java.lang.UnsupportedOperationException - if unmarshalling not supported + by binding
+
+
+
+ +

+getCompilerVersion

+
+int getCompilerVersion()
+
+
Get version number for binding compiler used. +

+

+ +
Returns:
version number of code used to compile binding
+
+
+
+ +

+getCompilerDistribution

+
+java.lang.String getCompilerDistribution()
+
+
Get distribution name for binding compiler used. +

+

+ +
Returns:
name of distribution for binding compiler
+
+
+
+ +

+getNamespaces

+
+java.lang.String[] getNamespaces()
+
+
Get namespaces defined in mapping. The returned array is indexed by the + namespace index number used when marshalling. +

+

+ +
Returns:
array of namespaces defined in binding (null if not + an output binding)
+
+
+
+ +

+getPrefixes

+
+java.lang.String[] getPrefixes()
+
+
Get initial prefixes for namespaces defined in mapping. The returned + array is indexed by the namespace index number used when marshalling. + Note that these are only the first prefixes associated with each + namespace; it's possible to reuse the namespace in the binding with a + different prefix. +

+

+ +
Returns:
array of prefixes for namespaces defined in binding + (null if not an output binding)
+
+
+
+ +

+getMappedClasses

+
+java.lang.String[] getMappedClasses()
+
+
Get mapped class names (or type names, in the case of abstract mappings). + Returns array of fully-qualified class and/or type names, ordered by + index number of the class. +

+

+ +
Returns:
array of class names
+
+
+
+ +

+getElementNamespaces

+
+java.lang.String[] getElementNamespaces()
+
+
Get namespaces of elements corresponding to mapped classes. The returned + array uses the same ordering as the result of the getMappedClasses() call. Entries in the array are null if + there is no element for a class or the element is in the default + namespace. +

+

+ +
Returns:
array of element namespaces
+
+
+
+ +

+getElementNames

+
+java.lang.String[] getElementNames()
+
+
Get names of elements corresponding to mapped classes. The returned array + uses the same ordering as the result of the getMappedClasses() + call. Entries in the array are null if there is no element + for a class. +

+

+ +
Returns:
array of element names
+
+
+
+ +

+getTypeIndex

+
+int getTypeIndex(java.lang.String type)
+
+
Get mapped class index from type name for abstract non-base mappings + included in the binding. This is intended to allow identifying and using + abstract mappings (basically type mappings) at runtime. The method is + only returns a non-negative result if the "force-classes" option is used + for the binding definition (since otherwise no marshaller/unmarshaller + classes are created for abstract non-base mappings). +

+

+
Parameters:
type - fully-qualified class or type name +
Returns:
mapping index for type, or -1 if type is not an + abstract non-base mapping
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/IUnmarshallable.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/IUnmarshallable.html @@ -0,0 +1,219 @@ + + + + + + +IUnmarshallable (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime +
+Interface IUnmarshallable

+
+
+
public interface IUnmarshallable
+ + +

+Unmarshallable interface definition. This interface must be implemented by + all classes which can be unmarshalled as independent units (not just as + children of other objects). Classes implementing this interface may either + unmarshal themselves directly (if there's only one unmarshalling format + defined), or obtain an instance of the appropriate unmarshaller from the + context and use that. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidunmarshal(IUnmarshallingContext ctx) + +
+          Unmarshal self.
+  +

+ + + + + + + + +
+Method Detail
+ +

+unmarshal

+
+void unmarshal(IUnmarshallingContext ctx)
+               throws JiBXException
+
+
Unmarshal self. This method call is responsible for all handling of the + unmarshalling of the object from XML text. +

+

+
Parameters:
ctx - unmarshalling context +
Throws: +
JiBXException - on error in unmarshalling process
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/MarshallingContext.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/MarshallingContext.html @@ -0,0 +1,2160 @@ + + + + + + +MarshallingContext (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class MarshallingContext

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.MarshallingContext
+
+
+
All Implemented Interfaces:
IMarshallingContext
+
+
+
+
public class MarshallingContext
extends java.lang.Object
implements IMarshallingContext
+ + +

+JiBX serializer supplying convenience methods for marshalling. Most of these + methods are designed for use in code generated by the binding generator. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static intINITIAL_STACK_SIZE + +
+          Starting size for object stack.
+private  java.lang.String[]m_classes + +
+          Names of classes included in mapping definition.
+private  IBindingFactorym_factory + +
+          Binding factory used to create this unmarshaller.
+private  intm_globalCount + +
+          Number of classes with global marshallers.
+private  java.util.HashMapm_idMap + +
+          Shared map from IDs to objects.
+private  charm_indentChar + +
+          Character used for indenting.
+private  intm_indentCount + +
+          Indent character count per level.
+private  java.lang.String[]m_marshallerClasses + +
+          Marshaller classes for mapping definition (null for + mappings out of context).
+private  IMarshaller[]m_marshallers + +
+          Marshallers for classes in mapping definition (lazy create of actual + marshaller instances)
+private  java.lang.Stringm_newLine + +
+          Character sequence for end of line.
+private  java.lang.Object[]m_objectStack + +
+          Stack of objects being marshalled.
+private  intm_stackDepth + +
+          Current marshalling stack depth.
+private  java.lang.String[]m_uris + +
+          URIs for namespaces used in binding.
+private  IXMLWriterm_writer + +
+          Output document handler.
+static java.lang.StringXML_NAMESPACE + +
+          Fixed XML namespace.
+  + + + + + + + + + + +
+Constructor Summary
MarshallingContext(java.lang.String[] classes, + java.lang.String[] mcs, + java.lang.String[] uris, + IBindingFactory ifact) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddMarshalling(int index, + java.lang.String name) + +
+          Define marshalling for class.
+ MarshallingContextattribute(int index, + java.lang.String name, + int value) + +
+          Generate integer attribute.
+ MarshallingContextattribute(int index, + java.lang.String name, + int value, + java.lang.String[] table) + +
+          Generate enumeration attribute.
+ MarshallingContextattribute(int index, + java.lang.String name, + java.lang.String value) + +
+          Generate text attribute.
+ java.lang.StringbuildNameString(int index, + java.lang.String name) + +
+          Build name with optional namespace.
+ MarshallingContextcloseStartContent() + +
+          Close start tag with content to follow.
+ MarshallingContextcloseStartEmpty() + +
+          Close start tag with no content (empty tag).
+ MarshallingContextcontent(int value) + +
+          Add integer content to current element.
+ MarshallingContextcontent(int value, + java.lang.String[] table) + +
+          Add enumeration content to current element.
+ MarshallingContextcontent(java.lang.String value) + +
+          Add text content to current element.
+private  ICharacterEscapercreateEscaper(java.lang.String enc) + +
+          Create character escaper for encoding.
+ MarshallingContextelement(int index, + java.lang.String name, + int value) + +
+          Generate complete element with integer content.
+ MarshallingContextelement(int index, + java.lang.String name, + int value, + java.lang.String[] table) + +
+          Generate complete element with enumeration content.
+ MarshallingContextelement(int index, + java.lang.String name, + java.lang.String value) + +
+          Generate complete element with text content.
+ voidendDocument() + +
+          End document.
+ MarshallingContextendTag(int index, + java.lang.String name) + +
+          Generate end tag for element.
+ IBindingFactorygetFactory() + +
+          Return the binding factory used to create this unmarshaller.
+ java.util.HashMapgetIdMap() + +
+          Get shared ID map.
+ intgetIndent() + +
+          Get current nesting indent spaces.
+ IMarshallergetMarshaller(int index, + java.lang.String name) + +
+          Find the marshaller for a particular class index + in the current context.
+ java.lang.String[]getNamespaces() + +
+          Get namespace URIs for mapping.
+ intgetStackDepth() + +
+          Get current marshalling object stack depth.
+ java.lang.ObjectgetStackObject(int depth) + +
+          Get object from marshalling stack.
+ java.lang.ObjectgetStackTop() + +
+          Get top object on marshalling stack.
+ IXMLWritergetXmlWriter() + +
+          Get the writer being used for output.
+ MarshallingContextmarshalCollection(java.util.ArrayList col) + +
+          Marshal all items in a collection.
+ MarshallingContextmarshalCollection(java.util.Collection col) + +
+          Marshal all items in a collection.
+ MarshallingContextmarshalCollection(java.util.Vector col) + +
+          Marshal all items in a collection.
+ voidmarshalDocument(java.lang.Object root) + +
+          Marshal document from root object without XML declaration.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone) + +
+          Marshal document from root object.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + +
+          Marshal document from root object to output stream with encoding.
+ voidmarshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + +
+          Marshal document from root object to writer.
+protected  voidmarshalRoot(java.lang.Object root) + +
+          Marshal document from root object.
+ voidpopObject() + +
+          Pop marshalled object from stack.
+ voidpushObject(java.lang.Object obj) + +
+          Push created object to marshalling stack.
+ voidremoveMarshalling(int index) + +
+          Undefine marshalling for element.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidsetFromContext(MarshallingContext parent) + +
+          Initializes the context to use the same marshalled text destination and + parameters as another marshalling context.
+ voidsetIndent(int count) + +
+          Set nesting indent spaces.
+ voidsetIndent(int count, + java.lang.String newline, + char indent) + +
+          Set nesting indentation.
+ voidsetOutput(java.io.OutputStream outs, + java.lang.String enc) + +
+          Set output stream and encoding.
+ voidsetOutput(java.io.OutputStream outs, + java.lang.String enc, + ICharacterEscaper esc) + +
+          Set output stream with encoding and escaper.
+ voidsetOutput(java.io.Writer outw) + +
+          Set output writer.
+ voidsetOutput(java.io.Writer outw, + ICharacterEscaper esc) + +
+          Set output writer and escaper.
+ voidsetXmlWriter(IXMLWriter xwrite) + +
+          Set the writer being used for output.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone) + +
+          Start document.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + +
+          Start document with output stream and encoding.
+ voidstartDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + +
+          Start document with writer.
+ MarshallingContextstartTag(int index, + java.lang.String name) + +
+          Generate start tag for element without attributes.
+ MarshallingContextstartTagAttributes(int index, + java.lang.String name) + +
+          Generate start tag for element with attributes.
+ MarshallingContextstartTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + +
+          Generate start tag for element with namespaces.
+ MarshallingContextwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+ MarshallingContextwriteContent(java.lang.String text) + +
+          Write content value with character entity substitutions.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+XML_NAMESPACE

+
+public static final java.lang.String XML_NAMESPACE
+
+
Fixed XML namespace. +

+

+
See Also:
Constant Field Values
+
+
+ +

+INITIAL_STACK_SIZE

+
+private static final int INITIAL_STACK_SIZE
+
+
Starting size for object stack. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_factory

+
+private IBindingFactory m_factory
+
+
Binding factory used to create this unmarshaller. +

+

+
+
+
+ +

+m_classes

+
+private java.lang.String[] m_classes
+
+
Names of classes included in mapping definition. +

+

+
+
+
+ +

+m_globalCount

+
+private int m_globalCount
+
+
Number of classes with global marshallers. +

+

+
+
+
+ +

+m_marshallerClasses

+
+private java.lang.String[] m_marshallerClasses
+
+
Marshaller classes for mapping definition (null for + mappings out of context). +

+

+
+
+
+ +

+m_marshallers

+
+private IMarshaller[] m_marshallers
+
+
Marshallers for classes in mapping definition (lazy create of actual + marshaller instances) +

+

+
+
+
+ +

+m_uris

+
+private java.lang.String[] m_uris
+
+
URIs for namespaces used in binding. +

+

+
+
+
+ +

+m_stackDepth

+
+private int m_stackDepth
+
+
Current marshalling stack depth. +

+

+
+
+
+ +

+m_objectStack

+
+private java.lang.Object[] m_objectStack
+
+
Stack of objects being marshalled. +

+

+
+
+
+ +

+m_indentCount

+
+private int m_indentCount
+
+
Indent character count per level. +

+

+
+
+
+ +

+m_newLine

+
+private java.lang.String m_newLine
+
+
Character sequence for end of line. +

+

+
+
+
+ +

+m_indentChar

+
+private char m_indentChar
+
+
Character used for indenting. +

+

+
+
+
+ +

+m_idMap

+
+private java.util.HashMap m_idMap
+
+
Shared map from IDs to objects. This is not used directly by the + marshalling code, but is available for user extensions (lazy create). +

+

+
+
+
+ +

+m_writer

+
+private IXMLWriter m_writer
+
+
Output document handler. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+MarshallingContext

+
+public MarshallingContext(java.lang.String[] classes,
+                          java.lang.String[] mcs,
+                          java.lang.String[] uris,
+                          IBindingFactory ifact)
+
+
Constructor. +

+

+
Parameters:
classes - ordered array of class names included in mapping + definition (reference kept, must be constant)
mcs - names of marshaller classes for indexes with fixed marshallers + (as opposed to mapping slots, which may be overridden; reference kept, + must be constant)
uris - ordered array of URIs for namespaces used in binding (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
ifact - binding factory creating this unmarshaller
+
+ + + + + + + + +
+Method Detail
+ +

+createEscaper

+
+private ICharacterEscaper createEscaper(java.lang.String enc)
+                                 throws JiBXException
+
+
Create character escaper for encoding. +

+

+
+
+
+
Parameters:
enc - document output encoding, or null for default +
Returns:
character escaper for encoding +
Throws: +
JiBXException - if error creating setting output
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.OutputStream outs,
+                      java.lang.String enc,
+                      ICharacterEscaper esc)
+               throws JiBXException
+
+
Set output stream with encoding and escaper. This forces handling of the + output stream to use the Java character encoding support with the + supplied escaper. +

+

+
Specified by:
setOutput in interface IMarshallingContext
+
+
+
Parameters:
outs - stream for document data output
enc - document output encoding, or null uses UTF-8 + default
esc - escaper for writing characters to stream +
Throws: +
JiBXException - if error setting output
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.OutputStream outs,
+                      java.lang.String enc)
+               throws JiBXException
+
+
Set output stream and encoding. +

+

+
Specified by:
setOutput in interface IMarshallingContext
+
+
+
Parameters:
outs - stream for document data output
enc - document output encoding, or null for default +
Throws: +
JiBXException - if error creating setting output
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.Writer outw,
+                      ICharacterEscaper esc)
+
+
Set output writer and escaper. +

+

+
Specified by:
setOutput in interface IMarshallingContext
+
+
+
Parameters:
outw - writer for document data output
esc - escaper for writing characters
+
+
+
+ +

+setOutput

+
+public void setOutput(java.io.Writer outw)
+
+
Set output writer. +

+

+
Specified by:
setOutput in interface IMarshallingContext
+
+
+
Parameters:
outw - writer for document data output
+
+
+
+ +

+getXmlWriter

+
+public IXMLWriter getXmlWriter()
+
+
Get the writer being used for output. +

+

+
Specified by:
getXmlWriter in interface IMarshallingContext
+
+
+ +
Returns:
XML writer used for output
+
+
+
+ +

+setXmlWriter

+
+public void setXmlWriter(IXMLWriter xwrite)
+
+
Set the writer being used for output. +

+

+
Specified by:
setXmlWriter in interface IMarshallingContext
+
+
+
Parameters:
xwrite - XML writer used for output
+
+
+
+ +

+getIndent

+
+public int getIndent()
+
+
Get current nesting indent spaces. This returns the number of spaces used + to show indenting, if used. +

+

+
Specified by:
getIndent in interface IMarshallingContext
+
+
+ +
Returns:
number of spaces indented per level, or negative if indentation + disabled
+
+
+
+ +

+setIndent

+
+public void setIndent(int count)
+
+
Set nesting indent spaces. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Specified by:
setIndent in interface IMarshallingContext
+
+
+
Parameters:
count - number of spaces to indent per level, or disable + indentation if negative
+
+
+
+ +

+setIndent

+
+public void setIndent(int count,
+                      java.lang.String newline,
+                      char indent)
+
+
Set nesting indentation. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Specified by:
setIndent in interface IMarshallingContext
+
+
+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+setFromContext

+
+public void setFromContext(MarshallingContext parent)
+
+
Initializes the context to use the same marshalled text destination and + parameters as another marshalling context. This method is designed for + use when an initial context needs to create and invoke a secondary + context (generally from a different binding) in the course of an + marshalling operation. +

+

+
+
+
+
Parameters:
parent - context supplying target for marshalled document text
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset to initial state for reuse. The context is serially reusable, + as long as this method is called to clear any retained state information + between uses. It is automatically called when output is set. +

+

+
Specified by:
reset in interface IMarshallingContext
+
+
+
+
+
+
+ +

+getFactory

+
+public IBindingFactory getFactory()
+
+
Return the binding factory used to create this unmarshaller. +

+

+
+
+
+ +
Returns:
binding factory
+
+
+
+ +

+getNamespaces

+
+public java.lang.String[] getNamespaces()
+
+
Get namespace URIs for mapping. This gets the full ordered array of + namespaces known in the binding used for this marshalling, where the + index number of each namespace URI is the namespace index used to lookup + the prefix when marshalling a name in that namespace. The returned array + must not be modified. +

+

+
+
+
+ +
Returns:
array of namespaces
+
+
+
+ +

+startDocument

+
+public void startDocument(java.lang.String enc,
+                          java.lang.Boolean alone)
+                   throws JiBXException
+
+
Start document. This can only be validly called immediately following + one of the set output methods; otherwise the output document will be + corrupt. +

+

+
Specified by:
startDocument in interface IMarshallingContext
+
+
+
Parameters:
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+startDocument

+
+public void startDocument(java.lang.String enc,
+                          java.lang.Boolean alone,
+                          java.io.OutputStream outs)
+                   throws JiBXException
+
+
Start document with output stream and encoding. The effect is the same + as from first setting the output stream and encoding, then making the + call to start document. +

+

+
Specified by:
startDocument in interface IMarshallingContext
+
+
+
Parameters:
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified
outs - stream for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+startDocument

+
+public void startDocument(java.lang.String enc,
+                          java.lang.Boolean alone,
+                          java.io.Writer outw)
+                   throws JiBXException
+
+
Start document with writer. The effect is the same as from first + setting the writer, then making the call to start document. +

+

+
Specified by:
startDocument in interface IMarshallingContext
+
+
+
Parameters:
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified
outw - writer for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+endDocument

+
+public void endDocument()
+                 throws JiBXException
+
+
End document. Finishes all output and closes the document. Note that if + this is called with an imcomplete marshalling the result will not be + well-formed XML. +

+

+
Specified by:
endDocument in interface IMarshallingContext
+
+
+ +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+buildNameString

+
+public java.lang.String buildNameString(int index,
+                                        java.lang.String name)
+
+
Build name with optional namespace. Just returns the appropriate + name format. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - local name part of name +
Returns:
formatted name string
+
+
+
+ +

+startTag

+
+public MarshallingContext startTag(int index,
+                                   java.lang.String name)
+                            throws JiBXException
+
+
Generate start tag for element without attributes. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+startTagAttributes

+
+public MarshallingContext startTagAttributes(int index,
+                                             java.lang.String name)
+                                      throws JiBXException
+
+
Generate start tag for element with attributes. This only opens the start + tag, allowing attributes to be added immediately following this call. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+attribute

+
+public MarshallingContext attribute(int index,
+                                    java.lang.String name,
+                                    java.lang.String value)
+                             throws JiBXException
+
+
Generate text attribute. This can only be used following an open start + tag with attributes. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - attribute name
value - text value for attribute (cannot be null) +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+attribute

+
+public MarshallingContext attribute(int index,
+                                    java.lang.String name,
+                                    int value)
+                             throws JiBXException
+
+
Generate integer attribute. This can only be used following an open start + tag. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - attribute name
value - integer value for attribute +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+attribute

+
+public MarshallingContext attribute(int index,
+                                    java.lang.String name,
+                                    int value,
+                                    java.lang.String[] table)
+                             throws JiBXException
+
+
Generate enumeration attribute. The actual text to be written is obtained + by indexing into the supplied array of values. This can only be used + following an open start tag. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - attribute name
value - integer enumeration value (zero-based)
table - text values in enumeration +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+closeStartContent

+
+public MarshallingContext closeStartContent()
+                                     throws JiBXException
+
+
Close start tag with content to follow. +

+

+
+
+
+ +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+closeStartEmpty

+
+public MarshallingContext closeStartEmpty()
+                                   throws JiBXException
+
+
Close start tag with no content (empty tag). +

+

+
+
+
+ +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+content

+
+public MarshallingContext content(java.lang.String value)
+                           throws JiBXException
+
+
Add text content to current element. +

+

+
+
+
+
Parameters:
value - text element content +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+content

+
+public MarshallingContext content(int value)
+                           throws JiBXException
+
+
Add integer content to current element. +

+

+
+
+
+
Parameters:
value - integer element content +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+content

+
+public MarshallingContext content(int value,
+                                  java.lang.String[] table)
+                           throws JiBXException
+
+
Add enumeration content to current element. The actual text to be + written is obtained by indexing into the supplied array of values. +

+

+
+
+
+
Parameters:
value - integer enumeration value (zero-based)
table - text values in enumeration +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+endTag

+
+public MarshallingContext endTag(int index,
+                                 java.lang.String name)
+                          throws JiBXException
+
+
Generate end tag for element. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+element

+
+public MarshallingContext element(int index,
+                                  java.lang.String name,
+                                  java.lang.String value)
+                           throws JiBXException
+
+
Generate complete element with text content. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name
value - text element content +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+element

+
+public MarshallingContext element(int index,
+                                  java.lang.String name,
+                                  int value)
+                           throws JiBXException
+
+
Generate complete element with integer content. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name
value - integer element content +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+element

+
+public MarshallingContext element(int index,
+                                  java.lang.String name,
+                                  int value,
+                                  java.lang.String[] table)
+                           throws JiBXException
+
+
Generate complete element with enumeration content. The actual text to be + written is obtained by indexing into the supplied array of values. +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name
value - integer enumeration value (zero-based)
table - text values in enumeration +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+writeCData

+
+public MarshallingContext writeCData(java.lang.String text)
+                              throws java.io.IOException
+
+
Write CDATA text to document. +

+

+
+
+
+
Parameters:
text - content value text +
Returns:
this context (to allow chained calls) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeContent

+
+public MarshallingContext writeContent(java.lang.String text)
+                                throws java.io.IOException
+
+
Write content value with character entity substitutions. +

+

+
+
+
+
Parameters:
text - content value text +
Returns:
this context (to allow chained calls) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+marshalCollection

+
+public MarshallingContext marshalCollection(java.util.Collection col)
+                                     throws JiBXException
+
+
Marshal all items in a collection. This variation is for generic + collections. +

+

+
+
+
+
Parameters:
col - collection of items to be marshalled +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalCollection

+
+public MarshallingContext marshalCollection(java.util.ArrayList col)
+                                     throws JiBXException
+
+
Marshal all items in a collection. This variation is for ArrayList + collections. +

+

+
+
+
+
Parameters:
col - collection of items to be marshalled +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalCollection

+
+public MarshallingContext marshalCollection(java.util.Vector col)
+                                     throws JiBXException
+
+
Marshal all items in a collection. This variation is for Vector + collections. +

+

+
+
+
+
Parameters:
col - collection of items to be marshalled +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+addMarshalling

+
+public void addMarshalling(int index,
+                           java.lang.String name)
+
+
Define marshalling for class. Adds the marshalling definition using fixed + indexes for each class, allowing direct lookup of the marshaller when + multiple versions are defined. +

+

+
+
+
+
Parameters:
index - class index for marshalling definition
name - marshaller class name handling
+
+
+
+ +

+removeMarshalling

+
+public void removeMarshalling(int index)
+
+
Undefine marshalling for element. Removes the marshalling + definition for a particular class index. +

+

+
+
+
+
Parameters:
index - class index for marshalling definition
+
+
+
+ +

+startTagNamespaces

+
+public MarshallingContext startTagNamespaces(int index,
+                                             java.lang.String name,
+                                             int[] nums,
+                                             java.lang.String[] prefs)
+                                      throws JiBXException
+
+
Generate start tag for element with namespaces. This creates the actual + start tag, along with any necessary namespace declarations. Previously + active namespace declarations are not duplicated. The tag is + left incomplete, allowing other attributes to be added. + + TODO: Handle nested default namespaces declarations, prefixes for outers +

+

+
+
+
+
Parameters:
index - namespace URI index number
name - element name
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until end of element)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Returns:
this context (to allow chained calls) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getMarshaller

+
+public IMarshaller getMarshaller(int index,
+                                 java.lang.String name)
+                          throws JiBXException
+
+
Find the marshaller for a particular class index + in the current context. +

+

+
Specified by:
getMarshaller in interface IMarshallingContext
+
+
+
Parameters:
index - class index for marshalling definition
name - fully qualified name of class to be marshalled (used only + for validation) +
Returns:
marshalling handler for class +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalRoot

+
+protected void marshalRoot(java.lang.Object root)
+                    throws JiBXException
+
+
Marshal document from root object. This internal method just verifies + that the object is marshallable, then calls the marshal method on the + object itself. +

+

+
+
+
+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+public void marshalDocument(java.lang.Object root)
+                     throws JiBXException
+
+
Marshal document from root object without XML declaration. This can only + be validly called immediately following one of the set output methods; + otherwise the output document will be corrupt. The effect of this method + is the same as the sequence of a call to marshal the root object using + this context followed by a call to endDocument(). +

+

+
Specified by:
marshalDocument in interface IMarshallingContext
+
+
+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+public void marshalDocument(java.lang.Object root,
+                            java.lang.String enc,
+                            java.lang.Boolean alone)
+                     throws JiBXException
+
+
Marshal document from root object. This can only be validly called + immediately following one of the set output methods; otherwise the output + document will be corrupt. The effect of this method is the same as the + sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call to marshal the root + object using this context, and finally a call to endDocument(). +

+

+
Specified by:
marshalDocument in interface IMarshallingContext
+
+
+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+public void marshalDocument(java.lang.Object root,
+                            java.lang.String enc,
+                            java.lang.Boolean alone,
+                            java.io.OutputStream outs)
+                     throws JiBXException
+
+
Marshal document from root object to output stream with encoding. The + effect of this method is the same as the sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call to marshal the root object using this context, + and finally a call to endDocument(). +

+

+
Specified by:
marshalDocument in interface IMarshallingContext
+
+
+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified
outs - stream for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+marshalDocument

+
+public void marshalDocument(java.lang.Object root,
+                            java.lang.String enc,
+                            java.lang.Boolean alone,
+                            java.io.Writer outw)
+                     throws JiBXException
+
+
Marshal document from root object to writer. The effect of this method + is the same as the sequence of a call to startDocument(java.lang.String, java.lang.Boolean), a call + to marshal the root object using this context, and finally a call to + endDocument(). +

+

+
Specified by:
marshalDocument in interface IMarshallingContext
+
+
+
Parameters:
root - object at root of structure to be marshalled, which must have + a top-level mapping in the binding
enc - document encoding, null if not specified
alone - standalone document flag, null if not + specified
outw - writer for document data output +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getIdMap

+
+public java.util.HashMap getIdMap()
+
+
Get shared ID map. The ID map returned is not used directly by the + marshalling code, but is provided to support user extensions. +

+

+
+
+
+ +
Returns:
ID map
+
+
+
+ +

+pushObject

+
+public void pushObject(java.lang.Object obj)
+
+
Push created object to marshalling stack. This must be called before + beginning the marshalling of the object. It is only called for objects + with structure, not for those converted directly to and from text. +

+

+
Specified by:
pushObject in interface IMarshallingContext
+
+
+
Parameters:
obj - object being marshalled
+
+
+
+ +

+popObject

+
+public void popObject()
+               throws JiBXException
+
+
Pop marshalled object from stack. +

+

+
Specified by:
popObject in interface IMarshallingContext
+
+
+ +
Throws: +
JiBXException - if no object on stack
+
+
+
+ +

+getStackDepth

+
+public int getStackDepth()
+
+
Get current marshalling object stack depth. This allows tracking + nested calls to marshal one object while in the process of + marshalling another object. The bottom item on the stack is always the + root object being marshalled. +

+

+
Specified by:
getStackDepth in interface IMarshallingContext
+
+
+ +
Returns:
number of objects in marshalling stack
+
+
+
+ +

+getStackObject

+
+public java.lang.Object getStackObject(int depth)
+
+
Get object from marshalling stack. This stack allows tracking nested + calls to marshal one object while in the process of marshalling + another object. The bottom item on the stack is always the root object + being marshalled. +

+

+
Specified by:
getStackObject in interface IMarshallingContext
+
+
+
Parameters:
depth - object depth in stack to be retrieved (must be in the range + of zero to the current depth minus one). +
Returns:
object from marshalling stack
+
+
+
+ +

+getStackTop

+
+public java.lang.Object getStackTop()
+
+
Get top object on marshalling stack. This is safe to call even when no + objects are on the stack. +

+

+
Specified by:
getStackTop in interface IMarshallingContext
+
+
+ +
Returns:
object from marshalling stack, or null if none
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/XMLWriterNamespaceBase.DeclarationInfo.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/XMLWriterNamespaceBase.DeclarationInfo.html @@ -0,0 +1,308 @@ + + + + + + +XMLWriterNamespaceBase.DeclarationInfo (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class XMLWriterNamespaceBase.DeclarationInfo

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase.DeclarationInfo
+
+
+
Enclosing class:
XMLWriterNamespaceBase
+
+
+
+
private static class XMLWriterNamespaceBase.DeclarationInfo
extends java.lang.Object
+ + +

+Namespace declaration tracking information. This tracks all information + associated with an element that declares namespaces. +

+ +

+


+ +

+ + + + + + + + + + + + + + + + + + + +
+Field Summary
+ int[]m_deltas + +
+          Indexes of namespaces included in declarations.
+ intm_depth + +
+          Depth of element making declaration.
+ java.lang.String[]m_priors + +
+          Prior prefixes for namespaces.
+  + + + + + + + + + + +
+Constructor Summary
XMLWriterNamespaceBase.DeclarationInfo(int depth, + int[] deltas, + java.lang.String[] priors) + +
+          Simple constructor.
+  + + + + + + + +
+Method Summary
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_depth

+
+public final int m_depth
+
+
Depth of element making declaration. +

+

+
+
+
+ +

+m_deltas

+
+public final int[] m_deltas
+
+
Indexes of namespaces included in declarations. +

+

+
+
+
+ +

+m_priors

+
+public final java.lang.String[] m_priors
+
+
Prior prefixes for namespaces. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+XMLWriterNamespaceBase.DeclarationInfo

+
+public XMLWriterNamespaceBase.DeclarationInfo(int depth,
+                                              int[] deltas,
+                                              java.lang.String[] priors)
+
+
Simple constructor. +

+

+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/StreamWriterBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/StreamWriterBase.html @@ -0,0 +1,1009 @@ + + + + + + +StreamWriterBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class StreamWriterBase

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.runtime.impl.XMLWriterBase
+          extended by org.jibx.runtime.impl.StreamWriterBase
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
Direct Known Subclasses:
ISO88591StreamWriter, UTF8StreamWriter
+
+
+
+
public abstract class StreamWriterBase
extends XMLWriterBase
+ + +

+Base handler for marshalling text document to an output stream. This is + designed for use with character encodings that use standard one-byte values + for Unicode characters in the 0x20-0x7F range, which includes the most + widely used encodings for XML documents. It needs to be subclassed with + implementation methods specific to the encoding used. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static byte[]AMP_ENTITY + +
+           
+protected static byte[]GT_ENTITY + +
+           
+private static intINITIAL_BUFFER_SIZE + +
+          Default output buffer size.
+protected static byte[]LT_CDATAEND + +
+           
+protected static byte[]LT_CDATASTART + +
+           
+protected static byte[]LT_ENTITY + +
+           
+protected  byte[]m_buffer + +
+          Buffer for accumulating output bytes.
+private  java.lang.Stringm_encodingName + +
+          Name of encoding used for stream.
+protected  byte[][][]m_extensionBytes + +
+          Byte sequences for prefixes of extension namespaces in scope.
+protected  intm_fillOffset + +
+          Current offset in filling buffer.
+private  booleanm_indent + +
+          Indent tags for pretty-printed text.
+private  intm_indentBase + +
+          Base number of characters in indent sequence (end of line only).
+private  intm_indentPerLevel + +
+          Number of extra characters in indent sequence per level of nesting.
+private  byte[]m_indentSequence + +
+          Raw text for indentation sequences.
+protected  byte[][]m_prefixBytes + +
+          Byte sequences for prefixes of namespaces in scope.
+private  java.io.OutputStreamm_stream + +
+          Stream for text output.
+protected static byte[]QUOT_ENTITY + +
+           
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterBase
m_contentSeen, m_textSeen
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + + + + +
+Constructor Summary
StreamWriterBase(StreamWriterBase base, + java.lang.String[] uris) + +
+          Copy constructor.
StreamWriterBase(java.lang.String enc, + java.lang.String[] uris) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+          Close document output.
+ voidflush() + +
+          Flush document output.
+ voidindent() + +
+          Request output indent.
+ voidindent(int bias) + +
+          Request output indent.
+protected  voidmakeSpace(int length) + +
+          Make at least the requested number of bytes available in the output + buffer.
+ voidpopExtensionNamespaces() + +
+          Remove extension namespace URIs.
+ voidpushExtensionNamespaces(java.lang.String[] uris) + +
+          Append extension namespace URIs to those in mapping.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidsetIndentSpaces(int count, + java.lang.String newline, + char indent) + +
+          Set nesting indentation.
+ voidsetOutput(java.io.OutputStream outs) + +
+          Set output stream.
+protected  voidundefineNamespace(int index) + +
+          Report that namespace has been undefined.
+protected  intwriteEntity(byte[] bytes, + int offset) + +
+          Write entity bytes to output.
+protected  voidwritePrefix(int index) + +
+          Write namespace prefix to output.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterBase
addAttribute, closeEmptyTag, closeStartTag, createChildWriter, endTag, startTagClosed, startTagNamespaces, startTagOpen, writeAttributeText, writeComment, writeDocType, writeEntityRef, writeMarkup, writeMarkup, writePI, writeXMLDecl
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, defineNamespace, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, shrinkArray
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.runtime.IXMLWriter
writeCData, writeTextContent
+  +

+ + + + + + + + +
+Field Detail
+ +

+QUOT_ENTITY

+
+protected static final byte[] QUOT_ENTITY
+
+
+
+
+
+ +

+AMP_ENTITY

+
+protected static final byte[] AMP_ENTITY
+
+
+
+
+
+ +

+GT_ENTITY

+
+protected static final byte[] GT_ENTITY
+
+
+
+
+
+ +

+LT_ENTITY

+
+protected static final byte[] LT_ENTITY
+
+
+
+
+
+ +

+LT_CDATASTART

+
+protected static final byte[] LT_CDATASTART
+
+
+
+
+
+ +

+LT_CDATAEND

+
+protected static final byte[] LT_CDATAEND
+
+
+
+
+
+ +

+INITIAL_BUFFER_SIZE

+
+private static final int INITIAL_BUFFER_SIZE
+
+
Default output buffer size. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_encodingName

+
+private final java.lang.String m_encodingName
+
+
Name of encoding used for stream. +

+

+
+
+
+ +

+m_stream

+
+private java.io.OutputStream m_stream
+
+
Stream for text output. +

+

+
+
+
+ +

+m_buffer

+
+protected byte[] m_buffer
+
+
Buffer for accumulating output bytes. +

+

+
+
+
+ +

+m_fillOffset

+
+protected int m_fillOffset
+
+
Current offset in filling buffer. +

+

+
+
+
+ +

+m_prefixBytes

+
+protected byte[][] m_prefixBytes
+
+
Byte sequences for prefixes of namespaces in scope. +

+

+
+
+
+ +

+m_extensionBytes

+
+protected byte[][][] m_extensionBytes
+
+
Byte sequences for prefixes of extension namespaces in scope. +

+

+
+
+
+ +

+m_indent

+
+private boolean m_indent
+
+
Indent tags for pretty-printed text. +

+

+
+
+
+ +

+m_indentBase

+
+private int m_indentBase
+
+
Base number of characters in indent sequence (end of line only). +

+

+
+
+
+ +

+m_indentPerLevel

+
+private int m_indentPerLevel
+
+
Number of extra characters in indent sequence per level of nesting. +

+

+
+
+
+ +

+m_indentSequence

+
+private byte[] m_indentSequence
+
+
Raw text for indentation sequences. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+StreamWriterBase

+
+public StreamWriterBase(java.lang.String enc,
+                        java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
enc - character encoding used for output to streams
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+
+ +

+StreamWriterBase

+
+public StreamWriterBase(StreamWriterBase base,
+                        java.lang.String[] uris)
+
+
Copy constructor. This takes the stream and encoding information from a + supplied instance, while setting a new array of namespace URIs. It's + intended for use when invoking one binding from within another binding. +

+

+
Parameters:
base - instance to be used as base for writer
uris - ordered array of URIs for namespaces used in document + (see StreamWriterBase(String, String[]))
+
+ + + + + + + + +
+Method Detail
+ +

+setOutput

+
+public void setOutput(java.io.OutputStream outs)
+
+
Set output stream. If an output stream is currently open when this is + called the existing stream is flushed and closed, with any errors + ignored. +

+

+
Parameters:
outs - stream for document data output
+
+
+
+ +

+setIndentSpaces

+
+public void setIndentSpaces(int count,
+                            java.lang.String newline,
+                            char indent)
+
+
Set nesting indentation. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+makeSpace

+
+protected void makeSpace(int length)
+                  throws java.io.IOException
+
+
Make at least the requested number of bytes available in the output + buffer. If necessary, the output buffer will be replaced by a larger + buffer. +

+

+
Parameters:
length - number of bytes space to be made available +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+undefineNamespace

+
+protected void undefineNamespace(int index)
+
+
Report that namespace has been undefined. +

+

+
Specified by:
undefineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
+
+
+
+ +

+writePrefix

+
+protected void writePrefix(int index)
+                    throws java.io.IOException
+
+
Write namespace prefix to output. This internal method is used to throw + an exception when an undeclared prefix is used. +

+

+
Specified by:
writePrefix in class XMLWriterBase
+
+
+
Parameters:
index - namespace URI index number +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeEntity

+
+protected int writeEntity(byte[] bytes,
+                          int offset)
+
+
Write entity bytes to output. +

+

+
Parameters:
bytes - actual bytes to be written
offset - starting offset in buffer +
Returns:
offset for next data byte in buffer
+
+
+
+ +

+pushExtensionNamespaces

+
+public void pushExtensionNamespaces(java.lang.String[] uris)
+
+
Append extension namespace URIs to those in mapping. +

+

+
Specified by:
pushExtensionNamespaces in interface IXMLWriter
Overrides:
pushExtensionNamespaces in class XMLWriterNamespaceBase
+
+
+
Parameters:
uris - namespace URIs to extend those in mapping
+
+
+
+ +

+popExtensionNamespaces

+
+public void popExtensionNamespaces()
+
+
Remove extension namespace URIs. This removes the last set of + extension namespaces pushed using pushExtensionNamespaces(java.lang.String[]). +

+

+
Specified by:
popExtensionNamespaces in interface IXMLWriter
Overrides:
popExtensionNamespaces in class XMLWriterNamespaceBase
+
+
+
+
+
+
+ +

+indent

+
+public void indent(int bias)
+            throws java.io.IOException
+
+
Request output indent. Output the line end sequence followed by the + appropriate number of indent characters. +

+

+
Specified by:
indent in class XMLWriterBase
+
+
+
Parameters:
bias - indent depth difference (positive or negative) from current + element nesting depth +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+indent

+
+public void indent()
+            throws java.io.IOException
+
+
Request output indent. Output the line end sequence followed by the + appropriate number of indent characters for the current nesting level. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+flush

+
+public void flush()
+           throws java.io.IOException
+
+
Flush document output. Forces out all output generated to this point. +

+

+
Specified by:
flush in interface IXMLWriter
Specified by:
flush in class XMLWriterBase
+
+
+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
Close document output. Completes writing of document output, including + closing the output medium. +

+

+
Specified by:
close in interface IXMLWriter
Specified by:
close in class XMLWriterBase
+
+
+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset to initial state for reuse. This override of the base class + method handles clearing the internal buffer when starting a new + document. +

+

+
Specified by:
reset in interface IXMLWriter
Overrides:
reset in class XMLWriterBase
+
+
+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/GenericXMLWriter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/GenericXMLWriter.html @@ -0,0 +1,849 @@ + + + + + + +GenericXMLWriter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class GenericXMLWriter

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.runtime.impl.XMLWriterBase
+          extended by org.jibx.runtime.impl.GenericXMLWriter
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
+
public class GenericXMLWriter
extends XMLWriterBase
+ + +

+Generic handler for marshalling text document to a writer. This is the + most general output handler since it can be used with any character encoding + and and output writer. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private  ICharacterEscaperm_escaper + +
+          Escaper for character data content output.
+private  booleanm_indent + +
+          Indent tags for pretty-printed text.
+private  intm_indentBase + +
+          Base number of characters in indent sequence (end of line only).
+private  intm_indentPerLevel + +
+          Number of extra characters in indent sequence per level of nesting.
+private  char[]m_indentSequence + +
+          Raw text for indentation sequences.
+private  java.io.Writerm_writer + +
+          Writer for text output.
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterBase
m_contentSeen, m_textSeen
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + + + + +
+Constructor Summary
GenericXMLWriter(GenericXMLWriter base, + java.lang.String[] uris) + +
+          Copy constructor.
GenericXMLWriter(java.lang.String[] uris) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+          Close document output.
+ IXMLWritercreateChildWriter(java.lang.String[] uris) + +
+          Create a child writer instance to be used for a separate binding.
+protected  voiddefineNamespace(int index, + java.lang.String prefix) + +
+          Report that namespace has been defined.
+ voidflush() + +
+          Flush document output.
+ voidindent() + +
+          Request output indent.
+ voidindent(int bias) + +
+          Request output indent.
+ voidsetIndentSpaces(int count, + java.lang.String newline, + char indent) + +
+          Set nesting indentation.
+ voidsetOutput(java.io.Writer outw, + ICharacterEscaper escaper) + +
+          Set output writer and escaper.
+protected  voidundefineNamespace(int index) + +
+          Report that namespace has been undefined.
+protected  voidwriteAttributeText(java.lang.String text) + +
+          Write attribute text to output.
+ voidwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+protected  voidwriteMarkup(char chr) + +
+          Write markup character to output.
+protected  voidwriteMarkup(java.lang.String text) + +
+          Write markup text to output.
+protected  voidwritePrefix(int index) + +
+          Write namespace prefix to output.
+ voidwriteTextContent(java.lang.String text) + +
+          Write ordinary character data text content to document.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterBase
addAttribute, closeEmptyTag, closeStartTag, endTag, reset, startTagClosed, startTagNamespaces, startTagOpen, writeComment, writeDocType, writeEntityRef, writePI, writeXMLDecl
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, popExtensionNamespaces, pushExtensionNamespaces, shrinkArray
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_writer

+
+private java.io.Writer m_writer
+
+
Writer for text output. +

+

+
+
+
+ +

+m_escaper

+
+private ICharacterEscaper m_escaper
+
+
Escaper for character data content output. +

+

+
+
+
+ +

+m_indent

+
+private boolean m_indent
+
+
Indent tags for pretty-printed text. +

+

+
+
+
+ +

+m_indentBase

+
+private int m_indentBase
+
+
Base number of characters in indent sequence (end of line only). +

+

+
+
+
+ +

+m_indentPerLevel

+
+private int m_indentPerLevel
+
+
Number of extra characters in indent sequence per level of nesting. +

+

+
+
+
+ +

+m_indentSequence

+
+private char[] m_indentSequence
+
+
Raw text for indentation sequences. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+GenericXMLWriter

+
+public GenericXMLWriter(java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+
+ +

+GenericXMLWriter

+
+public GenericXMLWriter(GenericXMLWriter base,
+                        java.lang.String[] uris)
+
+
Copy constructor. This takes the writer from a supplied instance, while + setting a new array of namespace URIs. It's intended for use when + invoking one binding from within another binding. +

+

+
Parameters:
base - instance to be used as base for writer
uris - ordered array of URIs for namespaces used in document + (see GenericXMLWriter(String[]))
+
+ + + + + + + + +
+Method Detail
+ +

+setOutput

+
+public void setOutput(java.io.Writer outw,
+                      ICharacterEscaper escaper)
+
+
Set output writer and escaper. If an output writer is currently open when + this is called the existing writer is flushed and closed, with any + errors ignored. +

+

+
Parameters:
outw - writer for document data output
escaper - character escaper for chosen encoding
+
+
+
+ +

+setIndentSpaces

+
+public void setIndentSpaces(int count,
+                            java.lang.String newline,
+                            char indent)
+
+
Set nesting indentation. This is advisory only, and implementations of + this interface are free to ignore it. The intent is to indicate that the + generated output should use indenting to illustrate element nesting. +

+

+
Parameters:
count - number of character to indent per level, or disable + indentation if negative (zero means new line only)
newline - sequence of characters used for a line ending + (null means use the single character '\n')
indent - whitespace character used for indentation
+
+
+
+ +

+writeMarkup

+
+protected void writeMarkup(java.lang.String text)
+                    throws java.io.IOException
+
+
Write markup text to output. Markup text can be written directly to the + output without the need for any escaping. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
text - markup text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeMarkup

+
+protected void writeMarkup(char chr)
+                    throws java.io.IOException
+
+
Write markup character to output. Markup text can be written directly to + the output without the need for any escaping. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
chr - markup character to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+defineNamespace

+
+protected void defineNamespace(int index,
+                               java.lang.String prefix)
+
+
Report that namespace has been defined. +

+

+
Specified by:
defineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
prefix - prefix used for namespace
+
+
+
+ +

+undefineNamespace

+
+protected void undefineNamespace(int index)
+
+
Report that namespace has been undefined. +

+

+
Specified by:
undefineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
+
+
+
+ +

+writePrefix

+
+protected void writePrefix(int index)
+                    throws java.io.IOException
+
+
Write namespace prefix to output. This internal method is used to throw + an exception when an undeclared prefix is used. +

+

+
Specified by:
writePrefix in class XMLWriterBase
+
+
+
Parameters:
index - namespace URI index number +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeAttributeText

+
+protected void writeAttributeText(java.lang.String text)
+                           throws java.io.IOException
+
+
Write attribute text to output. This needs to write the text with any + appropriate escaping. +

+

+
Specified by:
writeAttributeText in class XMLWriterBase
+
+
+
Parameters:
text - attribute value text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeTextContent

+
+public void writeTextContent(java.lang.String text)
+                      throws java.io.IOException
+
+
Write ordinary character data text content to document. This needs to + write the text with any appropriate escaping. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text)
+                throws java.io.IOException
+
+
Write CDATA text to document. This needs to write the text with any + appropriate escaping. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+indent

+
+public void indent(int bias)
+            throws java.io.IOException
+
+
Request output indent. Output the line end sequence followed by the + appropriate number of indent characters. +

+

+
Specified by:
indent in class XMLWriterBase
+
+
+
Parameters:
bias - indent depth difference (positive or negative) from current + element nesting depth +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+indent

+
+public void indent()
+            throws java.io.IOException
+
+
Request output indent. Output the line end sequence followed by the + appropriate number of indent characters for the current nesting level. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+flush

+
+public void flush()
+           throws java.io.IOException
+
+
Flush document output. Forces out all output generated to this point. +

+

+
Specified by:
flush in interface IXMLWriter
Specified by:
flush in class XMLWriterBase
+
+
+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
Close document output. Completes writing of document output, including + closing the output medium. +

+

+
Specified by:
close in interface IXMLWriter
Specified by:
close in class XMLWriterBase
+
+
+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+createChildWriter

+
+public IXMLWriter createChildWriter(java.lang.String[] uris)
+
+
Create a child writer instance to be used for a separate binding. The + child writer inherits the stream and encoding from this writer, while + using the supplied namespace URIs. +

+

+
Specified by:
createChildWriter in class XMLWriterBase
+
+
+
Parameters:
uris - ordered array of URIs for namespaces used in document + (see GenericXMLWriter(String[])) +
Returns:
child writer
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/ISO88591Escaper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/ISO88591Escaper.html @@ -0,0 +1,397 @@ + + + + + + +ISO88591Escaper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class ISO88591Escaper

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.ISO88591Escaper
+
+
+
All Implemented Interfaces:
ICharacterEscaper
+
+
+
+
public class ISO88591Escaper
extends java.lang.Object
implements ICharacterEscaper
+ + +

+Handler for writing ASCII output stream. This code is specifically for XML + 1.0 and would require changes for XML 1.1 (to handle the added legal + characters, rather than throwing an exception). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private static ISO88591Escapers_instance + +
+          Singleton instance of class.
+  + + + + + + + + + + + +
+Constructor Summary
+private ISO88591Escaper() + +
+          Private constructor to prevent external creation.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static ICharacterEscapergetInstance() + +
+          Get instance of escaper.
+ voidwriteAttribute(java.lang.String text, + java.io.Writer writer) + +
+          Write attribute value with character entity substitutions.
+ voidwriteCData(java.lang.String text, + java.io.Writer writer) + +
+          Write CDATA to document.
+ voidwriteContent(java.lang.String text, + java.io.Writer writer) + +
+          Write content value with character entity substitutions.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_instance

+
+private static final ISO88591Escaper s_instance
+
+
Singleton instance of class. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ISO88591Escaper

+
+private ISO88591Escaper()
+
+
Private constructor to prevent external creation. +

+

+ + + + + + + + +
+Method Detail
+ +

+writeAttribute

+
+public void writeAttribute(java.lang.String text,
+                           java.io.Writer writer)
+                    throws java.io.IOException
+
+
Write attribute value with character entity substitutions. This assumes + that attributes use the regular quote ('"') delimitor. +

+

+
Specified by:
writeAttribute in interface ICharacterEscaper
+
+
+
Parameters:
text - attribute value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeContent

+
+public void writeContent(java.lang.String text,
+                         java.io.Writer writer)
+                  throws java.io.IOException
+
+
Write content value with character entity substitutions. +

+

+
Specified by:
writeContent in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text,
+                       java.io.Writer writer)
+                throws java.io.IOException
+
+
Write CDATA to document. This writes the beginning and ending sequences + for a CDATA section as well as the actual text, verifying that only + characters allowed by the encoding are included in the text. +

+

+
Specified by:
writeCData in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+getInstance

+
+public static ICharacterEscaper getInstance()
+
+
Get instance of escaper. +

+

+
+
+
+ +
Returns:
escaper instance
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/XMLWriterNamespaceBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/XMLWriterNamespaceBase.html @@ -0,0 +1,961 @@ + + + + + + +XMLWriterNamespaceBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class XMLWriterNamespaceBase

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
Direct Known Subclasses:
JDOMWriter, XMLWriterBase
+
+
+
+
public abstract class XMLWriterNamespaceBase
extends java.lang.Object
implements IXMLWriter
+ + +

+Base implementation of XML writer interface namespace handling. This tracks + only the namespace declarations and the element nesting depth. It can be used + as a base class for all forms of output. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Nested Class Summary
+private static classXMLWriterNamespaceBase.DeclarationInfo + +
+          Namespace declaration tracking information.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static int[]EMPTY_INT_ARRAY + +
+          Empty array for default return.
+private  java.lang.String[][]m_extensionPrefixes + +
+          Extension namespace prefixes (null if not in use).
+private  java.lang.String[][]m_extensionUris + +
+          Extension namespace URIs (null if not in use).
+private  intm_namespaceDepth + +
+          Depth of top namespace declaration level.
+private  java.util.Stackm_namespaceStack + +
+          Stack of information for namespace declarations.
+private  intm_nestingDepth + +
+          Depth of nested tags.
+protected  java.lang.String[]m_prefixes + +
+          Prefixes currently defined for namespaces.
+protected  java.lang.String[]m_uris + +
+          URIs for namespaces.
+  + + + + + + + + + + +
+Constructor Summary
XMLWriterNamespaceBase(java.lang.String[] uris) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+private  voidcloseNamespaces() + +
+          Ends the current innermost set of nested namespace definitions.
+protected  voiddecrementNesting() + +
+          Decrement the current nesting depth.
+protected abstract  voiddefineNamespace(int index, + java.lang.String prefix) + +
+          Report to subclass that namespace has been defined.
+ java.lang.String[][]getExtensionNamespaces() + +
+          Get extension namespace URIs added to those in mapping.
+ intgetNamespaceCount() + +
+          Get the number of namespaces currently defined.
+ java.lang.StringgetNamespacePrefix(int index) + +
+          Get current prefix defined for namespace.
+ java.lang.String[]getNamespaces() + +
+          Get namespace URIs for mapping.
+ java.lang.StringgetNamespaceUri(int index) + +
+          Get URI for namespace.
+ intgetNestingDepth() + +
+          Get the current element nesting depth.
+ intgetPrefixIndex(java.lang.String prefix) + +
+          Get index of namespace mapped to prefix.
+protected static java.lang.String[][]growArray(java.lang.String[][] base, + java.lang.String[] items) + +
+          Grow array of array of strings.
+protected  voidincrementNesting() + +
+          Increment the current nesting depth.
+ int[]openNamespaces(int[] nums, + java.lang.String[] prefs) + +
+          Open the specified namespaces.
+ voidpopExtensionNamespaces() + +
+          Remove extension namespace URIs.
+ voidpushExtensionNamespaces(java.lang.String[] uris) + +
+          Append extension namespace URIs to those in mapping.
+ voidreset() + +
+          Reset to initial state for reuse.
+private  voidsetNamespacePrefix(int index, + java.lang.String prefix) + +
+          Set prefix for namespace.
+protected static java.lang.String[][]shrinkArray(java.lang.String[][] base) + +
+          Shrink array of array of strings.
+protected abstract  voidundefineNamespace(int index) + +
+          Report to subclass that namespace has been undefined.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.runtime.IXMLWriter
addAttribute, close, closeEmptyTag, closeStartTag, endTag, flush, indent, setIndentSpaces, startTagClosed, startTagNamespaces, startTagOpen, writeCData, writeComment, writeDocType, writeEntityRef, writePI, writeTextContent, writeXMLDecl
+  +

+ + + + + + + + +
+Field Detail
+ +

+EMPTY_INT_ARRAY

+
+private static final int[] EMPTY_INT_ARRAY
+
+
Empty array for default return. +

+

+
+
+
+ +

+m_uris

+
+protected java.lang.String[] m_uris
+
+
URIs for namespaces. +

+

+
+
+
+ +

+m_prefixes

+
+protected java.lang.String[] m_prefixes
+
+
Prefixes currently defined for namespaces. +

+

+
+
+
+ +

+m_nestingDepth

+
+private int m_nestingDepth
+
+
Depth of nested tags. +

+

+
+
+
+ +

+m_namespaceStack

+
+private java.util.Stack m_namespaceStack
+
+
Stack of information for namespace declarations. +

+

+
+
+
+ +

+m_namespaceDepth

+
+private int m_namespaceDepth
+
+
Depth of top namespace declaration level. +

+

+
+
+
+ +

+m_extensionUris

+
+private java.lang.String[][] m_extensionUris
+
+
Extension namespace URIs (null if not in use). +

+

+
+
+
+ +

+m_extensionPrefixes

+
+private java.lang.String[][] m_extensionPrefixes
+
+
Extension namespace prefixes (null if not in use). +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+XMLWriterNamespaceBase

+
+public XMLWriterNamespaceBase(java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+ + + + + + + + +
+Method Detail
+ +

+defineNamespace

+
+protected abstract void defineNamespace(int index,
+                                        java.lang.String prefix)
+                                 throws java.io.IOException
+
+
Report to subclass that namespace has been defined. +

+

+
+
+
+
Parameters:
index - namespace URI index number
prefix - prefix used for namespace +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+undefineNamespace

+
+protected abstract void undefineNamespace(int index)
+
+
Report to subclass that namespace has been undefined. +

+

+
+
+
+
Parameters:
index - namespace URI index number
+
+
+
+ +

+setNamespacePrefix

+
+private void setNamespacePrefix(int index,
+                                java.lang.String prefix)
+
+
Set prefix for namespace. +

+

+
+
+
+
Parameters:
index - namespace URI index number
+
+
+
+ +

+openNamespaces

+
+public int[] openNamespaces(int[] nums,
+                            java.lang.String[] prefs)
+                     throws java.io.IOException
+
+
Open the specified namespaces. Previously active namespace declarations + are not duplicated. +

+

+
Specified by:
openNamespaces in interface IXMLWriter
+
+
+
Parameters:
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until end of element)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Returns:
array of indexes for namespaces not previously active (the ones + actually needing to be declared, in the case of text output) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeNamespaces

+
+private void closeNamespaces()
+
+
Ends the current innermost set of nested namespace definitions. Reverts + the namespaces involved to their previously-declared prefixes, and sets + up for ending the new innermost set. +

+

+
+
+
+
+
+
+
+ +

+getNestingDepth

+
+public final int getNestingDepth()
+
+
Get the current element nesting depth. Elements are only counted in the + depth returned when they're officially open - after the start tag has + been output and before the end tag has been output. +

+

+
Specified by:
getNestingDepth in interface IXMLWriter
+
+
+ +
Returns:
number of nested elements at current point in output
+
+
+
+ +

+getNamespaceCount

+
+public final int getNamespaceCount()
+
+
Get the number of namespaces currently defined. This is equivalent to the + index of the next extension namespace added. +

+

+
Specified by:
getNamespaceCount in interface IXMLWriter
+
+
+ +
Returns:
namespace count
+
+
+
+ +

+incrementNesting

+
+protected void incrementNesting()
+
+
Increment the current nesting depth. Subclasses need to call this method + whenever an element start tag is written. +

+

+
+
+
+
+
+
+
+ +

+decrementNesting

+
+protected void decrementNesting()
+
+
Decrement the current nesting depth. Subclasses need to call this method + whenever an element end tag is written. +

+

+
+
+
+
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset to initial state for reuse. Subclasses overriding this method need + to call this base class implementation during their processing. +

+

+
Specified by:
reset in interface IXMLWriter
+
+
+
+
+
+
+ +

+getNamespaces

+
+public final java.lang.String[] getNamespaces()
+
+
Get namespace URIs for mapping. This gets the full ordered array of + namespaces known in the binding used for this marshalling, where the + index number of each namespace URI is the namespace index used to lookup + the prefix when marshalling a name in that namespace. The returned array + must not be modified. +

+

+
Specified by:
getNamespaces in interface IXMLWriter
+
+
+ +
Returns:
array of namespaces
+
+
+
+ +

+getNamespaceUri

+
+public final java.lang.String getNamespaceUri(int index)
+
+
Get URI for namespace. +

+

+
Specified by:
getNamespaceUri in interface IXMLWriter
+
+
+
Parameters:
index - namespace URI index number +
Returns:
namespace URI text, or null if the namespace index + is invalid
+
+
+
+ +

+getNamespacePrefix

+
+public final java.lang.String getNamespacePrefix(int index)
+
+
Get current prefix defined for namespace. +

+

+
Specified by:
getNamespacePrefix in interface IXMLWriter
+
+
+
Parameters:
index - namespace URI index number +
Returns:
current prefix text, or null if the namespace is not + currently mapped
+
+
+
+ +

+getPrefixIndex

+
+public final int getPrefixIndex(java.lang.String prefix)
+
+
Get index of namespace mapped to prefix. This can be an expensive + operation with time proportional to the number of namespaces defined, so + it should be used with care. +

+

+
Specified by:
getPrefixIndex in interface IXMLWriter
+
+
+
Parameters:
prefix - text to match (non-null, use "" for default + prefix) +
Returns:
index namespace URI index number mapped to prefix
+
+
+
+ +

+growArray

+
+protected static java.lang.String[][] growArray(java.lang.String[][] base,
+                                                java.lang.String[] items)
+
+
Grow array of array of strings. +

+

+
+
+
+
Parameters:
base - array to be grown (null is treated as zero + length)
items - array of strings to be added at end of base array +
Returns:
array with added array of items
+
+
+
+ +

+shrinkArray

+
+protected static java.lang.String[][] shrinkArray(java.lang.String[][] base)
+
+
Shrink array of array of strings. +

+

+
+
+
+
Parameters:
base - array to be shrunk +
Returns:
array with last set of items eliminated (null if + empty)
+
+
+
+ +

+pushExtensionNamespaces

+
+public void pushExtensionNamespaces(java.lang.String[] uris)
+
+
Append extension namespace URIs to those in mapping. +

+

+
Specified by:
pushExtensionNamespaces in interface IXMLWriter
+
+
+
Parameters:
uris - namespace URIs to extend those in mapping
+
+
+
+ +

+popExtensionNamespaces

+
+public void popExtensionNamespaces()
+
+
Remove extension namespace URIs. This removes the last set of + extension namespaces pushed using pushExtensionNamespaces(java.lang.String[]). +

+

+
Specified by:
popExtensionNamespaces in interface IXMLWriter
+
+
+
+
+
+
+ +

+getExtensionNamespaces

+
+public final java.lang.String[][] getExtensionNamespaces()
+
+
Get extension namespace URIs added to those in mapping. This gets the + current set of extension definitions. The returned arrays must not be + modified. +

+

+
Specified by:
getExtensionNamespaces in interface IXMLWriter
+
+
+ +
Returns:
array of arrays of extension namespaces (null if + none)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/StringIntHashMap.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/StringIntHashMap.html @@ -0,0 +1,888 @@ + + + + + + +StringIntHashMap (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class StringIntHashMap

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.StringIntHashMap
+
+
+
+
public class StringIntHashMap
extends java.lang.Object
+ + +

+Hash map using String values as keys mapped to primitive + int values. This implementation is unsynchronized in order to + provide the best possible performance for typical usage scenarios, so + explicit synchronization must be implemented by a wrapper class or directly + by the application in cases where instances are modified in a multithreaded + environment. The map implementation is not very efficient when resizing, but + works well when the size of the map is known in advance. +

+ +

+

+
Version:
+
1.1
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+protected static doubleDEFAULT_FILL + +
+          Default fill fraction allowed before growing table.
+static intDEFAULT_NOT_FOUND + +
+          Default value returned when key not found in table.
+protected  intm_arraySize + +
+          Size of array used for keys.
+protected  intm_entryCount + +
+          Number of entries present in table.
+protected  intm_entryLimit + +
+          Entries allowed before growing table.
+protected  doublem_fillFraction + +
+          Fill fraction allowed for this hash table.
+protected  intm_hitOffset + +
+          Offset added (modulo table size) to slot number on collision.
+protected  java.lang.String[]m_keyTable + +
+          Array of key table slots.
+protected  intm_notFoundValue + +
+          Value returned when key not found in table.
+protected  int[]m_valueTable + +
+          Array of value table slots.
+protected static intMINIMUM_SIZE + +
+          Minimum size used for hash table.
+  + + + + + + + + + + + + + + + + + + + + + + +
+Constructor Summary
StringIntHashMap() + +
+          Default constructor.
StringIntHashMap(int count) + +
+          Constructor with only size supplied.
StringIntHashMap(int count, + double fill) + +
+          Constructor with size and fill fraction specified.
StringIntHashMap(int count, + double fill, + int miss) + +
+          Constructor with full specification.
StringIntHashMap(StringIntHashMap base) + +
+          Copy (clone) constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intadd(java.lang.String key, + int value) + +
+          Add an entry to the table.
+private  intassignSlot(java.lang.String key, + int value) + +
+          Assign slot for entry.
+ java.lang.Objectclone() + +
+          Construct a copy of the table.
+ booleancontainsKey(java.lang.String key) + +
+          Check if an entry is present in the table.
+private  intfreeSlot(int slot) + +
+          Find free slot number for entry.
+ intget(java.lang.String key) + +
+          Find an entry in the table.
+protected  voidinternalRemove(int slot) + +
+          Internal remove pair from the table.
+private  booleanreinsert(int slot) + +
+          Reinsert an entry into the hash map.
+ intremove(java.lang.String key) + +
+          Remove an entry from the table.
+private  voidrestructure(java.lang.String[] keys, + int[] values) + +
+          Restructure the table.
+private  intstandardFind(java.lang.Object key) + +
+          Standard find key in table.
+private  intstandardSlot(java.lang.Object key) + +
+          Standard base slot computation for a key.
+private  intstepSlot(int slot) + +
+          Step the slot number for an entry.
+ + + + + + + +
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+DEFAULT_NOT_FOUND

+
+public static final int DEFAULT_NOT_FOUND
+
+
Default value returned when key not found in table. +

+

+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_FILL

+
+protected static final double DEFAULT_FILL
+
+
Default fill fraction allowed before growing table. +

+

+
See Also:
Constant Field Values
+
+
+ +

+MINIMUM_SIZE

+
+protected static final int MINIMUM_SIZE
+
+
Minimum size used for hash table. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_fillFraction

+
+protected final double m_fillFraction
+
+
Fill fraction allowed for this hash table. +

+

+
+
+
+ +

+m_entryCount

+
+protected int m_entryCount
+
+
Number of entries present in table. +

+

+
+
+
+ +

+m_entryLimit

+
+protected int m_entryLimit
+
+
Entries allowed before growing table. +

+

+
+
+
+ +

+m_arraySize

+
+protected int m_arraySize
+
+
Size of array used for keys. +

+

+
+
+
+ +

+m_hitOffset

+
+protected int m_hitOffset
+
+
Offset added (modulo table size) to slot number on collision. +

+

+
+
+
+ +

+m_keyTable

+
+protected java.lang.String[] m_keyTable
+
+
Array of key table slots. +

+

+
+
+
+ +

+m_valueTable

+
+protected int[] m_valueTable
+
+
Array of value table slots. +

+

+
+
+
+ +

+m_notFoundValue

+
+protected int m_notFoundValue
+
+
Value returned when key not found in table. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+StringIntHashMap

+
+public StringIntHashMap(int count,
+                        double fill,
+                        int miss)
+
+
Constructor with full specification. +

+

+
Parameters:
count - number of values to assume in initial sizing of table
fill - fraction full allowed for table before growing
miss - value returned when key not found in table
+
+
+ +

+StringIntHashMap

+
+public StringIntHashMap(int count,
+                        double fill)
+
+
Constructor with size and fill fraction specified. Uses default hash + technique and value returned when key not found in table. +

+

+
Parameters:
count - number of values to assume in initial sizing of table
fill - fraction full allowed for table before growing
+
+
+ +

+StringIntHashMap

+
+public StringIntHashMap(int count)
+
+
Constructor with only size supplied. Uses default hash technique and + values for fill fraction and value returned when key not found in table. +

+

+
Parameters:
count - number of values to assume in initial sizing of table
+
+
+ +

+StringIntHashMap

+
+public StringIntHashMap()
+
+
Default constructor. +

+

+
+ +

+StringIntHashMap

+
+public StringIntHashMap(StringIntHashMap base)
+
+
Copy (clone) constructor. +

+

+
Parameters:
base - instance being copied
+
+ + + + + + + + +
+Method Detail
+ +

+stepSlot

+
+private final int stepSlot(int slot)
+
+
Step the slot number for an entry. Adds the collision offset (modulo + the table size) to the slot number. +

+

+
Parameters:
slot - slot number to be stepped +
Returns:
stepped slot number
+
+
+
+ +

+freeSlot

+
+private final int freeSlot(int slot)
+
+
Find free slot number for entry. Starts at the slot based directly + on the hashed key value. If this slot is already occupied, it adds + the collision offset (modulo the table size) to the slot number and + checks that slot, repeating until an unused slot is found. +

+

+
Parameters:
slot - initial slot computed from key +
Returns:
slot at which entry was added
+
+
+
+ +

+standardSlot

+
+private final int standardSlot(java.lang.Object key)
+
+
Standard base slot computation for a key. +

+

+
Parameters:
key - key value to be computed +
Returns:
base slot for key
+
+
+
+ +

+standardFind

+
+private int standardFind(java.lang.Object key)
+
+
Standard find key in table. This method may be used directly for key + lookup using either the hashCode() method defined for the + key objects or the System.identityHashCode() method, and + either the equals() method defined for the key objects or + the == operator, as selected by the hash technique + constructor parameter. To implement a hash class based on some other + methods of hashing and/or equality testing, define a separate method in + the subclass with a different name and use that method instead. This + avoids the overhead caused by overrides of a very heavily used method. +

+

+
Parameters:
key - to be found in table +
Returns:
index of matching key, or -index-1 of slot to be + used for inserting key in table if not already present (always negative)
+
+
+
+ +

+reinsert

+
+private boolean reinsert(int slot)
+
+
Reinsert an entry into the hash map. This is used when the table is being + directly modified, and does not adjust the count present or check the + table capacity. +

+

+
Parameters:
slot - position of entry to be reinserted into hash map +
Returns:
true if the slot number used by the entry has has + changed, false if not
+
+
+
+ +

+internalRemove

+
+protected void internalRemove(int slot)
+
+
Internal remove pair from the table. Removes the pair from the table + by setting the key entry to null and adjusting the count + present, then chains through the table to reinsert any other pairs + which may have collided with the removed pair. If the associated value + is an object reference, it should be set to null before + this method is called. +

+

+
Parameters:
slot - index number of pair to be removed
+
+
+
+ +

+restructure

+
+private void restructure(java.lang.String[] keys,
+                         int[] values)
+
+
Restructure the table. This is used when the table is increasing or + decreasing in size, and works directly with the old table representation + arrays. It inserts pairs from the old arrays directly into the table + without adjusting the count present or checking the table size. +

+

+
Parameters:
keys - array of keys
values - array of values
+
+
+
+ +

+assignSlot

+
+private int assignSlot(java.lang.String key,
+                       int value)
+
+
Assign slot for entry. Starts at the slot found by the hashed key value. + If this slot is already occupied, it steps the slot number and checks the + resulting slot, repeating until an unused slot is found. This method does + not check for duplicate keys, so it should only be used for internal + reordering of the tables. +

+

+
Parameters:
key - to be added to table
value - associated value for key +
Returns:
slot at which entry was added
+
+
+
+ +

+add

+
+public int add(java.lang.String key,
+               int value)
+
+
Add an entry to the table. If the key is already present in the table, + this replaces the existing value associated with the key. +

+

+
Parameters:
key - key to be added to table (non- null)
value - associated value for key +
Returns:
value previously associated with key, or reserved not found value + if key not previously present in table
+
+
+
+ +

+containsKey

+
+public final boolean containsKey(java.lang.String key)
+
+
Check if an entry is present in the table. This method is supplied to + support the use of values matching the reserved not found value. +

+

+
Parameters:
key - key for entry to be found +
Returns:
true if key found in table, false + if not
+
+
+
+ +

+get

+
+public final int get(java.lang.String key)
+
+
Find an entry in the table. +

+

+
Parameters:
key - key for entry to be returned +
Returns:
value for key, or reserved not found value if key not found
+
+
+
+ +

+remove

+
+public int remove(java.lang.String key)
+
+
Remove an entry from the table. If multiple entries are present with the + same key value, only the first one found will be removed. +

+

+
Parameters:
key - key to be removed from table +
Returns:
value associated with removed key, or reserved not found value if + key not found in table
+
+
+
+ +

+clone

+
+public java.lang.Object clone()
+
+
Construct a copy of the table. +

+

+
Overrides:
clone in class java.lang.Object
+
+
+ +
Returns:
shallow copy of table
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStreamUTF8Reader.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStreamUTF8Reader.html @@ -0,0 +1,396 @@ + + + + + + +InputStreamWrapper.WrappedStreamUTF8Reader (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class InputStreamWrapper.WrappedStreamUTF8Reader

+
+java.lang.Object
+  extended by java.io.Reader
+      extended by org.jibx.runtime.impl.InputStreamWrapper.WrappedStreamUTF8Reader
+
+
+
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable
+
+
+
Enclosing class:
InputStreamWrapper
+
+
+
+
private class InputStreamWrapper.WrappedStreamUTF8Reader
extends java.io.Reader
+ + +

+Reader for input stream using UTF-8 encoding. This uses the enclosing + class to buffer input from the stream, interpreting it as characters on + demand. +

+ +

+


+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class java.io.Reader
lock
+  + + + + + + + + + + + +
+Constructor Summary
+private InputStreamWrapper.WrappedStreamUTF8Reader() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+           
+ intread() + +
+           
+ intread(char[] b) + +
+           
+ intread(char[] b, + int off, + int len) + +
+           
+ booleanready() + +
+           
+ + + + + + + +
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+InputStreamWrapper.WrappedStreamUTF8Reader

+
+private InputStreamWrapper.WrappedStreamUTF8Reader()
+
+
+ + + + + + + + +
+Method Detail
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
+
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(char[] b,
+                int off,
+                int len)
+         throws java.io.IOException
+
+
+
Specified by:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(char[] b)
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read()
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+ready

+
+public boolean ready()
+              throws java.io.IOException
+
+
+
Overrides:
ready in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/BackFillArray.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/BackFillArray.html @@ -0,0 +1,330 @@ + + + + + + +BackFillArray (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class BackFillArray

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.BackFillArray
+
+
+
All Implemented Interfaces:
BackFillReference
+
+
+
+
public class BackFillArray
extends java.lang.Object
implements BackFillReference
+ + +

+Backfill reference item, used for filling in forward references as + members of arrays. Each item holds both the array containing the + reference and the offset in the array. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.Object[]m_array + +
+          Array containing reference.
+private  intm_index + +
+          Reference offset within array.
+  + + + + + + + + + + +
+Constructor Summary
BackFillArray(int index, + java.lang.Object[] array) + +
+          Constructor.
+  + + + + + + + + + + + +
+Method Summary
+ voidbackfill(java.lang.Object obj) + +
+          Define referenced object.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_array

+
+private java.lang.Object[] m_array
+
+
Array containing reference. +

+

+
+
+
+ +

+m_index

+
+private int m_index
+
+
Reference offset within array. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BackFillArray

+
+public BackFillArray(int index,
+                     java.lang.Object[] array)
+
+
Constructor. Saves the information for filling the reference + once the associated object is defined. +

+

+
Parameters:
index - reference offset within array
array - array containing the reference
+
+ + + + + + + + +
+Method Detail
+ +

+backfill

+
+public void backfill(java.lang.Object obj)
+
+
Define referenced object. This method is called by the framework + when the forward-referenced item is defined. +

+

+
Specified by:
backfill in interface BackFillReference
+
+
+
Parameters:
obj - referenced object
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/BackFillHolder.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/BackFillHolder.html @@ -0,0 +1,366 @@ + + + + + + +BackFillHolder (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class BackFillHolder

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.BackFillHolder
+
+
+
+
public class BackFillHolder
extends java.lang.Object
+ + +

+Holder used to collect forward references to a particular object. The + references are processed when the object is defined. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+private  java.lang.Stringm_class + +
+          Expected class name of tracked object.
+private  java.util.ArrayListm_list + +
+          List of references to this object.
+  + + + + + + + + + + +
+Constructor Summary
BackFillHolder(java.lang.String name) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddBackFill(BackFillReference ref) + +
+          Add forward reference to tracked object.
+ voiddefineValue(java.lang.Object obj) + +
+          Define referenced object.
+ java.lang.StringgetExpectedClass() + +
+          Get expected class name of referenced object.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_class

+
+private java.lang.String m_class
+
+
Expected class name of tracked object. +

+

+
+
+
+ +

+m_list

+
+private java.util.ArrayList m_list
+
+
List of references to this object. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+BackFillHolder

+
+public BackFillHolder(java.lang.String name)
+
+
Constructor. Just creates the backing list. +

+

+
Parameters:
name - expected class name of tracked object
+
+ + + + + + + + +
+Method Detail
+ +

+addBackFill

+
+public void addBackFill(BackFillReference ref)
+
+
Add forward reference to tracked object. This method is called by + the framework when a reference item is created for the object + associated with this holder. +

+

+
Parameters:
ref - backfill reference item
+
+
+
+ +

+defineValue

+
+public void defineValue(java.lang.Object obj)
+
+
Define referenced object. This method is called by the framework + when the forward-referenced object is defined, and in turn calls each + reference to fill in the reference. +

+

+
Parameters:
obj - referenced object
+
+
+
+ +

+getExpectedClass

+
+public java.lang.String getExpectedClass()
+
+
Get expected class name of referenced object. +

+

+ +
Returns:
expected class name of referenced object
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/ITrackSourceImpl.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/ITrackSourceImpl.html @@ -0,0 +1,233 @@ + + + + + + +ITrackSourceImpl (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Interface ITrackSourceImpl

+
+
All Superinterfaces:
ITrackSource
+
+
+
+
public interface ITrackSourceImpl
extends ITrackSource
+ + +

+Unmarshalling source tracking implementation interface. This interface is + added to bound classes when requested by the binding definition. It defines + the method used by JiBX to add unmarshal source tracking information to an + instance of a bound class. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidjibx_setSource(java.lang.String name, + int line, + int column) + +
+          Set source document information.
+ + + + + + + +
Methods inherited from interface org.jibx.runtime.ITrackSource
jibx_getColumnNumber, jibx_getDocumentName, jibx_getLineNumber
+  +

+ + + + + + + + +
+Method Detail
+ +

+jibx_setSource

+
+void jibx_setSource(java.lang.String name,
+                    int line,
+                    int column)
+
+
Set source document information. +

+

+
+
+
+
Parameters:
name - of source document, or null if none
line - source document line number, or -1 if unknown
column - source document column position, or -1 if + unknown
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/USASCIIEscaper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/USASCIIEscaper.html @@ -0,0 +1,397 @@ + + + + + + +USASCIIEscaper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class USASCIIEscaper

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.USASCIIEscaper
+
+
+
All Implemented Interfaces:
ICharacterEscaper
+
+
+
+
public class USASCIIEscaper
extends java.lang.Object
implements ICharacterEscaper
+ + +

+Handler for writing ASCII output stream. This code is specifically for XML + 1.0 and would require changes for XML 1.1 (to handle the added legal + characters, rather than throwing an exception). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private static USASCIIEscapers_instance + +
+          Singleton instance of class.
+  + + + + + + + + + + + +
+Constructor Summary
+private USASCIIEscaper() + +
+          Private constructor to prevent external creation.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static ICharacterEscapergetInstance() + +
+          Get instance of escaper.
+ voidwriteAttribute(java.lang.String text, + java.io.Writer writer) + +
+          Write attribute value with character entity substitutions.
+ voidwriteCData(java.lang.String text, + java.io.Writer writer) + +
+          Write CDATA to document.
+ voidwriteContent(java.lang.String text, + java.io.Writer writer) + +
+          Write content value with character entity substitutions.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_instance

+
+private static final USASCIIEscaper s_instance
+
+
Singleton instance of class. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+USASCIIEscaper

+
+private USASCIIEscaper()
+
+
Private constructor to prevent external creation. +

+

+ + + + + + + + +
+Method Detail
+ +

+writeAttribute

+
+public void writeAttribute(java.lang.String text,
+                           java.io.Writer writer)
+                    throws java.io.IOException
+
+
Write attribute value with character entity substitutions. This assumes + that attributes use the regular quote ('"') delimitor. +

+

+
Specified by:
writeAttribute in interface ICharacterEscaper
+
+
+
Parameters:
text - attribute value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeContent

+
+public void writeContent(java.lang.String text,
+                         java.io.Writer writer)
+                  throws java.io.IOException
+
+
Write content value with character entity substitutions. +

+

+
Specified by:
writeContent in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text,
+                       java.io.Writer writer)
+                throws java.io.IOException
+
+
Write CDATA to document. This writes the beginning and ending sequences + for a CDATA section as well as the actual text, verifying that only + characters allowed by the encoding are included in the text. +

+

+
Specified by:
writeCData in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+getInstance

+
+public static ICharacterEscaper getInstance()
+
+
Get instance of escaper. +

+

+
+
+
+ +
Returns:
escaper instance
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.html @@ -0,0 +1,766 @@ + + + + + + +InputStreamWrapper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class InputStreamWrapper

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.InputStreamWrapper
+
+
+
+
public class InputStreamWrapper
extends java.lang.Object
+ + +

+Wrapper for input stream that supports multiple character encodings. This is + needed because the XPP3 pull parser does not support detecting the character + encoding for a document based on the content of the document. If used with a + common encoding this performs the conversion to characters using an inner + reader class; otherwise, this creates the appropriate reader type +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + +
+Nested Class Summary
+private  classInputStreamWrapper.WrappedStream + +
+          Stream that just uses the enclosing class to buffer input from the + wrapped stream.
+private  classInputStreamWrapper.WrappedStreamISO88591Reader + +
+          Reader for input stream using ISO8859-1 encoding.
+private  classInputStreamWrapper.WrappedStreamUTF8Reader + +
+          Reader for input stream using UTF-8 encoding.
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+private static intBUFFER_SIZE + +
+          Default input buffer size.
+private  byte[]m_buffer + +
+          Buffer for input bytes.
+private  intm_emptyOffset + +
+          Current offset for generating character from buffer.
+private  java.lang.Stringm_encodingName + +
+          Name of encoding to be used for stream.
+private  intm_endOffset + +
+          Offset past end of bytes in buffer.
+private  booleanm_isEnd + +
+          Flag for end of stream reached.
+private  intm_scanOffset + +
+          Scan position offset used for lookahead in buffer.
+private  java.io.InputStreamm_stream + +
+          Stream for byte input.
+  + + + + + + + + + + +
+Constructor Summary
InputStreamWrapper() + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+          Close document input.
+private  booleanfillBuffer() + +
+          Reads data into the buffer.
+ java.lang.StringgetEncoding() + +
+          Get encoding for input document.
+ java.io.ReadergetReader() + +
+          Get reader for wrapped input stream.
+private  booleanisWhite(int chr) + +
+          Check if a character is XML whitespace.
+private  booleanrequire(int min) + +
+          Reads data into the buffer to at least a minimum number of bytes.
+ voidreset() + +
+          Reset to initial state for reuse.
+private  java.lang.StringscanQuoted() + +
+          Reads a quote delimited token from the scan position in the buffer.
+private  java.lang.StringscanToken() + +
+          Reads a space or equals ('=') delimited token from the scan position in + the buffer.
+ voidsetEncoding(java.lang.String enc) + +
+          Set encoding for stream.
+ voidsetInput(java.io.InputStream ins) + +
+          Set input stream with encoding to be defined later.
+ voidsetInput(java.io.InputStream ins, + java.lang.String enc) + +
+          Set input stream with specified encoding.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+BUFFER_SIZE

+
+private static final int BUFFER_SIZE
+
+
Default input buffer size. +

+

+
See Also:
Constant Field Values
+
+
+ +

+m_encodingName

+
+private java.lang.String m_encodingName
+
+
Name of encoding to be used for stream. +

+

+
+
+
+ +

+m_stream

+
+private java.io.InputStream m_stream
+
+
Stream for byte input. +

+

+
+
+
+ +

+m_isEnd

+
+private boolean m_isEnd
+
+
Flag for end of stream reached. +

+

+
+
+
+ +

+m_buffer

+
+private byte[] m_buffer
+
+
Buffer for input bytes. +

+

+
+
+
+ +

+m_endOffset

+
+private int m_endOffset
+
+
Offset past end of bytes in buffer. +

+

+
+
+
+ +

+m_emptyOffset

+
+private int m_emptyOffset
+
+
Current offset for generating character from buffer. +

+

+
+
+
+ +

+m_scanOffset

+
+private int m_scanOffset
+
+
Scan position offset used for lookahead in buffer. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+InputStreamWrapper

+
+public InputStreamWrapper()
+
+
Constructor. +

+

+ + + + + + + + +
+Method Detail
+ +

+setInput

+
+public void setInput(java.io.InputStream ins)
+
+
Set input stream with encoding to be defined later. If an input stream is + currently open when this is called the existing stream is closed, with + any errors ignored. +

+

+
Parameters:
ins - stream for document data input
+
+
+
+ +

+setInput

+
+public void setInput(java.io.InputStream ins,
+                     java.lang.String enc)
+              throws java.io.IOException
+
+
Set input stream with specified encoding. If an input stream is currently + open when this is called the existing stream is closed, with any errors + ignored. +

+

+
Parameters:
ins - stream for document data input
enc - character encoding used for input from stream + (null if to be determined from XML input) +
Throws: +
java.io.IOException
+
+
+
+ +

+setEncoding

+
+public void setEncoding(java.lang.String enc)
+                 throws java.io.IOException
+
+
Set encoding for stream. This call is only valid if the encoding has not + been set previously, and if the encoding is a recognized type. +

+

+
Parameters:
enc - character encoding used for input from stream + (null if to be determined from XML input) +
Throws: +
java.io.IOException - if unknown encoding, or encoding already set
+
+
+
+ +

+fillBuffer

+
+private boolean fillBuffer()
+                    throws java.io.IOException
+
+
Reads data into the buffer. Any retained data is first copied down to the + start of the buffer array. Next, data is read from the wrapped stream + into the available space in the buffer. The actual number of characters + read by a call to this method is normally between one and the space + available in the buffer array. +

+

+ +
Returns:
true if data has been read into buffer, + false if not +
Throws: +
java.io.IOException - on error reading from wrapped stream
+
+
+
+ +

+require

+
+private boolean require(int min)
+                 throws java.io.IOException
+
+
Reads data into the buffer to at least a minimum number of bytes. Any + retained data is first copied down to the start of the buffer array. + Next, data is read from the wrapped stream into the available space in + the buffer until the end of the input stream is reached or at least the + requested number of bytes are present in the buffer. +

+

+
Parameters:
min - number of bytes required +
Returns:
true if buffer contains at least the required byte + count on return, false if not +
Throws: +
java.io.IOException - on error reading from wrapped stream
+
+
+
+ +

+isWhite

+
+private boolean isWhite(int chr)
+
+
Check if a character is XML whitespace. +

+

+ +
Returns:
true if whitespace, false if not
+
+
+
+ +

+scanToken

+
+private java.lang.String scanToken()
+                            throws java.io.IOException
+
+
Reads a space or equals ('=') delimited token from the scan position in + the buffer. This treats bytes in the buffer as equivalent to characters. + Besides ending a token on a delimitor, it also ends a token after adding + a greater-than ('>') character. +

+

+ +
Returns:
token read from buffer +
Throws: +
java.io.IOException - on error reading from wrapped stream
+
+
+
+ +

+scanQuoted

+
+private java.lang.String scanQuoted()
+                             throws java.io.IOException
+
+
Reads a quote delimited token from the scan position in the buffer. This + treats bytes in the buffer as equivalent to characters, and skips past + any leading whitespace. +

+

+ +
Returns:
token read from buffer +
Throws: +
java.io.IOException - on error reading from wrapped stream
+
+
+
+ +

+getReader

+
+public java.io.Reader getReader()
+                         throws java.io.IOException
+
+
Get reader for wrapped input stream. This creates and returns a reader + using the appropriate encoding, if necessary reading and examining the + first part of the stream (including the XML declaration, if present) to + determine the encoding. +

+

+ +
Throws: +
java.io.IOException - if error reading from document or creating a reader + for the encoding found
+
+
+
+ +

+getEncoding

+
+public java.lang.String getEncoding()
+
+
Get encoding for input document. This call may not return an accurate + result until after getReader() is called. +

+

+ +
Returns:
character encoding for input document
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
Close document input. Completes reading of document input, including + closing the input medium. +

+

+ +
Throws: +
java.io.IOException - on error closing document
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset to initial state for reuse. +

+

+
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStreamISO88591Reader.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStreamISO88591Reader.html @@ -0,0 +1,396 @@ + + + + + + +InputStreamWrapper.WrappedStreamISO88591Reader (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class InputStreamWrapper.WrappedStreamISO88591Reader

+
+java.lang.Object
+  extended by java.io.Reader
+      extended by org.jibx.runtime.impl.InputStreamWrapper.WrappedStreamISO88591Reader
+
+
+
All Implemented Interfaces:
java.io.Closeable, java.lang.Readable
+
+
+
Enclosing class:
InputStreamWrapper
+
+
+
+
private class InputStreamWrapper.WrappedStreamISO88591Reader
extends java.io.Reader
+ + +

+Reader for input stream using ISO8859-1 encoding. This uses the enclosing + class to buffer input from the stream, interpreting it as characters on + demand. +

+ +

+


+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class java.io.Reader
lock
+  + + + + + + + + + + + +
+Constructor Summary
+private InputStreamWrapper.WrappedStreamISO88591Reader() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidclose() + +
+           
+ intread() + +
+           
+ intread(char[] b) + +
+           
+ intread(char[] b, + int off, + int len) + +
+           
+ booleanready() + +
+           
+ + + + + + + +
Methods inherited from class java.io.Reader
mark, markSupported, read, reset, skip
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+InputStreamWrapper.WrappedStreamISO88591Reader

+
+private InputStreamWrapper.WrappedStreamISO88591Reader()
+
+
+ + + + + + + + +
+Method Detail
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
+
Specified by:
close in interface java.io.Closeable
Specified by:
close in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(char[] b,
+                int off,
+                int len)
+         throws java.io.IOException
+
+
+
Specified by:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(char[] b)
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read()
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+ready

+
+public boolean ready()
+              throws java.io.IOException
+
+
+
Overrides:
ready in class java.io.Reader
+
+
+ +
Throws: +
java.io.IOException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/SparseArrayIterator.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/SparseArrayIterator.html @@ -0,0 +1,437 @@ + + + + + + +SparseArrayIterator (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class SparseArrayIterator

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.SparseArrayIterator
+
+
+
All Implemented Interfaces:
java.util.Iterator
+
+
+
+
public class SparseArrayIterator
extends java.lang.Object
implements java.util.Iterator
+ + +

+Iterator class for sparse values in an array. This type of iterator + can be used for an object array which has references interspersed with + nulls. +

+ +

+

+
Version:
+
1.1
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+protected  java.lang.Object[]m_array + +
+          Array supplying values for iteration.
+protected  intm_offset + +
+          Offset of next iteration value.
+  + + + + + + + + + + + +
+Constructor Summary
+private SparseArrayIterator(java.lang.Object[] array) + +
+          Internal constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+protected  booleanadvance() + +
+          Advance to next iteration value.
+static java.util.IteratorbuildIterator(java.lang.Object[] array) + +
+          Build iterator.
+ booleanhasNext() + +
+          Check for iteration element available.
+ java.lang.Objectnext() + +
+          Get next iteration element.
+ voidremove() + +
+          Remove element from iteration.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_array

+
+protected java.lang.Object[] m_array
+
+
Array supplying values for iteration. +

+

+
+
+
+ +

+m_offset

+
+protected int m_offset
+
+
Offset of next iteration value. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+SparseArrayIterator

+
+private SparseArrayIterator(java.lang.Object[] array)
+
+
Internal constructor. +

+

+
Parameters:
array - array containing values to be iterated
+
+ + + + + + + + +
+Method Detail
+ +

+advance

+
+protected boolean advance()
+
+
Advance to next iteration value. This advances the current position in + the array to the next non-null value. +

+

+
+
+
+ +
Returns:
true if element available, false if + not
+
+
+
+ +

+hasNext

+
+public boolean hasNext()
+
+
Check for iteration element available. +

+

+
Specified by:
hasNext in interface java.util.Iterator
+
+
+ +
Returns:
true if element available, false if + not
+
+
+
+ +

+next

+
+public java.lang.Object next()
+
+
Get next iteration element. +

+

+
Specified by:
next in interface java.util.Iterator
+
+
+ +
Returns:
next iteration element +
Throws: +
java.util.NoSuchElementException - if past end of iteration
+
+
+
+ +

+remove

+
+public void remove()
+
+
Remove element from iteration. This optional operation is not supported + and always throws an exception. +

+

+
Specified by:
remove in interface java.util.Iterator
+
+
+ +
Throws: +
java.lang.UnsupportedOperationException - for unsupported operation
+
+
+
+ +

+buildIterator

+
+public static java.util.Iterator buildIterator(java.lang.Object[] array)
+
+
Build iterator. +

+

+
+
+
+
Parameters:
array - array containing values to be iterated (may be + null) +
Returns:
constructed iterator
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/ISO88591StreamWriter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/ISO88591StreamWriter.html @@ -0,0 +1,525 @@ + + + + + + +ISO88591StreamWriter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class ISO88591StreamWriter

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.runtime.impl.XMLWriterBase
+          extended by org.jibx.runtime.impl.StreamWriterBase
+              extended by org.jibx.runtime.impl.ISO88591StreamWriter
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
+
public class ISO88591StreamWriter
extends StreamWriterBase
+ + +

+Handler for marshalling text document to a UTF-8 output stream. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + +
+Field Summary
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.StreamWriterBase
AMP_ENTITY, GT_ENTITY, LT_CDATAEND, LT_CDATASTART, LT_ENTITY, m_buffer, m_extensionBytes, m_fillOffset, m_prefixBytes, QUOT_ENTITY
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterBase
m_contentSeen, m_textSeen
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + + + + +
+Constructor Summary
ISO88591StreamWriter(ISO88591StreamWriter base, + java.lang.String[] uris) + +
+          Copy constructor.
ISO88591StreamWriter(java.lang.String[] uris) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ IXMLWritercreateChildWriter(java.lang.String[] uris) + +
+          Create a child writer instance to be used for a separate binding.
+protected  voiddefineNamespace(int index, + java.lang.String prefix) + +
+          Report that namespace has been defined.
+protected  voidwriteAttributeText(java.lang.String text) + +
+          Write attribute text to output.
+ voidwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+protected  voidwriteMarkup(char chr) + +
+          Write markup character to output.
+protected  voidwriteMarkup(java.lang.String text) + +
+          Write markup text to output.
+ voidwriteTextContent(java.lang.String text) + +
+          Write ordinary character data text content to document.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.StreamWriterBase
close, flush, indent, indent, makeSpace, popExtensionNamespaces, pushExtensionNamespaces, reset, setIndentSpaces, setOutput, undefineNamespace, writeEntity, writePrefix
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterBase
addAttribute, closeEmptyTag, closeStartTag, endTag, startTagClosed, startTagNamespaces, startTagOpen, writeComment, writeDocType, writeEntityRef, writePI, writeXMLDecl
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, shrinkArray
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+ISO88591StreamWriter

+
+public ISO88591StreamWriter(java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+
+ +

+ISO88591StreamWriter

+
+public ISO88591StreamWriter(ISO88591StreamWriter base,
+                            java.lang.String[] uris)
+
+
Copy constructor. This takes the stream from a supplied instance, while + setting a new array of namespace URIs. It's intended for use when + invoking one binding from within another binding. +

+

+
Parameters:
base - instance to be used as base for writer
uris - ordered array of URIs for namespaces used in document + (see ISO88591StreamWriter(String[]))
+
+ + + + + + + + +
+Method Detail
+ +

+writeMarkup

+
+protected void writeMarkup(java.lang.String text)
+                    throws java.io.IOException
+
+
Write markup text to output. Markup text can be written directly to the + output without the need for any escaping, but still needs to be properly + encoded. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
text - markup text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeMarkup

+
+protected void writeMarkup(char chr)
+                    throws java.io.IOException
+
+
Write markup character to output. Markup text can be written directly to + the output without the need for any escaping, but still needs to be + properly encoded. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
chr - markup character to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+defineNamespace

+
+protected void defineNamespace(int index,
+                               java.lang.String prefix)
+                        throws java.io.IOException
+
+
Report that namespace has been defined. +

+

+
Specified by:
defineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
prefix - prefix used for namespace +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeAttributeText

+
+protected void writeAttributeText(java.lang.String text)
+                           throws java.io.IOException
+
+
Write attribute text to output. This needs to write the text with any + appropriate escaping. +

+

+
Specified by:
writeAttributeText in class XMLWriterBase
+
+
+
Parameters:
text - attribute value text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeTextContent

+
+public void writeTextContent(java.lang.String text)
+                      throws java.io.IOException
+
+
Write ordinary character data text content to document. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text)
+                throws java.io.IOException
+
+
Write CDATA text to document. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+createChildWriter

+
+public IXMLWriter createChildWriter(java.lang.String[] uris)
+
+
Create a child writer instance to be used for a separate binding. The + child writer inherits the stream and encoding from this writer, while + using the supplied namespace URIs. +

+

+
Specified by:
createChildWriter in class XMLWriterBase
+
+
+
Parameters:
uris - ordered array of URIs for namespaces used in document + (see ISO88591StreamWriter(String[])) +
Returns:
child writer
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/XMLWriterBase.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/XMLWriterBase.html @@ -0,0 +1,893 @@ + + + + + + +XMLWriterBase (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class XMLWriterBase

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.runtime.impl.XMLWriterBase
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
Direct Known Subclasses:
GenericXMLWriter, StreamWriterBase
+
+
+
+
public abstract class XMLWriterBase
extends XMLWriterNamespaceBase
+ + +

+Base implementation of XML writer interface. This provides common handling of + indentation and formatting that can be used for all forms of text output. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + +
+Field Summary
+protected  booleanm_contentSeen + +
+          Flag for current element has content.
+protected  booleanm_textSeen + +
+          Flag for current element has text content.
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + +
+Constructor Summary
XMLWriterBase(java.lang.String[] uris) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ voidaddAttribute(int index, + java.lang.String name, + java.lang.String value) + +
+          Add attribute to current open start tag.
+abstract  voidclose() + +
+          Close document output.
+ voidcloseEmptyTag() + +
+          Close the current open start tag as an empty element.
+ voidcloseStartTag() + +
+          Close the current open start tag.
+abstract  IXMLWritercreateChildWriter(java.lang.String[] uris) + +
+          Create a child writer instance to be used for a separate binding.
+ voidendTag(int index, + java.lang.String name) + +
+          Generate end tag.
+abstract  voidflush() + +
+          Flush document output.
+protected abstract  voidindent(int bias) + +
+          Request output indent with bias from current element nesting level.
+ voidreset() + +
+          Reset to initial state for reuse.
+ voidstartTagClosed(int index, + java.lang.String name) + +
+          Generate closed start tag.
+ voidstartTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + +
+          Generate start tag for element with namespaces.
+ voidstartTagOpen(int index, + java.lang.String name) + +
+          Generate open start tag.
+protected abstract  voidwriteAttributeText(java.lang.String text) + +
+          Write attribute text to output.
+ voidwriteComment(java.lang.String text) + +
+          Write comment to document.
+ voidwriteDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + +
+          Write DOCTYPE declaration to document.
+ voidwriteEntityRef(java.lang.String name) + +
+          Write entity reference to document.
+protected abstract  voidwriteMarkup(char chr) + +
+          Write markup character to output.
+protected abstract  voidwriteMarkup(java.lang.String text) + +
+          Write markup text to output.
+ voidwritePI(java.lang.String target, + java.lang.String data) + +
+          Write processing instruction to document.
+protected abstract  voidwritePrefix(int index) + +
+          Write namespace prefix to output.
+ voidwriteXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + +
+          Write XML declaration to document.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, defineNamespace, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, popExtensionNamespaces, pushExtensionNamespaces, shrinkArray, undefineNamespace
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+ + + + + + + +
Methods inherited from interface org.jibx.runtime.IXMLWriter
indent, setIndentSpaces, writeCData, writeTextContent
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_textSeen

+
+protected boolean m_textSeen
+
+
Flag for current element has text content. +

+

+
+
+
+ +

+m_contentSeen

+
+protected boolean m_contentSeen
+
+
Flag for current element has content. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+XMLWriterBase

+
+public XMLWriterBase(java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+ + + + + + + + +
+Method Detail
+ +

+writeMarkup

+
+protected abstract void writeMarkup(java.lang.String text)
+                             throws java.io.IOException
+
+
Write markup text to output. Markup text can be written directly to the + output without the need for any escaping, but still needs to be properly + encoded. +

+

+
Parameters:
text - markup text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeMarkup

+
+protected abstract void writeMarkup(char chr)
+                             throws java.io.IOException
+
+
Write markup character to output. Markup text can be written directly to + the output without the need for any escaping, but still needs to be + properly encoded. +

+

+
Parameters:
chr - markup character to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writePrefix

+
+protected abstract void writePrefix(int index)
+                             throws java.io.IOException
+
+
Write namespace prefix to output. This internal method is used to throw + an exception when an undeclared prefix is used. +

+

+
Parameters:
index - namespace URI index number +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeAttributeText

+
+protected abstract void writeAttributeText(java.lang.String text)
+                                    throws java.io.IOException
+
+
Write attribute text to output. This needs to write the text with any + appropriate escaping. +

+

+
Parameters:
text - attribute value text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+indent

+
+protected abstract void indent(int bias)
+                        throws java.io.IOException
+
+
Request output indent with bias from current element nesting level. This + is used internally for proper indenting in special cases. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeXMLDecl

+
+public void writeXMLDecl(java.lang.String version,
+                         java.lang.String encoding,
+                         java.lang.String standalone)
+                  throws java.io.IOException
+
+
Write XML declaration to document. This can only be called before any + other methods in the interface are called. +

+

+
Parameters:
version - XML version text
encoding - text for encoding attribute (unspecified if + null)
standalone - text for standalone attribute (unspecified if + null) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagOpen

+
+public void startTagOpen(int index,
+                         java.lang.String name)
+                  throws java.io.IOException
+
+
Generate open start tag. This allows attributes to be added to the start + tag, but must be followed by a closeStartTag() call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagNamespaces

+
+public void startTagNamespaces(int index,
+                               java.lang.String name,
+                               int[] nums,
+                               java.lang.String[] prefs)
+                        throws java.io.IOException
+
+
Generate start tag for element with namespaces. This creates the actual + start tag, along with any necessary namespace declarations. Previously + active namespace declarations are not duplicated. The tag is + left incomplete, allowing other attributes to be added. +

+

+
Parameters:
index - namespace URI index number
name - element name
nums - array of namespace indexes defined by this element (must + be constant, reference is kept until end of element)
prefs - array of namespace prefixes mapped by this element (no + null values, use "" for default namespace declaration) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+addAttribute

+
+public void addAttribute(int index,
+                         java.lang.String name,
+                         java.lang.String value)
+                  throws java.io.IOException
+
+
Add attribute to current open start tag. This is only valid after a call + to startTagOpen(int, java.lang.String) or startTagNamespaces(int, java.lang.String, int[], java.lang.String[]) and before the + corresponding call to closeStartTag(). +

+

+
Parameters:
index - namespace URI index number
name - unqualified attribute name
value - text value for attribute +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeStartTag

+
+public void closeStartTag()
+                   throws java.io.IOException
+
+
Close the current open start tag. This is only valid after a call to + startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+closeEmptyTag

+
+public void closeEmptyTag()
+                   throws java.io.IOException
+
+
Close the current open start tag as an empty element. This is only valid + after a call to startTagOpen(int, java.lang.String). +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+startTagClosed

+
+public void startTagClosed(int index,
+                           java.lang.String name)
+                    throws java.io.IOException
+
+
Generate closed start tag. No attributes or namespaces can be added to a + start tag written using this call. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+endTag

+
+public void endTag(int index,
+                   java.lang.String name)
+            throws java.io.IOException
+
+
Generate end tag. +

+

+
Parameters:
index - namespace URI index number
name - unqualified element name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeComment

+
+public void writeComment(java.lang.String text)
+                  throws java.io.IOException
+
+
Write comment to document. +

+

+
Parameters:
text - comment text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeEntityRef

+
+public void writeEntityRef(java.lang.String name)
+                    throws java.io.IOException
+
+
Write entity reference to document. +

+

+
Parameters:
name - entity name +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeDocType

+
+public void writeDocType(java.lang.String name,
+                         java.lang.String sys,
+                         java.lang.String pub,
+                         java.lang.String subset)
+                  throws java.io.IOException
+
+
Write DOCTYPE declaration to document. +

+

+
Parameters:
name - root element name
sys - system ID (null if none, must be + non-null for public ID to be used)
pub - public ID (null if none)
subset - internal subset (null if none) +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writePI

+
+public void writePI(java.lang.String target,
+                    java.lang.String data)
+             throws java.io.IOException
+
+
Write processing instruction to document. +

+

+
Parameters:
target - processing instruction target name
data - processing instruction data +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+flush

+
+public abstract void flush()
+                    throws java.io.IOException
+
+
Flush document output. Forces out all output generated to this point. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+close

+
+public abstract void close()
+                    throws java.io.IOException
+
+
Close document output. Completes writing of document output, including + closing the output medium. +

+

+ +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset to initial state for reuse. The writer is serially reusable, + as long as this method is called to clear any retained state information + between uses. It is automatically called when output is set. +

+

+
Specified by:
reset in interface IXMLWriter
Overrides:
reset in class XMLWriterNamespaceBase
+
+
+
+
+
+
+ +

+createChildWriter

+
+public abstract IXMLWriter createChildWriter(java.lang.String[] uris)
+
+
Create a child writer instance to be used for a separate binding. The + child writer inherits the stream and encoding from this writer, while + using the supplied namespace URIs. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document + (see XMLWriterBase(String[])) +
Returns:
child writer
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/UTF8Escaper.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/UTF8Escaper.html @@ -0,0 +1,398 @@ + + + + + + +UTF8Escaper (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class UTF8Escaper

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.UTF8Escaper
+
+
+
All Implemented Interfaces:
ICharacterEscaper
+
+
+
+
public class UTF8Escaper
extends java.lang.Object
implements ICharacterEscaper
+ + +

+Handler for writing UTF output stream (for any form of UTF, despite the + name). This code is specifically for XML 1.0 and would require changes for + XML 1.1 (to handle the added legal characters, rather than throwing an + exception). +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private static UTF8Escapers_instance + +
+          Singleton instance of class.
+  + + + + + + + + + + + +
+Constructor Summary
+private UTF8Escaper() + +
+          Private constructor to prevent external creation.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static ICharacterEscapergetInstance() + +
+          Get instance of escaper.
+ voidwriteAttribute(java.lang.String text, + java.io.Writer writer) + +
+          Write attribute value with character entity substitutions.
+ voidwriteCData(java.lang.String text, + java.io.Writer writer) + +
+          Write CDATA to document.
+ voidwriteContent(java.lang.String text, + java.io.Writer writer) + +
+          Write content value with character entity substitutions.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+s_instance

+
+private static final UTF8Escaper s_instance
+
+
Singleton instance of class. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+UTF8Escaper

+
+private UTF8Escaper()
+
+
Private constructor to prevent external creation. +

+

+ + + + + + + + +
+Method Detail
+ +

+writeAttribute

+
+public void writeAttribute(java.lang.String text,
+                           java.io.Writer writer)
+                    throws java.io.IOException
+
+
Write attribute value with character entity substitutions. This assumes + that attributes use the regular quote ('"') delimitor. +

+

+
Specified by:
writeAttribute in interface ICharacterEscaper
+
+
+
Parameters:
text - attribute value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeContent

+
+public void writeContent(java.lang.String text,
+                         java.io.Writer writer)
+                  throws java.io.IOException
+
+
Write content value with character entity substitutions. +

+

+
Specified by:
writeContent in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text,
+                       java.io.Writer writer)
+                throws java.io.IOException
+
+
Write CDATA to document. This writes the beginning and ending sequences + for a CDATA section as well as the actual text, verifying that only + characters allowed by the encoding are included in the text. +

+

+
Specified by:
writeCData in interface ICharacterEscaper
+
+
+
Parameters:
text - content value text
writer - sink for output text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+getInstance

+
+public static ICharacterEscaper getInstance()
+
+
Get instance of escaper. +

+

+
+
+
+ +
Returns:
escaper instance
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStream.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/InputStreamWrapper.WrappedStream.html @@ -0,0 +1,402 @@ + + + + + + +InputStreamWrapper.WrappedStream (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class InputStreamWrapper.WrappedStream

+
+java.lang.Object
+  extended by java.io.InputStream
+      extended by org.jibx.runtime.impl.InputStreamWrapper.WrappedStream
+
+
+
All Implemented Interfaces:
java.io.Closeable
+
+
+
Enclosing class:
InputStreamWrapper
+
+
+
+
private class InputStreamWrapper.WrappedStream
extends java.io.InputStream
+ + +

+Stream that just uses the enclosing class to buffer input from the + wrapped stream. +

+ +

+


+ +

+ + + + + + + + + + + + +
+Constructor Summary
+private InputStreamWrapper.WrappedStream() + +
+           
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ intavailable() + +
+           
+ voidclose() + +
+           
+ intread() + +
+           
+ intread(byte[] b) + +
+           
+ intread(byte[] b, + int off, + int len) + +
+           
+ longskip(long n) + +
+           
+ + + + + + + +
Methods inherited from class java.io.InputStream
mark, markSupported, reset
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Constructor Detail
+ +

+InputStreamWrapper.WrappedStream

+
+private InputStreamWrapper.WrappedStream()
+
+
+ + + + + + + + +
+Method Detail
+ +

+available

+
+public int available()
+              throws java.io.IOException
+
+
+
Overrides:
available in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+close

+
+public void close()
+           throws java.io.IOException
+
+
+
Specified by:
close in interface java.io.Closeable
Overrides:
close in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(byte[] b,
+                int off,
+                int len)
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read(byte[] b)
+         throws java.io.IOException
+
+
+
Overrides:
read in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+skip

+
+public long skip(long n)
+          throws java.io.IOException
+
+
+
Overrides:
skip in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+
+ +

+read

+
+public int read()
+         throws java.io.IOException
+
+
+
Specified by:
read in class java.io.InputStream
+
+
+ +
Throws: +
java.io.IOException
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/package-frame.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/package-frame.html @@ -0,0 +1,79 @@ + + + + + + +org.jibx.runtime.impl (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + +org.jibx.runtime.impl + + + + +
+Interfaces  + +
+BackFillReference +
+ITrackSourceImpl
+ + + + + + +
+Classes  + +
+ArrayRangeIterator +
+BackFillArray +
+BackFillHolder +
+GenericXMLWriter +
+InputStreamWrapper +
+ISO88591Escaper +
+ISO88591StreamWriter +
+MarshallingContext +
+SparseArrayIterator +
+StreamWriterBase +
+StringIntHashMap +
+UnmarshallingContext +
+USASCIIEscaper +
+UTF8Escaper +
+UTF8StreamWriter +
+XMLWriterBase +
+XMLWriterNamespaceBase +
+XMLWriterNamespaceBase.DeclarationInfo
+ + + + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/package-summary.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/package-summary.html @@ -0,0 +1,262 @@ + + + + + + +org.jibx.runtime.impl (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

+Package org.jibx.runtime.impl +

+JiBX data binding framework runtime implementation package. +

+See: +
+          Description +

+ + + + + + + + + + + + + +
+Interface Summary
BackFillReferenceBackfill reference item, used for filling in forward references to + objects.
ITrackSourceImplUnmarshalling source tracking implementation interface.
+  + +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Class Summary
ArrayRangeIteratorIterator class for values contained in an array range.
BackFillArrayBackfill reference item, used for filling in forward references as + members of arrays.
BackFillHolderHolder used to collect forward references to a particular object.
GenericXMLWriterGeneric handler for marshalling text document to a writer.
InputStreamWrapperWrapper for input stream that supports multiple character encodings.
ISO88591EscaperHandler for writing ASCII output stream.
ISO88591StreamWriterHandler for marshalling text document to a UTF-8 output stream.
MarshallingContextJiBX serializer supplying convenience methods for marshalling.
SparseArrayIteratorIterator class for sparse values in an array.
StreamWriterBaseBase handler for marshalling text document to an output stream.
StringIntHashMapHash map using String values as keys mapped to primitive + int values.
UnmarshallingContextXMLPull parser wrapper supplying convenience methods for access.
USASCIIEscaperHandler for writing ASCII output stream.
UTF8EscaperHandler for writing UTF output stream (for any form of UTF, despite the + name).
UTF8StreamWriterHandler for marshalling text document to a UTF-8 output stream.
XMLWriterBaseBase implementation of XML writer interface.
XMLWriterNamespaceBaseBase implementation of XML writer interface namespace handling.
XMLWriterNamespaceBase.DeclarationInfoNamespace declaration tracking information.
+  + +

+

+Package org.jibx.runtime.impl Description +

+ +

+JiBX data binding framework runtime implementation package. These classes are +designed for use in generated code by the binding generator portion of the framework. +They are not generally intended for direct use by end users, and are subject +to more change than the published external APIs.

+ +The only circumstance in which an end user of the framework should need to work +with these classes is when writing a marshaller or unmarshaller for a class. +These replace generated code for the classes involved, and hence allow full +control over the operation of the framework. +

+ +

+

+
+
+ + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/ArrayRangeIterator.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/ArrayRangeIterator.html @@ -0,0 +1,457 @@ + + + + + + +ArrayRangeIterator (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class ArrayRangeIterator

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.ArrayRangeIterator
+
+
+
All Implemented Interfaces:
java.util.Iterator
+
+
+
+
public class ArrayRangeIterator
extends java.lang.Object
implements java.util.Iterator
+ + +

+Iterator class for values contained in an array range. This type of iterator + can be used for any contiguous range of items in an object array. +

+ +

+

+
Version:
+
1.1
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static ArrayRangeIteratorEMPTY_ITERATOR + +
+          Empty iterator used whenever possible.
+protected  java.lang.Object[]m_array + +
+          Array supplying values for iteration.
+protected  intm_limit + +
+          Ending offset for values.
+protected  intm_offset + +
+          Offset of next iteration value.
+  + + + + + + + + + + + +
+Constructor Summary
+private ArrayRangeIterator(java.lang.Object[] array, + int start, + int limit) + +
+          Internal constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+static java.util.IteratorbuildIterator(java.lang.Object[] array, + int start, + int limit) + +
+          Build iterator.
+ booleanhasNext() + +
+          Check for iteration element available.
+ java.lang.Objectnext() + +
+          Get next iteration element.
+ voidremove() + +
+          Remove element from iteration.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+EMPTY_ITERATOR

+
+public static final ArrayRangeIterator EMPTY_ITERATOR
+
+
Empty iterator used whenever possible. +

+

+
+
+
+ +

+m_array

+
+protected java.lang.Object[] m_array
+
+
Array supplying values for iteration. +

+

+
+
+
+ +

+m_offset

+
+protected int m_offset
+
+
Offset of next iteration value. +

+

+
+
+
+ +

+m_limit

+
+protected int m_limit
+
+
Ending offset for values. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+ArrayRangeIterator

+
+private ArrayRangeIterator(java.lang.Object[] array,
+                           int start,
+                           int limit)
+
+
Internal constructor. +

+

+
Parameters:
array - array containing values to be iterated
start - starting offset in array
limit - offset past end of values
+
+ + + + + + + + +
+Method Detail
+ +

+hasNext

+
+public boolean hasNext()
+
+
Check for iteration element available. +

+

+
Specified by:
hasNext in interface java.util.Iterator
+
+
+ +
Returns:
true if element available, false if + not
+
+
+
+ +

+next

+
+public java.lang.Object next()
+
+
Get next iteration element. +

+

+
Specified by:
next in interface java.util.Iterator
+
+
+ +
Returns:
next iteration element +
Throws: +
java.util.NoSuchElementException - if past end of iteration
+
+
+
+ +

+remove

+
+public void remove()
+
+
Remove element from iteration. This optional operation is not supported + and always throws an exception. +

+

+
Specified by:
remove in interface java.util.Iterator
+
+
+ +
Throws: +
java.lang.UnsupportedOperationException - for unsupported operation
+
+
+
+ +

+buildIterator

+
+public static java.util.Iterator buildIterator(java.lang.Object[] array,
+                                               int start,
+                                               int limit)
+
+
Build iterator. +

+

+
+
+
+
Parameters:
array - array containing values to be iterated (may be + null)
start - starting offset in array
limit - offset past end of values +
Returns:
constructed iterator
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/UnmarshallingContext.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/UnmarshallingContext.html @@ -0,0 +1,5628 @@ + + + + + + +UnmarshallingContext (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class UnmarshallingContext

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.UnmarshallingContext
+
+
+
All Implemented Interfaces:
IUnmarshallingContext
+
+
+
+
public class UnmarshallingContext
extends java.lang.Object
implements IUnmarshallingContext
+ + +

+XMLPull parser wrapper supplying convenience methods for access. Most of + these methods are designed for use in code generated by the binding + generator. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Field Summary
+static intCDSECT + +
+           
+static intCOMMENT + +
+           
+private static java.lang.StringDEFAULT_PARSER_NAME + +
+          Default parser factory name when nothing else found.
+static intDOCDECL + +
+           
+private static java.lang.String[]EMPTY_STRING_ARRAY + +
+          Empty array of strings.
+static intEND_DOCUMENT + +
+           
+static intEND_TAG + +
+           
+static intENTITY_REF + +
+           
+static intIGNORABLE_WHITESPACE + +
+           
+private static intINITIAL_STACK_SIZE + +
+          Starting size for object stack.
+private  java.lang.Stringm_docName + +
+          Document name (may be null).
+private  IBindingFactorym_factory + +
+          Binding factory used to create this unmarshaller.
+protected  intm_globalCount + +
+          Number of classes with global unmarshallers.
+protected  java.lang.String[]m_idClasses + +
+          Class names of referenced types (null unless class-specific + IDs used).
+protected  java.util.HashMap[]m_idMaps + +
+          ID maps for finding references.
+protected  java.lang.Stringm_idref + +
+          Last IDREF value parsed.
+protected  java.lang.Integer[]m_indexes + +
+          Wrapped index values used with unmarshalling map.
+protected  java.lang.String[]m_names + +
+          Names for elements associated with class mappings.
+protected  java.lang.String[]m_namespaces + +
+          Namespaces for elements associated with class mappings.
+protected  java.lang.Object[]m_objectStack + +
+          Stack of objects being unmarshalled.
+private  org.xmlpull.v1.XmlPullParserm_parser + +
+          Parser in use.
+protected  intm_stackDepth + +
+          Current unmarshalling stack depth.
+private  InputStreamWrapperm_streamWrapper + +
+          Wrapper for supplied input stream.
+protected  java.lang.String[]m_unmarshallerClasses + +
+          Unmarshaller classes for mapping definition (null for + mappings out of context).
+protected  IUnmarshaller[]m_unmarshallers + +
+          Unmarshallers for classes in mapping definition (lazy create of actual + unmarshaller instances)
+protected  java.util.HashMapm_unmarshalMap + +
+          Mapping from element name to class index.
+static intPROCESSING_INSTRUCTION + +
+           
+private static org.xmlpull.v1.XmlPullParserFactorys_factory + +
+          Factory used for constructing parser instances.
+static intSTART_DOCUMENT + +
+           
+static intSTART_TAG + +
+           
+static intTEXT + +
+           
+  + + + + + + + + + + + + + +
+Constructor Summary
UnmarshallingContext() + +
+          Default constructor.
UnmarshallingContext(int nmap, + java.lang.String[] umcs, + java.lang.String[] nss, + java.lang.String[] names, + java.lang.String[] idcs, + IBindingFactory ifact) + +
+          Constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ java.lang.StringaccumulateText() + +
+          Accumulate text content.
+ voidaddUnmarshalling(int index, + java.lang.String ns, + java.lang.String name, + java.lang.String cname) + +
+          Define unmarshalling for element.
+private  voidadvance() + +
+          Advance to next parse item.
+ booleanattributeBoolean(java.lang.String ns, + java.lang.String name) + +
+          Get boolean value of attribute from current start tag.
+ booleanattributeBoolean(java.lang.String ns, + java.lang.String name, + boolean dflt) + +
+          Get boolean value of optional attribute from current start tag.
+ byteattributeByte(java.lang.String ns, + java.lang.String name) + +
+          Get byte value of attribute from current start tag.
+ byteattributeByte(java.lang.String ns, + java.lang.String name, + byte dflt) + +
+          Get byte value of optional attribute from current start tag.
+ charattributeChar(java.lang.String ns, + java.lang.String name) + +
+          Get char value of attribute from current start tag.
+ charattributeChar(java.lang.String ns, + java.lang.String name, + char dflt) + +
+          Get char value of optional attribute from current start tag.
+ java.util.DateattributeDate(java.lang.String ns, + java.lang.String name) + +
+          Get java.util.Date value of attribute from current start + tag.
+ java.util.DateattributeDate(java.lang.String ns, + java.lang.String name, + java.util.Date dflt) + +
+          Get java.util.Date value of optional attribute from current + start tag.
+ doubleattributeDouble(java.lang.String ns, + java.lang.String name) + +
+          Get double value of attribute from current start tag.
+ doubleattributeDouble(java.lang.String ns, + java.lang.String name, + double dflt) + +
+          Get double value of optional attribute from current start tag.
+ intattributeEnumeration(java.lang.String ns, + java.lang.String name, + java.lang.String[] enums, + int[] vals) + +
+          Get enumeration attribute value from current start tag.
+ intattributeEnumeration(java.lang.String ns, + java.lang.String name, + java.lang.String[] enums, + int[] vals, + int dflt) + +
+          Get optional enumeration attribute value from current start tag.
+ java.lang.ObjectattributeExistingIDREF(java.lang.String ns, + java.lang.String name, + int index) + +
+          Get previously defined object corresponding to IDREF attribute from + current start tag.
+ floatattributeFloat(java.lang.String ns, + java.lang.String name) + +
+          Get float value of attribute from current start tag.
+ floatattributeFloat(java.lang.String ns, + java.lang.String name, + float dflt) + +
+          Get float value of optional attribute from current start tag.
+ java.lang.ObjectattributeForwardIDREF(java.lang.String ns, + java.lang.String name, + int index) + +
+          Get object (if defined yet) corresponding to IDREF attribute from + current start tag.
+ intattributeInt(java.lang.String ns, + java.lang.String name) + +
+          Get integer value of attribute from current start tag.
+ intattributeInt(java.lang.String ns, + java.lang.String name, + int dflt) + +
+          Get integer value of optional attribute from current + start tag.
+ longattributeLong(java.lang.String ns, + java.lang.String name) + +
+          Get long value of attribute from current start tag.
+ longattributeLong(java.lang.String ns, + java.lang.String name, + long dflt) + +
+          Get long value of optional attribute from current start tag.
+ shortattributeShort(java.lang.String ns, + java.lang.String name) + +
+          Get short value of attribute from current start tag.
+ shortattributeShort(java.lang.String ns, + java.lang.String name, + short dflt) + +
+          Get short value of optional attribute from current start tag.
+ java.lang.StringattributeText(java.lang.String ns, + java.lang.String name) + +
+          Get text value of attribute from current start tag.
+ java.lang.StringattributeText(java.lang.String ns, + java.lang.String name, + java.lang.String dflt) + +
+          Get text value of optional attribute from current start + tag.
+static java.lang.StringbuildNameString(java.lang.String ns, + java.lang.String name) + +
+          Build name with optional namespace.
+ java.lang.StringbuildPositionString() + +
+          Build current parse input position description.
+ voidcheckAllowedAttributes(java.lang.String[] nss, + java.lang.String[] names) + +
+          Check that only allowed attributes are present on current start tag.
+ booleanconvertBoolean(java.lang.String text) + +
+          Convert boolean value.
+ byteconvertByte(java.lang.String text) + +
+          Convert byte value with exception wrapper.
+ charconvertChar(java.lang.String text) + +
+          Convert char value with exception wrapper.
+ java.util.DateconvertDate(java.lang.String text) + +
+          Convert java.util.Date value with exception wrapper.
+ doubleconvertDouble(java.lang.String text) + +
+          Convert double value with exception wrapper.
+ intconvertEnum(java.lang.String target, + java.lang.String[] enums, + int[] vals) + +
+          Find required text value in enumeration.
+ intconvertEnum(java.lang.String target, + java.lang.String[] enums, + int[] vals, + int dflt) + +
+          Find optional text value in enumeration.
+ floatconvertFloat(java.lang.String text) + +
+          Convert float value with exception wrapper.
+ longconvertLong(java.lang.String text) + +
+          Convert long value with exception wrapper.
+ shortconvertShort(java.lang.String text) + +
+          Convert short value with exception wrapper.
+private  voidcreateParser(boolean nsa) + +
+          Create parser if one does not already exist.
+ intcurrentEvent() + +
+          Get the current parse event type.
+ java.lang.StringcurrentNameString() + +
+          Build current element name, with optional namespace.
+ voiddefineID(java.lang.String id, + int index, + java.lang.Object obj) + +
+          Define object for ID.
+ java.lang.ObjectfindDefinedID(java.lang.String id, + int index) + +
+          Find previously defined object corresponding to an ID.
+ java.lang.ObjectfindID(java.lang.String id, + int index) + +
+          Find the object corresponding to an ID.
+ intgetActiveNamespaceCount() + +
+          Get count of active namespaces.
+ java.lang.StringgetActiveNamespacePrefix(int index) + +
+          Get prefix for an active namespace.
+ java.lang.StringgetActiveNamespaceUri(int index) + +
+          Get URI for an active namespace.
+ intgetAttributeCount() + +
+          Get number of attributes for current START_ELEMENT event.
+ java.lang.StringgetAttributeName(int index) + +
+          Get attribute name for current START_ELEMENT event.
+ java.lang.StringgetAttributeNamespace(int index) + +
+          Get attribute namespace for current START_ELEMENT event.
+ java.lang.StringgetAttributePrefix(int index) + +
+          Get attribute namespace prefix for current START_ELEMENT event.
+ java.lang.StringgetAttributeValue(int index) + +
+          Get attribute value for current START_ELEMENT event.
+private  java.lang.StringgetAttributeValue(java.lang.String ns, + java.lang.String name) + +
+          Get attribute value from parser.
+ java.lang.StringgetDocumentName() + +
+          Return the supplied document name.
+ java.lang.StringgetElementName() + +
+          Returns current element name.
+ java.lang.StringgetElementNamespace() + +
+          Returns current element namespace URI.
+ IBindingFactorygetFactory() + +
+          Return the binding factory used to create this unmarshaller.
+ java.lang.StringgetInputEncoding() + +
+          Return the input encoding, if known.
+ java.lang.StringgetName() + +
+          Get name associated with current parse event.
+ java.lang.StringgetNamespace() + +
+          Get namespace associated with current parse event.
+ intgetNamespaceCount() + +
+          Get number of namespace declarations for current START_ELEMENT event.
+ java.lang.StringgetNamespacePrefix(int index) + +
+          Get namespace prefix for namespace declaration on current START_ELEMENT + event.
+ java.lang.StringgetNamespaceUri(int index) + +
+          Get namespace URI for namespace declaration on current START_ELEMENT + event.
+ java.lang.StringgetNamespaceUri(java.lang.String prefix) + +
+          Get namespace URI matching prefix.
+ java.lang.StringgetPrefix() + +
+          Get namespace prefix associated with current parse event.
+ intgetStackDepth() + +
+          Get current unmarshalling object stack depth.
+ java.lang.ObjectgetStackObject(int depth) + +
+          Get object from unmarshalling stack.
+ java.lang.ObjectgetStackTop() + +
+          Get top object on unmarshalling stack.
+ java.lang.StringgetText() + +
+          Get text value for current event.
+ IUnmarshallergetUnmarshaller(int index) + +
+          Find the unmarshaller for a particular class index in the current + context.
+ IUnmarshallergetUnmarshaller(java.lang.String ns, + java.lang.String name) + +
+          Find the unmarshaller for a particular element name (including + namespace) in the current context.
+ booleanhasAnyAttribute(java.lang.String[] nss, + java.lang.String[] names) + +
+          Check if any of several attributes is present on current start tag.
+ booleanhasAttribute(java.lang.String ns, + java.lang.String name) + +
+          Check if attribute is present on current start tag.
+ booleanisAt(java.lang.String ns, + java.lang.String name) + +
+          Check if next tag is start of element.
+ booleanisEnd() + +
+          Check if next tag is an end tag.
+protected  voidmapUnmarshalling(int index) + +
+          Map unmarshalling for element.
+private  voidmatchStart(java.lang.String ns, + java.lang.String name) + +
+          Internal parse to expected start tag.
+ intnext() + +
+          Advance to next major parse event.
+ intnextToken() + +
+          Advance to next parse event.
+ byteparseContentByte(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning byte value of content.
+ charparseContentChar(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning char value of content.
+ intparseContentEnumeration(java.lang.String ns, + java.lang.String tag, + java.lang.String[] enums, + int[] vals) + +
+          Parse past end of element, returning enumeration value of content.
+ intparseContentInt(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning integer value of + content.
+ shortparseContentShort(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning short value of content.
+ java.lang.StringparseContentText() + +
+          Parse required text content.
+ java.lang.StringparseContentText(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning optional text content.
+ booleanparseElementBoolean(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning boolean value of content.
+ booleanparseElementBoolean(java.lang.String ns, + java.lang.String tag, + boolean dflt) + +
+          Parse entire element, returning boolean value of optional content.
+ byteparseElementByte(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning byte value of content.
+ byteparseElementByte(java.lang.String ns, + java.lang.String tag, + byte dflt) + +
+          Parse entire element, returning byte value of optional content.
+ charparseElementChar(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning char value of content.
+ charparseElementChar(java.lang.String ns, + java.lang.String tag, + char dflt) + +
+          Parse entire element, returning char value of optional content.
+ java.util.DateparseElementDate(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning java.util.Date value + of content.
+ java.util.DateparseElementDate(java.lang.String ns, + java.lang.String tag, + java.util.Date dflt) + +
+          Parse entire element, returning java.util.Date value of + optional content.
+ doubleparseElementDouble(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning double value of content.
+ doubleparseElementDouble(java.lang.String ns, + java.lang.String tag, + double dflt) + +
+          Parse entire element, returning double value of optional content.
+ intparseElementEnumeration(java.lang.String ns, + java.lang.String tag, + java.lang.String[] enums, + int[] vals, + int dflt) + +
+          Parse entire element, returning enumeration value of optional content.
+ java.lang.ObjectparseElementExistingIDREF(java.lang.String ns, + java.lang.String tag, + int index) + +
+          Parse entire element, returning previously defined object corresponding + to content interpreted as IDREF.
+ floatparseElementFloat(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning float value of content.
+ floatparseElementFloat(java.lang.String ns, + java.lang.String tag, + float dflt) + +
+          Parse entire element, returning float value of optional content.
+ java.lang.ObjectparseElementForwardIDREF(java.lang.String ns, + java.lang.String tag, + int index) + +
+          Parse entire element, returning object (if defined yet) corresponding + to content interpreted as IDREF.
+ intparseElementInt(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning integer value of content.
+ intparseElementInt(java.lang.String ns, + java.lang.String tag, + int dflt) + +
+          Parse entire optional element, returning integer value of content.
+ longparseElementLong(java.lang.String ns, + java.lang.String tag) + +
+          Parse past end of element, returning long value of content.
+ longparseElementLong(java.lang.String ns, + java.lang.String tag, + long dflt) + +
+          Parse entire element, returning long value of optional content.
+ shortparseElementShort(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning short value of content.
+ shortparseElementShort(java.lang.String ns, + java.lang.String tag, + short dflt) + +
+          Parse entire element, returning short value of optional content.
+ java.lang.StringparseElementText(java.lang.String ns, + java.lang.String tag) + +
+          Parse entire element, returning text content.
+ java.lang.StringparseElementText(java.lang.String ns, + java.lang.String tag, + java.lang.String dflt) + +
+          Parse entire element, returning optional text content.
+ booleanparseIfStartTag(java.lang.String ns, + java.lang.String name) + +
+          Parse past start of element.
+ voidparsePastCurrentEndTag(java.lang.String ns, + java.lang.String name) + +
+          Parse past current end of element.
+ voidparsePastElement(java.lang.String ns, + java.lang.String tag) + +
+          Parse past element, ignoring all content.
+ voidparsePastEndTag(java.lang.String ns, + java.lang.String name) + +
+          Parse past end of element.
+ voidparsePastStartTag(java.lang.String ns, + java.lang.String name) + +
+          Parse past start of element.
+ voidparseToStartTag(java.lang.String ns, + java.lang.String name) + +
+          Parse to start of element.
+ voidpopObject() + +
+          Pop unmarshalled object from stack.
+ voidpushObject(java.lang.Object obj) + +
+          Push created object to unmarshalling stack.
+ voidpushTrackedObject(java.lang.Object obj) + +
+          Push created object to unmarshalling stack with position tracking.
+ voidregisterBackFill(int index, + BackFillReference fill) + +
+          Register back fill item for last parsed ID value.
+ voidregisterBackFill(java.lang.String id, + int index, + BackFillReference fill) + +
+          Register back fill item for undefined ID value.
+ voidremoveUnmarshalling(int index) + +
+          Undefine unmarshalling for element.
+ voidreset() + +
+          Reset unmarshalling information.
+ voidsetDocument(java.io.InputStream ins, + java.lang.String enc) + +
+          Set document to be parsed from stream.
+ voidsetDocument(java.io.InputStream ins, + java.lang.String enc, + boolean nsa) + +
+          Set document to be parsed from stream.
+ voidsetDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + +
+          Set named document to be parsed from stream.
+ voidsetDocument(java.io.Reader rdr) + +
+          Set document to be parsed from reader.
+ voidsetDocument(java.io.Reader rdr, + boolean nsa) + +
+          Set document to be parsed from reader.
+ voidsetDocument(java.io.Reader rdr, + java.lang.String name) + +
+          Set named document to be parsed from reader.
+ voidsetFromContext(UnmarshallingContext parent) + +
+          Initializes the context to use the same parser and document as another + unmarshalling context.
+ voidskipElement() + +
+          Skip past current element.
+ voidthrowEndTagNameError(java.lang.String ns, + java.lang.String name) + +
+          Throw exception for expected element end tag not found.
+ voidthrowException(java.lang.String msg) + +
+          Throw exception with position information.
+ voidthrowException(java.lang.String msg, + java.lang.Exception ex) + +
+          Throw exception with position information and nested exception.
+ voidthrowStartTagException(java.lang.String msg) + +
+          Throw exception with start tag and position information.
+ voidthrowStartTagException(java.lang.String msg, + java.lang.Exception ex) + +
+          Throw exception with start tag, position information, and nested + exception.
+ voidthrowStartTagNameError(java.lang.String ns, + java.lang.String name) + +
+          Throw exception for expected element start tag not found.
+ java.lang.StringtoEnd() + +
+          Parse to end tag.
+ java.lang.StringtoStart() + +
+          Parse to start tag.
+ inttoTag() + +
+          Parse to start or end tag.
+ java.lang.ObjectunmarshalDocument(java.io.InputStream ins, + java.lang.String enc) + +
+          Unmarshal document from stream to object.
+ java.lang.ObjectunmarshalDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + +
+          Unmarshal named document from stream to object.
+ java.lang.ObjectunmarshalDocument(java.io.Reader rdr) + +
+          Unmarshal document from reader to object.
+ java.lang.ObjectunmarshalDocument(java.io.Reader rdr, + java.lang.String name) + +
+          Unmarshal named document from reader to object.
+ java.lang.ObjectunmarshalElement() + +
+          Unmarshal required element.
+ java.lang.ObjectunmarshalElement(java.lang.Class clas) + +
+          Unmarshal required element of specified type.
+ java.lang.ObjectunmarshalOptionalElement() + +
+          Unmarshal optional element.
+private  booleanverifyNamespace(java.lang.String ns) + +
+          Verify namespace.
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+START_DOCUMENT

+
+public static final int START_DOCUMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+END_DOCUMENT

+
+public static final int END_DOCUMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+START_TAG

+
+public static final int START_TAG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+END_TAG

+
+public static final int END_TAG
+
+
+
See Also:
Constant Field Values
+
+
+ +

+TEXT

+
+public static final int TEXT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+CDSECT

+
+public static final int CDSECT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+ENTITY_REF

+
+public static final int ENTITY_REF
+
+
+
See Also:
Constant Field Values
+
+
+ +

+IGNORABLE_WHITESPACE

+
+public static final int IGNORABLE_WHITESPACE
+
+
+
See Also:
Constant Field Values
+
+
+ +

+PROCESSING_INSTRUCTION

+
+public static final int PROCESSING_INSTRUCTION
+
+
+
See Also:
Constant Field Values
+
+
+ +

+COMMENT

+
+public static final int COMMENT
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DOCDECL

+
+public static final int DOCDECL
+
+
+
See Also:
Constant Field Values
+
+
+ +

+DEFAULT_PARSER_NAME

+
+private static final java.lang.String DEFAULT_PARSER_NAME
+
+
Default parser factory name when nothing else found. +

+

+
See Also:
Constant Field Values
+
+
+ +

+INITIAL_STACK_SIZE

+
+private static final int INITIAL_STACK_SIZE
+
+
Starting size for object stack. +

+

+
See Also:
Constant Field Values
+
+
+ +

+EMPTY_STRING_ARRAY

+
+private static final java.lang.String[] EMPTY_STRING_ARRAY
+
+
Empty array of strings. +

+

+
+
+
+ +

+s_factory

+
+private static org.xmlpull.v1.XmlPullParserFactory s_factory
+
+
Factory used for constructing parser instances. +

+

+
+
+
+ +

+m_factory

+
+private IBindingFactory m_factory
+
+
Binding factory used to create this unmarshaller. +

+

+
+
+
+ +

+m_streamWrapper

+
+private InputStreamWrapper m_streamWrapper
+
+
Wrapper for supplied input stream. +

+

+
+
+
+ +

+m_parser

+
+private org.xmlpull.v1.XmlPullParser m_parser
+
+
Parser in use. +

+

+
+
+
+ +

+m_docName

+
+private java.lang.String m_docName
+
+
Document name (may be null). +

+

+
+
+
+ +

+m_unmarshallerClasses

+
+protected java.lang.String[] m_unmarshallerClasses
+
+
Unmarshaller classes for mapping definition (null for + mappings out of context). +

+

+
+
+
+ +

+m_unmarshallers

+
+protected IUnmarshaller[] m_unmarshallers
+
+
Unmarshallers for classes in mapping definition (lazy create of actual + unmarshaller instances) +

+

+
+
+
+ +

+m_namespaces

+
+protected java.lang.String[] m_namespaces
+
+
Namespaces for elements associated with class mappings. +

+

+
+
+
+ +

+m_names

+
+protected java.lang.String[] m_names
+
+
Names for elements associated with class mappings. +

+

+
+
+
+ +

+m_globalCount

+
+protected int m_globalCount
+
+
Number of classes with global unmarshallers. +

+

+
+
+
+ +

+m_idMaps

+
+protected java.util.HashMap[] m_idMaps
+
+
ID maps for finding references. +

+

+
+
+
+ +

+m_idClasses

+
+protected java.lang.String[] m_idClasses
+
+
Class names of referenced types (null unless class-specific + IDs used). +

+

+
+
+
+ +

+m_stackDepth

+
+protected int m_stackDepth
+
+
Current unmarshalling stack depth. +

+

+
+
+
+ +

+m_objectStack

+
+protected java.lang.Object[] m_objectStack
+
+
Stack of objects being unmarshalled. +

+

+
+
+
+ +

+m_unmarshalMap

+
+protected java.util.HashMap m_unmarshalMap
+
+
Mapping from element name to class index. If only a single namespace + is defined for a particular local name the value for that name in + this table is the Integer index of the associated class. If multiple + namespaces are defined using the same local name the value is an + ArrayList of Integer indexes. This is a high-overhead construct, so + lazy construction is used - it's built the first time needed, then kept + up to date thereafter. +

+

+
+
+
+ +

+m_indexes

+
+protected java.lang.Integer[] m_indexes
+
+
Wrapped index values used with unmarshalling map. +

+

+
+
+
+ +

+m_idref

+
+protected java.lang.String m_idref
+
+
Last IDREF value parsed. +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+UnmarshallingContext

+
+public UnmarshallingContext(int nmap,
+                            java.lang.String[] umcs,
+                            java.lang.String[] nss,
+                            java.lang.String[] names,
+                            java.lang.String[] idcs,
+                            IBindingFactory ifact)
+
+
Constructor. Builds the actual parser and initializes internal data + structures. +

+

+
Parameters:
nmap - number of mapping definitions included
umcs - names of unmarshaller classes for indexes with fixed + unmarshallers (as opposed to mapping slots, which may be overridden; + reference kept, must be constant)
nss - namespaces for elements of classes with global definitions
names - names for elements of classes with global definitions
idcs - array of class names with IDs (null if no IDs or + global IDs)
ifact - binding factory creating this unmarshaller
+
+
+ +

+UnmarshallingContext

+
+public UnmarshallingContext()
+
+
Default constructor. This can be used for creating a context outside of + the generated code for special purposes. +

+

+ + + + + + + + +
+Method Detail
+ +

+createParser

+
+private void createParser(boolean nsa)
+                   throws JiBXException
+
+
Create parser if one does not already exist. +

+

+
+
+
+
Parameters:
nsa - enable namespace processing by parser flag +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+buildNameString

+
+public static java.lang.String buildNameString(java.lang.String ns,
+                                               java.lang.String name)
+
+
Build name with optional namespace. Just returns the appropriate + name format. +

+

+
+
+
+
Parameters:
ns - namespace URI of name
name - local name part of name +
Returns:
formatted name string
+
+
+
+ +

+currentNameString

+
+public java.lang.String currentNameString()
+
+
Build current element name, with optional namespace. +

+

+
+
+
+ +
Returns:
formatted name string
+
+
+
+ +

+buildPositionString

+
+public java.lang.String buildPositionString()
+
+
Build current parse input position description. +

+

+
+
+
+ +
Returns:
text description of current parse position
+
+
+
+ +

+throwStartTagNameError

+
+public void throwStartTagNameError(java.lang.String ns,
+                                   java.lang.String name)
+                            throws JiBXException
+
+
Throw exception for expected element start tag not found. +

+

+
+
+
+
Parameters:
ns - namespace URI of name
name - local name part of name +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+throwEndTagNameError

+
+public void throwEndTagNameError(java.lang.String ns,
+                                 java.lang.String name)
+                          throws JiBXException
+
+
Throw exception for expected element end tag not found. +

+

+
+
+
+
Parameters:
ns - namespace URI of name
name - local name part of name +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+advance

+
+private void advance()
+              throws JiBXException
+
+
Advance to next parse item. This wraps the base parser call in order to + catch and handle exceptions. +

+

+
+
+
+ +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+verifyNamespace

+
+private boolean verifyNamespace(java.lang.String ns)
+
+
Verify namespace. This is a simple utility method that allows multiple + representations for the empty namespace as a convenience for generated + code. +

+

+
+
+
+
Parameters:
ns - namespace URI expected (may be null + or the empty string for the empty namespace) +
Returns:
true if the current namespace matches that + expected, false if not
+
+
+
+ +

+getAttributeValue

+
+private java.lang.String getAttributeValue(java.lang.String ns,
+                                           java.lang.String name)
+
+
Get attribute value from parser. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute value text, or null if missing
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.InputStream ins,
+                        java.lang.String enc,
+                        boolean nsa)
+                 throws JiBXException
+
+
Set document to be parsed from stream. This call is not part of the + interface definition, but is supplied to allow direct control of the + namespace processing by the compiler. The option of disabling namespaces + should be considered experimental and may not be supported in the future. +

+

+
+
+
+
Parameters:
ins - stream supplying document data
enc - document input encoding, or null if to be + determined by parser
nsa - enable namespace processing for parser flag +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.InputStream ins,
+                        java.lang.String enc)
+                 throws JiBXException
+
+
Set document to be parsed from stream. +

+

+
Specified by:
setDocument in interface IUnmarshallingContext
+
+
+
Parameters:
ins - stream supplying document data
enc - document input encoding, or null if to be + determined by parser +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.Reader rdr,
+                        boolean nsa)
+                 throws JiBXException
+
+
Set document to be parsed from reader. This call is not part of the + interface definition, but is supplied to allow direct control of the + namespace processing by the compiler. The option of disabling namespaces + should be considered experimental and may not be supported in the future. +

+

+
+
+
+
Parameters:
rdr - reader supplying document data
nsa - enable namespace processing for parser flag +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.Reader rdr)
+                 throws JiBXException
+
+
Set document to be parsed from reader. +

+

+
Specified by:
setDocument in interface IUnmarshallingContext
+
+
+
Parameters:
rdr - reader supplying document data +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.InputStream ins,
+                        java.lang.String name,
+                        java.lang.String enc)
+                 throws JiBXException
+
+
Set named document to be parsed from stream. +

+

+
Specified by:
setDocument in interface IUnmarshallingContext
+
+
+
Parameters:
ins - stream supplying document data
name - document name
enc - document input encoding, or null if to be + determined by parser +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setDocument

+
+public void setDocument(java.io.Reader rdr,
+                        java.lang.String name)
+                 throws JiBXException
+
+
Set named document to be parsed from reader. +

+

+
Specified by:
setDocument in interface IUnmarshallingContext
+
+
+
Parameters:
rdr - reader supplying document data
name - document name +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+setFromContext

+
+public void setFromContext(UnmarshallingContext parent)
+
+
Initializes the context to use the same parser and document as another + unmarshalling context. This method is designed for use when an initial + context needs to create and invoke a secondary context in the course of + an unmarshalling operation. +

+

+
+
+
+
Parameters:
parent - context supplying parser and document to be unmarshalled
+
+
+
+ +

+reset

+
+public void reset()
+
+
Reset unmarshalling information. This releases all references to + unmarshalled objects and prepares the context for potential reuse. + It is automatically called when input is set. +

+

+
Specified by:
reset in interface IUnmarshallingContext
+
+
+
+
+
+
+ +

+toStart

+
+public java.lang.String toStart()
+                         throws JiBXException
+
+
Parse to start tag. Ignores character data seen prior to a start tag, but + throws exception if an end tag or the end of the document is seen before + a start tag. Leaves the parser positioned at the start tag. +

+

+
+
+
+ +
Returns:
element name of start tag found +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+toEnd

+
+public java.lang.String toEnd()
+                       throws JiBXException
+
+
Parse to end tag. Ignores character data seen prior to an end tag, but + throws exception if a start tag or the end of the document is seen before + an end tag. Leaves the parser positioned at the end tag. +

+

+
+
+
+ +
Returns:
element name of end tag found +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+toTag

+
+public int toTag()
+          throws JiBXException
+
+
Parse to start or end tag. If not currently positioned at a start or end + tag this first advances the parse to the next start or end tag. +

+

+
+
+
+ +
Returns:
parser event type for start tag or end tag +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+isAt

+
+public boolean isAt(java.lang.String ns,
+                    java.lang.String name)
+             throws JiBXException
+
+
Check if next tag is start of element. If not currently positioned at a + start or end tag this first advances the parse to the next start or end + tag. +

+

+
Specified by:
isAt in interface IUnmarshallingContext
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Returns:
true if at start of element with supplied name, + false if not +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+hasAttribute

+
+public boolean hasAttribute(java.lang.String ns,
+                            java.lang.String name)
+                     throws JiBXException
+
+
Check if attribute is present on current start tag. Throws an exception + if not currently positioned on a start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
true if named attribute is present, + false if not +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+hasAnyAttribute

+
+public boolean hasAnyAttribute(java.lang.String[] nss,
+                               java.lang.String[] names)
+                        throws JiBXException
+
+
Check if any of several attributes is present on current start tag. + Throws an exception if not currently positioned on a start tag. +

+

+
+
+
+
Parameters:
nss - namespace URIs for expected attributes (each may be + null or the empty string for the empty namespace)
names - attribute names expected +
Returns:
true if at least one of the named attributes is + present, false if not +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+checkAllowedAttributes

+
+public void checkAllowedAttributes(java.lang.String[] nss,
+                                   java.lang.String[] names)
+                            throws JiBXException
+
+
Check that only allowed attributes are present on current start tag. + Throws an exception if not currently positioned on a start tag, or if + an attribute is present which is not in the list. +

+

+
+
+
+
Parameters:
nss - namespace URIs for allowed attributes (each may be + null or the empty string for the empty namespace)
names - alphabetical list of attribute names expected (duplicates + names are ordered by namespace URI) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+matchStart

+
+private void matchStart(java.lang.String ns,
+                        java.lang.String name)
+                 throws JiBXException
+
+
Internal parse to expected start tag. Ignores character data seen prior + to a start tag, but throws exception if an end tag or the end of the + document is seen before a start tag. Leaves the parser positioned at the + start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseToStartTag

+
+public void parseToStartTag(java.lang.String ns,
+                            java.lang.String name)
+                     throws JiBXException
+
+
Parse to start of element. Ignores character data to next start or end + tag, but throws exception if an end tag is seen before a start tag, or if + the start tag seen does not match the expected name. Leaves the parse + positioned at the start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parsePastStartTag

+
+public void parsePastStartTag(java.lang.String ns,
+                              java.lang.String name)
+                       throws JiBXException
+
+
Parse past start of element. Ignores character data to next start or end + tag, but throws exception if an end tag is seen before a start tag, or if + the start tag seen does not match the expected name. Leaves the parse + positioned following the start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseIfStartTag

+
+public boolean parseIfStartTag(java.lang.String ns,
+                               java.lang.String name)
+                        throws JiBXException
+
+
Parse past start of element. Ignores character data to next start or end + tag, but throws exception if an end tag is seen before a start tag, or if + the start tag seen does not match the expected name. Leaves the parse + positioned following the start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parsePastCurrentEndTag

+
+public void parsePastCurrentEndTag(java.lang.String ns,
+                                   java.lang.String name)
+                            throws JiBXException
+
+
Parse past current end of element. Ignores character data to next start + or end tag, but throws exception if a start tag is seen before a end tag, + or if the end tag seen does not match the expected name. Leaves the parse + positioned following the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parsePastEndTag

+
+public void parsePastEndTag(java.lang.String ns,
+                            java.lang.String name)
+                     throws JiBXException
+
+
Parse past end of element. If currently at a start tag parses past that + start tag, then ignores character data to next start or end tag, and + throws exception if a start tag is seen before a end tag, or if + the end tag seen does not match the expected name. Leaves the parse + positioned following the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
name - element name expected +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+isEnd

+
+public boolean isEnd()
+              throws JiBXException
+
+
Check if next tag is an end tag. If not currently positioned at a + start or end tag this first advances the parse to the next start or + end tag. +

+

+
Specified by:
isEnd in interface IUnmarshallingContext
+
+
+ +
Returns:
true if at end of element, false if + at start +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+accumulateText

+
+public java.lang.String accumulateText()
+                                throws JiBXException
+
+
Accumulate text content. This skips past comments and processing + instructions, and consolidates text and entities to a single string. Any + unexpanded entity references found are treated as errors. +

+

+
+
+
+ +
Returns:
consolidated text string (empty string if no text components) +
Throws: +
JiBXException - on error in unmarshalling
+
+
+
+ +

+parseContentText

+
+public java.lang.String parseContentText()
+                                  throws JiBXException
+
+
Parse required text content. Assumes the parse is already positioned at + the text content, so just returns the text. +

+

+
+
+
+ +
Returns:
content text found +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseContentText

+
+public java.lang.String parseContentText(java.lang.String ns,
+                                         java.lang.String tag)
+                                  throws JiBXException
+
+
Parse past end of element, returning optional text content. Assumes + you've already parsed past the start tag of the element, so it just looks + for text content followed by the end tag, and returns with the parser + positioned after the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseContentInt

+
+public int parseContentInt(java.lang.String ns,
+                           java.lang.String tag)
+                    throws JiBXException
+
+
Parse past end of element, returning integer value of + content. Assumes you've already parsed past the start tag of the + element, so it just looks for text content followed by the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementText

+
+public java.lang.String parseElementText(java.lang.String ns,
+                                         java.lang.String tag)
+                                  throws JiBXException
+
+
Parse entire element, returning text content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementText

+
+public java.lang.String parseElementText(java.lang.String ns,
+                                         java.lang.String tag,
+                                         java.lang.String dflt)
+                                  throws JiBXException
+
+
Parse entire element, returning optional text content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default text if the element is not found. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default text value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+attributeText

+
+public java.lang.String attributeText(java.lang.String ns,
+                                      java.lang.String name)
+                               throws JiBXException
+
+
Get text value of attribute from current start tag. + Throws an exception if the attribute value is not found in the start + tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute value text +
Throws: +
JiBXException - if attribute not present
+
+
+
+ +

+attributeText

+
+public java.lang.String attributeText(java.lang.String ns,
+                                      java.lang.String name,
+                                      java.lang.String dflt)
+
+
Get text value of optional attribute from current start + tag. If the attribute is not present the supplied default value is + returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute value text
+
+
+
+ +

+findID

+
+public java.lang.Object findID(java.lang.String id,
+                               int index)
+                        throws JiBXException
+
+
Find the object corresponding to an ID. This method just handles the + lookup and checks the object type. +

+

+
+
+
+
Parameters:
id - ID text
index - expected reference type index +
Returns:
object corresponding to IDREF, or null if not + yet defined +
Throws: +
JiBXException - on any error
+
+
+
+ +

+findDefinedID

+
+public java.lang.Object findDefinedID(java.lang.String id,
+                                      int index)
+                               throws JiBXException
+
+
Find previously defined object corresponding to an ID. This does the + lookup and checks that the referenced object has been defined. +

+

+
+
+
+
Parameters:
id - ID text
index - expected reference type index +
Returns:
object corresponding to IDREF +
Throws: +
JiBXException - on any error
+
+
+
+ +

+parseElementForwardIDREF

+
+public java.lang.Object parseElementForwardIDREF(java.lang.String ns,
+                                                 java.lang.String tag,
+                                                 int index)
+                                          throws JiBXException
+
+
Parse entire element, returning object (if defined yet) corresponding + to content interpreted as IDREF. Expects to find the element start tag, + text content, and end tag, in that order, and returns with the parser + positioned following the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - attribute name expected
index - expected reference type index +
Returns:
object corresponding to IDREF, or null if not + yet defined +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+attributeForwardIDREF

+
+public java.lang.Object attributeForwardIDREF(java.lang.String ns,
+                                              java.lang.String name,
+                                              int index)
+                                       throws JiBXException
+
+
Get object (if defined yet) corresponding to IDREF attribute from + current start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
index - expected reference type index +
Returns:
object corresponding to IDREF, or null if not + yet defined +
Throws: +
JiBXException - if attribute not present, or ID mapped to a + different type of object than expected
+
+
+
+ +

+parseElementExistingIDREF

+
+public java.lang.Object parseElementExistingIDREF(java.lang.String ns,
+                                                  java.lang.String tag,
+                                                  int index)
+                                           throws JiBXException
+
+
Parse entire element, returning previously defined object corresponding + to content interpreted as IDREF. Expects to find the element start tag, + text content, and end tag, in that order, and returns with the parser + positioned following the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - attribute name expected
index - expected reference type index +
Returns:
object corresponding to IDREF +
Throws: +
JiBXException - if attribute not present, ID not defined, or + mapped to a different type of object than expected
+
+
+
+ +

+attributeExistingIDREF

+
+public java.lang.Object attributeExistingIDREF(java.lang.String ns,
+                                               java.lang.String name,
+                                               int index)
+                                        throws JiBXException
+
+
Get previously defined object corresponding to IDREF attribute from + current start tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
index - expected reference type index +
Returns:
object corresponding to IDREF +
Throws: +
JiBXException - if attribute not present, ID not defined, or + mapped to a different type of object than expected
+
+
+
+ +

+attributeInt

+
+public int attributeInt(java.lang.String ns,
+                        java.lang.String name)
+                 throws JiBXException
+
+
Get integer value of attribute from current start tag. + Throws an exception if the attribute is not found in the start + tag, or if it is not a valid integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute integer value +
Throws: +
JiBXException - if attribute not present or not a valid integer + value
+
+
+
+ +

+attributeInt

+
+public int attributeInt(java.lang.String ns,
+                        java.lang.String name,
+                        int dflt)
+                 throws JiBXException
+
+
Get integer value of optional attribute from current + start tag. If the attribute is not present the supplied default value + is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute integer value +
Throws: +
JiBXException - if attribute value is not a valid integer
+
+
+
+ +

+parseElementInt

+
+public int parseElementInt(java.lang.String ns,
+                           java.lang.String tag)
+                    throws JiBXException
+
+
Parse entire element, returning integer value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseElementInt

+
+public int parseElementInt(java.lang.String ns,
+                           java.lang.String tag,
+                           int dflt)
+                    throws JiBXException
+
+
Parse entire optional element, returning integer value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is missing or + has no content. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertEnum

+
+public int convertEnum(java.lang.String target,
+                       java.lang.String[] enums,
+                       int[] vals)
+                throws JiBXException
+
+
Find required text value in enumeration. Looks up and returns the + enumeration value corresponding to the target text. +

+

+
+
+
+
Parameters:
target - text to be found in enumeration
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null) +
Returns:
enumeration value for target text +
Throws: +
JiBXException - if target text not found in enumeration
+
+
+
+ +

+convertEnum

+
+public int convertEnum(java.lang.String target,
+                       java.lang.String[] enums,
+                       int[] vals,
+                       int dflt)
+                throws JiBXException
+
+
Find optional text value in enumeration. Looks up and returns the + enumeration value corresponding to the target text, or the default + value if the text is null. +

+

+
+
+
+
Parameters:
target - text to be found in enumeration (may be null)
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null)
dflt - default value returned if target text is null +
Returns:
enumeration value for target text +
Throws: +
JiBXException - if target text not found in enumeration
+
+
+
+ +

+attributeEnumeration

+
+public int attributeEnumeration(java.lang.String ns,
+                                java.lang.String name,
+                                java.lang.String[] enums,
+                                int[] vals)
+                         throws JiBXException
+
+
Get enumeration attribute value from current start tag. + Throws an exception if the attribute value is not found in the start + tag or the text does not match a value defined in the enumeration table. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null) +
Returns:
enumeration value for target text +
Throws: +
JiBXException - if attribute not present or value not found in + enumeration list
+
+
+
+ +

+attributeEnumeration

+
+public int attributeEnumeration(java.lang.String ns,
+                                java.lang.String name,
+                                java.lang.String[] enums,
+                                int[] vals,
+                                int dflt)
+                         throws JiBXException
+
+
Get optional enumeration attribute value from current start tag. + Throws an exception if the attribute value is present but does not match + a value defined in the enumeration table. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null)
dflt - default value returned if attribute is not present +
Returns:
enumeration value for target text +
Throws: +
JiBXException - if attribute not present or value not found in + enumeration list
+
+
+
+ +

+parseContentEnumeration

+
+public int parseContentEnumeration(java.lang.String ns,
+                                   java.lang.String tag,
+                                   java.lang.String[] enums,
+                                   int[] vals)
+                            throws JiBXException
+
+
Parse past end of element, returning enumeration value of content. + Assumes you've already parsed past the start tag of the element, so it + just looks for text content followed by the end tag, and returns with the + parser positioned after the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null) +
Returns:
enumeration value for element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementEnumeration

+
+public int parseElementEnumeration(java.lang.String ns,
+                                   java.lang.String tag,
+                                   java.lang.String[] enums,
+                                   int[] vals,
+                                   int dflt)
+                            throws JiBXException
+
+
Parse entire element, returning enumeration value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if no content is present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
enums - ordered array of texts included in enumeration
vals - array of values to be returned for corresponding text match + positions (position returned directly if this is null)
dflt - default value +
Returns:
enumeration value for element text +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertByte

+
+public byte convertByte(java.lang.String text)
+                 throws JiBXException
+
+
Convert byte value with exception wrapper. This internal method is used + by all the byte unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted byte value +
Throws: +
JiBXException - if not a valid byte value
+
+
+
+ +

+attributeByte

+
+public byte attributeByte(java.lang.String ns,
+                          java.lang.String name)
+                   throws JiBXException
+
+
Get byte value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute byte value +
Throws: +
JiBXException - if attribute not present or not a valid byte value
+
+
+
+ +

+attributeByte

+
+public byte attributeByte(java.lang.String ns,
+                          java.lang.String name,
+                          byte dflt)
+                   throws JiBXException
+
+
Get byte value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute byte value +
Throws: +
JiBXException - if attribute value is not a valid byte
+
+
+
+ +

+parseContentByte

+
+public byte parseContentByte(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse past end of element, returning byte value of content. Assumes + you've already parsed past the start tag of the element, so it just looks + for text content followed by the end tag, and returns with the parser + positioned after the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementByte

+
+public byte parseElementByte(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse entire element, returning byte value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseElementByte

+
+public byte parseElementByte(java.lang.String ns,
+                             java.lang.String tag,
+                             byte dflt)
+                      throws JiBXException
+
+
Parse entire element, returning byte value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if no content is present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertShort

+
+public short convertShort(java.lang.String text)
+                   throws JiBXException
+
+
Convert short value with exception wrapper. This internal method is used + by all the short unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted short value +
Throws: +
JiBXException - if not a valid short value
+
+
+
+ +

+attributeShort

+
+public short attributeShort(java.lang.String ns,
+                            java.lang.String name)
+                     throws JiBXException
+
+
Get short value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute short value +
Throws: +
JiBXException - if attribute not present or not a valid short value
+
+
+
+ +

+attributeShort

+
+public short attributeShort(java.lang.String ns,
+                            java.lang.String name,
+                            short dflt)
+                     throws JiBXException
+
+
Get short value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute short value +
Throws: +
JiBXException - if attribute value is not a valid short
+
+
+
+ +

+parseContentShort

+
+public short parseContentShort(java.lang.String ns,
+                               java.lang.String tag)
+                        throws JiBXException
+
+
Parse past end of element, returning short value of content. Assumes + you've already parsed past the start tag of the element, so it just looks + for text content followed by the end tag, and returns with the parser + positioned after the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementShort

+
+public short parseElementShort(java.lang.String ns,
+                               java.lang.String tag)
+                        throws JiBXException
+
+
Parse entire element, returning short value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseElementShort

+
+public short parseElementShort(java.lang.String ns,
+                               java.lang.String tag,
+                               short dflt)
+                        throws JiBXException
+
+
Parse entire element, returning short value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if no content is present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertChar

+
+public char convertChar(java.lang.String text)
+                 throws JiBXException
+
+
Convert char value with exception wrapper. This internal method is used + by all the char unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted char value +
Throws: +
JiBXException - if not a valid char value
+
+
+
+ +

+attributeChar

+
+public char attributeChar(java.lang.String ns,
+                          java.lang.String name)
+                   throws JiBXException
+
+
Get char value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute char value +
Throws: +
JiBXException - if attribute not present or not a valid char value
+
+
+
+ +

+attributeChar

+
+public char attributeChar(java.lang.String ns,
+                          java.lang.String name,
+                          char dflt)
+                   throws JiBXException
+
+
Get char value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute char value +
Throws: +
JiBXException - if attribute value is not a valid char
+
+
+
+ +

+parseContentChar

+
+public char parseContentChar(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse past end of element, returning char value of content. Assumes + you've already parsed past the start tag of the element, so it just looks + for text content followed by the end tag, and returns with the parser + positioned after the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementChar

+
+public char parseElementChar(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse entire element, returning char value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parseElementChar

+
+public char parseElementChar(java.lang.String ns,
+                             java.lang.String tag,
+                             char dflt)
+                      throws JiBXException
+
+
Parse entire element, returning char value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is not present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertLong

+
+public long convertLong(java.lang.String text)
+                 throws JiBXException
+
+
Convert long value with exception wrapper. This internal method is used + by all the long unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted long value +
Throws: +
JiBXException - if not a valid long value
+
+
+
+ +

+attributeLong

+
+public long attributeLong(java.lang.String ns,
+                          java.lang.String name)
+                   throws JiBXException
+
+
Get long value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute long value +
Throws: +
JiBXException - if attribute not present or not a valid long value
+
+
+
+ +

+attributeLong

+
+public long attributeLong(java.lang.String ns,
+                          java.lang.String name,
+                          long dflt)
+                   throws JiBXException
+
+
Get long value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute long value +
Throws: +
JiBXException - if attribute value is not a valid long
+
+
+
+ +

+parseElementLong

+
+public long parseElementLong(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse past end of element, returning long value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementLong

+
+public long parseElementLong(java.lang.String ns,
+                             java.lang.String tag,
+                             long dflt)
+                      throws JiBXException
+
+
Parse entire element, returning long value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is not present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertBoolean

+
+public boolean convertBoolean(java.lang.String text)
+                       throws JiBXException
+
+
Convert boolean value. This internal method is used by all the boolean + unmarshalling calls. It accepts "true" or "1" as equivalent, and "false" + or "0" as equivalent, and throws exceptions for anything else. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted boolean value +
Throws: +
JiBXException - if not a valid boolean value
+
+
+
+ +

+attributeBoolean

+
+public boolean attributeBoolean(java.lang.String ns,
+                                java.lang.String name)
+                         throws JiBXException
+
+
Get boolean value of attribute from current start tag. Throws an + exception if the attribute is not found in the start tag, or if it is + not a valid integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute boolean value +
Throws: +
JiBXException - if attribute not present or not a valid boolean + value
+
+
+
+ +

+attributeBoolean

+
+public boolean attributeBoolean(java.lang.String ns,
+                                java.lang.String name,
+                                boolean dflt)
+                         throws JiBXException
+
+
Get boolean value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute boolean value +
Throws: +
JiBXException - if attribute value is not a valid boolean
+
+
+
+ +

+parseElementBoolean

+
+public boolean parseElementBoolean(java.lang.String ns,
+                                   java.lang.String tag)
+                            throws JiBXException
+
+
Parse entire element, returning boolean value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementBoolean

+
+public boolean parseElementBoolean(java.lang.String ns,
+                                   java.lang.String tag,
+                                   boolean dflt)
+                            throws JiBXException
+
+
Parse entire element, returning boolean value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is not present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertFloat

+
+public float convertFloat(java.lang.String text)
+                   throws JiBXException
+
+
Convert float value with exception wrapper. This internal method is used + by all the float unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted float value +
Throws: +
JiBXException - if not a valid float value
+
+
+
+ +

+attributeFloat

+
+public float attributeFloat(java.lang.String ns,
+                            java.lang.String name)
+                     throws JiBXException
+
+
Get float value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute float value +
Throws: +
JiBXException - if attribute not present or not a valid float value
+
+
+
+ +

+attributeFloat

+
+public float attributeFloat(java.lang.String ns,
+                            java.lang.String name,
+                            float dflt)
+                     throws JiBXException
+
+
Get float value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute float value +
Throws: +
JiBXException - if attribute value is not a valid float
+
+
+
+ +

+parseElementFloat

+
+public float parseElementFloat(java.lang.String ns,
+                               java.lang.String tag)
+                        throws JiBXException
+
+
Parse past end of element, returning float value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementFloat

+
+public float parseElementFloat(java.lang.String ns,
+                               java.lang.String tag,
+                               float dflt)
+                        throws JiBXException
+
+
Parse entire element, returning float value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is not present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertDouble

+
+public double convertDouble(java.lang.String text)
+                     throws JiBXException
+
+
Convert double value with exception wrapper. This internal method is used + by all the double unmarshalling calls. It adds position information to + any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted double value +
Throws: +
JiBXException - if not a valid double value
+
+
+
+ +

+attributeDouble

+
+public double attributeDouble(java.lang.String ns,
+                              java.lang.String name)
+                       throws JiBXException
+
+
Get double value of attribute from current start tag. Throws an exception + if the attribute is not found in the start tag, or if it is not a valid + integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute double value +
Throws: +
JiBXException - if attribute not present or not a valid double + value
+
+
+
+ +

+attributeDouble

+
+public double attributeDouble(java.lang.String ns,
+                              java.lang.String name,
+                              double dflt)
+                       throws JiBXException
+
+
Get double value of optional attribute from current start tag. If the + attribute is not present the supplied default value is returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute double value +
Throws: +
JiBXException - if attribute value is not a valid double
+
+
+
+ +

+parseElementDouble

+
+public double parseElementDouble(java.lang.String ns,
+                                 java.lang.String tag)
+                          throws JiBXException
+
+
Parse past end of element, returning double value of content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementDouble

+
+public double parseElementDouble(java.lang.String ns,
+                                 java.lang.String tag,
+                                 double dflt)
+                          throws JiBXException
+
+
Parse entire element, returning double value of optional content. + Expects to find the element start tag, text content, and end tag, + in that order, and returns with the parser positioned following + the end tag. Returns the default value if the element is not present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+convertDate

+
+public java.util.Date convertDate(java.lang.String text)
+                           throws JiBXException
+
+
Convert java.util.Date value with exception wrapper. This + internal method is used by all the Date unmarshalling calls. It adds + position information to any exceptions that occur. +

+

+
+
+
+
Parameters:
text - text for value to be converted +
Returns:
converted Date value +
Throws: +
JiBXException - if not a valid Date value
+
+
+
+ +

+attributeDate

+
+public java.util.Date attributeDate(java.lang.String ns,
+                                    java.lang.String name)
+                             throws JiBXException
+
+
Get java.util.Date value of attribute from current start + tag. Throws an exception if the attribute is not found in the start tag, + or if it is not a valid integer value. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected +
Returns:
attribute Date value +
Throws: +
JiBXException - if attribute not present or not a valid Date + value
+
+
+
+ +

+attributeDate

+
+public java.util.Date attributeDate(java.lang.String ns,
+                                    java.lang.String name,
+                                    java.util.Date dflt)
+                             throws JiBXException
+
+
Get java.util.Date value of optional attribute from current + start tag. If the attribute is not present the supplied default value is + returned instead. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected attribute (may be null + or the empty string for the empty namespace)
name - attribute name expected
dflt - value to be returned if attribute is not present +
Returns:
attribute Date value +
Throws: +
JiBXException - if attribute value is not a valid Date
+
+
+
+ +

+parseElementDate

+
+public java.util.Date parseElementDate(java.lang.String ns,
+                                       java.lang.String tag)
+                                throws JiBXException
+
+
Parse past end of element, returning java.util.Date value + of content. Expects to find the element start tag, text content, + and end tag, in that order, and returns with the parser positioned + following the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Returns:
converted value from element text +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+parseElementDate

+
+public java.util.Date parseElementDate(java.lang.String ns,
+                                       java.lang.String tag,
+                                       java.util.Date dflt)
+                                throws JiBXException
+
+
Parse entire element, returning java.util.Date value of + optional content. Expects to find the element start tag, text content, + and end tag, in that order, and returns with the parser positioned + following the end tag. Returns the default value if the element is not + present. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected
dflt - default value +
Returns:
content text from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+registerBackFill

+
+public void registerBackFill(java.lang.String id,
+                             int index,
+                             BackFillReference fill)
+                      throws JiBXException
+
+
Register back fill item for undefined ID value. This adds a holder to + the mapping table if not already present, then adds the back fill item + to the holder. +

+

+
+
+
+
Parameters:
id - target undefined ID value
index - target reference type index
fill - back fill item +
Throws: +
JiBXException - if attribute not present, or ID already defined
+
+
+
+ +

+registerBackFill

+
+public void registerBackFill(int index,
+                             BackFillReference fill)
+                      throws JiBXException
+
+
Register back fill item for last parsed ID value. This adds a holder to + the mapping table if not already present, then adds the back fill item + to the holder. This form of call always applies to the last IDREF value + parsed (from either an element or an attribute). +

+

+
+
+
+
Parameters:
index - target reference type index
fill - back fill item +
Throws: +
JiBXException - if attribute not present, or ID already defined
+
+
+
+ +

+defineID

+
+public void defineID(java.lang.String id,
+                     int index,
+                     java.lang.Object obj)
+              throws JiBXException
+
+
Define object for ID. Adds the owning object to a map with the ID + value as key. Throws an exception if the object class does not match + that expected from forward references, or if another object has + previously been registered with the same ID. +

+

+
+
+
+
Parameters:
id - text ID value
index - ID class index number
obj - object corresponding to element +
Throws: +
JiBXException - if duplicate ID or wrong class
+
+
+
+ +

+mapUnmarshalling

+
+protected void mapUnmarshalling(int index)
+
+
Map unmarshalling for element. Adds the entry for a particular class + index to the unmarshalling map. +

+

+
+
+
+
Parameters:
index - class index for unmarshalling definition to be added
+
+
+
+ +

+addUnmarshalling

+
+public void addUnmarshalling(int index,
+                             java.lang.String ns,
+                             java.lang.String name,
+                             java.lang.String cname)
+
+
Define unmarshalling for element. Enables the unmarshalling definition + linking an element name (including namespace) with a handler. The + unmarshalling definitions use fixed indexes for each class, allowing + direct lookup of the unmarshaller when multiple versions are defined. +

+

+
+
+
+
Parameters:
index - class index for unmarshalling definition
ns - namespace for element (may be null + or the empty string for the empty namespace)
name - name for element
cname - name of class created by unmarshaller
+
+
+
+ +

+removeUnmarshalling

+
+public void removeUnmarshalling(int index)
+
+
Undefine unmarshalling for element. Disables the unmarshalling + definition for a particular class index. +

+

+
+
+
+
Parameters:
index - class index for unmarshalling definition
+
+
+
+ +

+getUnmarshaller

+
+public IUnmarshaller getUnmarshaller(int index)
+                              throws JiBXException
+
+
Find the unmarshaller for a particular class index in the current + context. +

+

+
Specified by:
getUnmarshaller in interface IUnmarshallingContext
+
+
+
Parameters:
index - class index for unmarshalling definition +
Returns:
unmarshalling handler for class +
Throws: +
JiBXException - if unable to create unmarshaller
+
+
+
+ +

+getUnmarshaller

+
+public IUnmarshaller getUnmarshaller(java.lang.String ns,
+                                     java.lang.String name)
+                              throws JiBXException
+
+
Find the unmarshaller for a particular element name (including + namespace) in the current context. +

+

+
+
+
+
Parameters:
ns - namespace for element (may be null + or the empty string for the empty namespace)
name - name for element +
Returns:
unmarshalling handler for element, or null if none + found +
Throws: +
JiBXException - if unable to create unmarshaller
+
+
+
+ +

+unmarshalOptionalElement

+
+public java.lang.Object unmarshalOptionalElement()
+                                          throws JiBXException
+
+
Unmarshal optional element. If not currently positioned at a start or + end tag this first advances the parse to the next start or end tag. +

+

+
+
+
+ +
Returns:
unmarshalled object from element, or null if end tag + rather than start tag seen +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+unmarshalElement

+
+public java.lang.Object unmarshalElement(java.lang.Class clas)
+                                  throws JiBXException
+
+
Unmarshal required element of specified type. If not currently positioned + at a start or end tag this first advances the parse to the next start or + end tag. The returned object will always be assignable to the specified + type. +

+

+
+
+
+
Parameters:
clas - expected class of unmarshalled object +
Returns:
unmarshalled object from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+unmarshalElement

+
+public java.lang.Object unmarshalElement()
+                                  throws JiBXException
+
+
Unmarshal required element. If not currently positioned at a start or + end tag this first advances the parse to the next start or end tag. +

+

+
Specified by:
unmarshalElement in interface IUnmarshallingContext
+
+
+ +
Returns:
unmarshalled object from element +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+parsePastElement

+
+public void parsePastElement(java.lang.String ns,
+                             java.lang.String tag)
+                      throws JiBXException
+
+
Parse past element, ignoring all content. This may be used while + positioned either before or on the element start tag. It checks if + currently positioned at the element start tag, and if so advances to the + next parse event. Then looks for the next end tag, ignoring character + data and skipping child elements. Leaves the parse positioned following + the end tag. +

+

+
+
+
+
Parameters:
ns - namespace URI for expected element (may be null + or the empty string for the empty namespace)
tag - element name expected +
Throws: +
JiBXException - on any error (possible wrapping other exception)
+
+
+
+ +

+getElementName

+
+public java.lang.String getElementName()
+                                throws JiBXException
+
+
Returns current element name. +

+

+
+
+
+ +
Returns:
local name part of name, or null if not at a start + or end tag +
Throws: +
JiBXException - if error from parser
+
+
+
+ +

+getElementNamespace

+
+public java.lang.String getElementNamespace()
+                                     throws JiBXException
+
+
Returns current element namespace URI. +

+

+
+
+
+ +
Returns:
namespace URI of name, or null if not at a start + or end tag +
Throws: +
JiBXException - if error from parser
+
+
+
+ +

+throwStartTagException

+
+public void throwStartTagException(java.lang.String msg)
+                            throws JiBXException
+
+
Throw exception with start tag and position information. +

+

+
+
+
+
Parameters:
msg - exception message text +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+throwStartTagException

+
+public void throwStartTagException(java.lang.String msg,
+                                   java.lang.Exception ex)
+                            throws JiBXException
+
+
Throw exception with start tag, position information, and nested + exception. +

+

+
+
+
+
Parameters:
msg - exception message text
ex - nested exception +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+throwException

+
+public void throwException(java.lang.String msg)
+                    throws JiBXException
+
+
Throw exception with position information. +

+

+
+
+
+
Parameters:
msg - exception message text +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+throwException

+
+public void throwException(java.lang.String msg,
+                           java.lang.Exception ex)
+                    throws JiBXException
+
+
Throw exception with position information and nested exception. +

+

+
+
+
+
Parameters:
msg - exception message text
ex - nested exception +
Throws: +
JiBXException - always thrown
+
+
+
+ +

+unmarshalDocument

+
+public java.lang.Object unmarshalDocument(java.io.InputStream ins,
+                                          java.lang.String enc)
+                                   throws JiBXException
+
+
Unmarshal document from stream to object. The effect of this is the same + as if setDocument(java.io.InputStream, java.lang.String, boolean) were called, followed by unmarshalElement(java.lang.Class) +

+

+
Specified by:
unmarshalDocument in interface IUnmarshallingContext
+
+
+
Parameters:
ins - stream supplying document data
enc - document input encoding, or null if to be + determined by parser +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+public java.lang.Object unmarshalDocument(java.io.Reader rdr)
+                                   throws JiBXException
+
+
Unmarshal document from reader to object. The effect of this is the same + as if setDocument(java.io.InputStream, java.lang.String, boolean) were called, followed by unmarshalElement(java.lang.Class) +

+

+
Specified by:
unmarshalDocument in interface IUnmarshallingContext
+
+
+
Parameters:
rdr - reader supplying document data +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+public java.lang.Object unmarshalDocument(java.io.InputStream ins,
+                                          java.lang.String name,
+                                          java.lang.String enc)
+                                   throws JiBXException
+
+
Unmarshal named document from stream to object. The effect of this is the + same as if setDocument(java.io.InputStream, java.lang.String, boolean) were called, followed by unmarshalElement(java.lang.Class) +

+

+
Specified by:
unmarshalDocument in interface IUnmarshallingContext
+
+
+
Parameters:
ins - stream supplying document data
name - document name
enc - document input encoding, or null if to be + determined by parser +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+unmarshalDocument

+
+public java.lang.Object unmarshalDocument(java.io.Reader rdr,
+                                          java.lang.String name)
+                                   throws JiBXException
+
+
Unmarshal named document from reader to object. The effect of this is the + same as if setDocument(java.io.InputStream, java.lang.String, boolean) were called, followed by unmarshalElement(java.lang.Class) +

+

+
Specified by:
unmarshalDocument in interface IUnmarshallingContext
+
+
+
Parameters:
rdr - reader supplying document data
name - document name +
Returns:
unmarshalled object +
Throws: +
JiBXException - if error creating parser
+
+
+
+ +

+getFactory

+
+public IBindingFactory getFactory()
+
+
Return the binding factory used to create this unmarshaller. +

+

+
+
+
+ +
Returns:
binding factory
+
+
+
+ +

+getDocumentName

+
+public java.lang.String getDocumentName()
+
+
Return the supplied document name. +

+

+
Specified by:
getDocumentName in interface IUnmarshallingContext
+
+
+ +
Returns:
supplied document name (null if none)
+
+
+
+ +

+getInputEncoding

+
+public java.lang.String getInputEncoding()
+
+
Return the input encoding, if known. This is only valid after parsing of + a document has been started. +

+

+
+
+
+ +
Returns:
input encoding (null if unknown)
+
+
+
+ +

+pushObject

+
+public void pushObject(java.lang.Object obj)
+
+
Push created object to unmarshalling stack. This must be called before + beginning the unmarshalling of the object. It is only called for objects + with structure, not for those converted directly to and from text. +

+

+
Specified by:
pushObject in interface IUnmarshallingContext
+
+
+
Parameters:
obj - object being unmarshalled
+
+
+
+ +

+pushTrackedObject

+
+public void pushTrackedObject(java.lang.Object obj)
+
+
Push created object to unmarshalling stack with position tracking. If the + object supports setting source location information, the location is also + set by this method. +

+

+
+
+
+
Parameters:
obj - object being unmarshalled
+
+
+
+ +

+popObject

+
+public void popObject()
+               throws JiBXException
+
+
Pop unmarshalled object from stack. +

+

+
Specified by:
popObject in interface IUnmarshallingContext
+
+
+ +
Throws: +
JiBXException - if no object on stack
+
+
+
+ +

+getStackDepth

+
+public int getStackDepth()
+
+
Get current unmarshalling object stack depth. This allows tracking + nested calls to unmarshal one object while in the process of + unmarshalling another object. The bottom item on the stack is always the + root object being unmarshalled. +

+

+
Specified by:
getStackDepth in interface IUnmarshallingContext
+
+
+ +
Returns:
number of objects in unmarshalling stack
+
+
+
+ +

+getStackObject

+
+public java.lang.Object getStackObject(int depth)
+
+
Get object from unmarshalling stack. This stack allows tracking nested + calls to unmarshal one object while in the process of unmarshalling + another object. The bottom item on the stack is always the root object + being unmarshalled. +

+

+
Specified by:
getStackObject in interface IUnmarshallingContext
+
+
+
Parameters:
depth - object depth in stack to be retrieved (must be in the range + of zero to the current depth minus one). +
Returns:
object from unmarshalling stack
+
+
+
+ +

+getStackTop

+
+public java.lang.Object getStackTop()
+
+
Get top object on unmarshalling stack. This is safe to call even when no + objects are on the stack. +

+

+
Specified by:
getStackTop in interface IUnmarshallingContext
+
+
+ +
Returns:
object from unmarshalling stack, or null if none
+
+
+
+ +

+getActiveNamespaceCount

+
+public int getActiveNamespaceCount()
+                            throws JiBXException
+
+
Get count of active namespaces. +

+

+
+
+
+ +
Returns:
number of active namespaces in stack +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getActiveNamespaceUri

+
+public java.lang.String getActiveNamespaceUri(int index)
+                                       throws JiBXException
+
+
Get URI for an active namespace. +

+

+
+
+
+
Parameters:
index - index number of namespace to be returned +
Returns:
URI for namespace at position +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getActiveNamespacePrefix

+
+public java.lang.String getActiveNamespacePrefix(int index)
+                                          throws JiBXException
+
+
Get prefix for an active namespace. +

+

+
+
+
+
Parameters:
index - stack position of namespace to be returned +
Returns:
prefix for namespace at position +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+skipElement

+
+public void skipElement()
+                 throws JiBXException
+
+
Skip past current element. +

+

+
+
+
+ +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+next

+
+public int next()
+         throws JiBXException
+
+
Advance to next major parse event. This wraps the base parser call in + order to catch and handle exceptions, and to preserve a reasonable level + of parser independence. +

+

+
+
+
+ +
Returns:
event type for next major parse event (START_TAG, TEXT, END_TAG, + or END_DOCUMENT) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+nextToken

+
+public int nextToken()
+              throws JiBXException
+
+
Advance to next parse event. This wraps the base parser call in order to + catch and handle exceptions, and to preserve a reasonable level of parser + independence. +

+

+
+
+
+ +
Returns:
event type for next parse event +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+currentEvent

+
+public int currentEvent()
+                 throws JiBXException
+
+
Get the current parse event type. This wraps the base parser call in + order to catch and handle exceptions, and to preserve a reasonable level + of parser independence. +

+

+
+
+
+ +
Returns:
event type for current parse event +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getName

+
+public java.lang.String getName()
+                         throws JiBXException
+
+
Get name associated with current parse event. +

+

+
+
+
+ +
Returns:
name text for name associated with event (START_ELEMENT, + END_ELEMENT, or ENTITY_REF only) +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getNamespace

+
+public java.lang.String getNamespace()
+                              throws JiBXException
+
+
Get namespace associated with current parse event. +

+

+
+
+
+ +
Returns:
URI for namespace associated with event (START_ELEMENT or + END_ELEMENT only), empty string if none +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getPrefix

+
+public java.lang.String getPrefix()
+                           throws JiBXException
+
+
Get namespace prefix associated with current parse event. +

+

+
+
+
+ +
Returns:
prefix for namespace associated with event (START_ELEMENT or + END_ELEMENT only), null if none +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getAttributeCount

+
+public int getAttributeCount()
+                      throws JiBXException
+
+
Get number of attributes for current START_ELEMENT event. The results are + undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+ +
Returns:
number of attributes, or -1 if not at START_ELEMENT +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getAttributeName

+
+public java.lang.String getAttributeName(int index)
+                                  throws JiBXException
+
+
Get attribute name for current START_ELEMENT event. The results are + undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+
Parameters:
index - index number of attribute to be returned +
Returns:
name of attribute at position +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getAttributeNamespace

+
+public java.lang.String getAttributeNamespace(int index)
+                                       throws JiBXException
+
+
Get attribute namespace for current START_ELEMENT event. The results are + undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+
Parameters:
index - index number of attribute to be returned +
Returns:
namespace URI of attribute at position, empty string if none +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getAttributePrefix

+
+public java.lang.String getAttributePrefix(int index)
+                                    throws JiBXException
+
+
Get attribute namespace prefix for current START_ELEMENT event. The + results are undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+
Parameters:
index - index number of attribute to be returned +
Returns:
prefix for namespace of attribute at position, null + if none +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getAttributeValue

+
+public java.lang.String getAttributeValue(int index)
+                                   throws JiBXException
+
+
Get attribute value for current START_ELEMENT event. The results are + undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+
Parameters:
index - index number of attribute to be returned +
Returns:
value of attribute at position +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getNamespaceCount

+
+public int getNamespaceCount()
+                      throws JiBXException
+
+
Get number of namespace declarations for current START_ELEMENT event. The + results are undefined if called when not at a START_ELEMENT event. +

+

+
+
+
+ +
Returns:
number of namespace declarations, or -1 if not at + START_ELEMENT +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getNamespaceUri

+
+public java.lang.String getNamespaceUri(int index)
+                                 throws JiBXException
+
+
Get namespace URI for namespace declaration on current START_ELEMENT + event. The results are undefined if called when not at a START_ELEMENT + event. +

+

+
+
+
+
Parameters:
index - index number of declaration to be returned +
Returns:
namespace URI for declaration at position +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getNamespacePrefix

+
+public java.lang.String getNamespacePrefix(int index)
+                                    throws JiBXException
+
+
Get namespace prefix for namespace declaration on current START_ELEMENT + event. The results are undefined if called when not at a START_ELEMENT + event. +

+

+
+
+
+
Parameters:
index - index number of declaration to be returned +
Returns:
namespace prefix for declaration at position, +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getNamespaceUri

+
+public java.lang.String getNamespaceUri(java.lang.String prefix)
+                                 throws JiBXException
+
+
Get namespace URI matching prefix. +

+

+
+
+
+
Parameters:
prefix - namespace prefix to be matched (null for + default namespace) +
Returns:
namespace URI for prefix +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+
+ +

+getText

+
+public java.lang.String getText()
+                         throws JiBXException
+
+
Get text value for current event. +

+

+
+
+
+ +
Returns:
text value for event +
Throws: +
JiBXException - on any error (possibly wrapping other exception)
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/BackFillReference.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/BackFillReference.html @@ -0,0 +1,218 @@ + + + + + + +BackFillReference (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Interface BackFillReference

+
+
All Known Implementing Classes:
BackFillArray
+
+
+
+
public interface BackFillReference
+ + +

+Backfill reference item, used for filling in forward references to + objects. Each reference to an item must define a class implementing + this interface, to be used when a referenced item is not yet defined. + The references for a particular object are collected by a BackFillHolder + instance, and are processed when the object is defined. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + + +
+Method Summary
+ voidbackfill(java.lang.Object obj) + +
+          Define referenced object.
+  +

+ + + + + + + + +
+Method Detail
+ +

+backfill

+
+void backfill(java.lang.Object obj)
+
+
Define referenced object. This method is called by the framework + when the forward-referenced item is defined. +

+

+
Parameters:
obj - referenced object
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/build/docs/dev/org/jibx/runtime/impl/UTF8StreamWriter.html +++ libjibx-java-1.0.1/build/docs/dev/org/jibx/runtime/impl/UTF8StreamWriter.html @@ -0,0 +1,551 @@ + + + + + + +UTF8StreamWriter (JiBX Java data binding to XML - Version 1.0) + + + + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+ +

+ +org.jibx.runtime.impl +
+Class UTF8StreamWriter

+
+java.lang.Object
+  extended by org.jibx.runtime.impl.XMLWriterNamespaceBase
+      extended by org.jibx.runtime.impl.XMLWriterBase
+          extended by org.jibx.runtime.impl.StreamWriterBase
+              extended by org.jibx.runtime.impl.UTF8StreamWriter
+
+
+
All Implemented Interfaces:
IXMLWriter
+
+
+
+
public class UTF8StreamWriter
extends StreamWriterBase
+ + +

+Handler for marshalling text document to a UTF-8 output stream. +

+ +

+

+
Version:
+
1.0
+
Author:
+
Dennis M. Sosnoski
+
+
+ +

+ + + + + + + + + + + +
+Field Summary
+private  byte[]m_converts + +
+          Conversion buffer for prefixes;
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.StreamWriterBase
AMP_ENTITY, GT_ENTITY, LT_CDATAEND, LT_CDATASTART, LT_ENTITY, m_buffer, m_extensionBytes, m_fillOffset, m_prefixBytes, QUOT_ENTITY
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterBase
m_contentSeen, m_textSeen
+ + + + + + + +
Fields inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
m_prefixes, m_uris
+  + + + + + + + + + + + + + +
+Constructor Summary
UTF8StreamWriter(java.lang.String[] uris) + +
+          Constructor.
UTF8StreamWriter(UTF8StreamWriter base, + java.lang.String[] uris) + +
+          Copy constructor.
+  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+Method Summary
+ IXMLWritercreateChildWriter(java.lang.String[] uris) + +
+          Create a child writer instance to be used for a separate binding.
+protected  voiddefineNamespace(int index, + java.lang.String prefix) + +
+          Report that namespace has been defined.
+protected  voidwriteAttributeText(java.lang.String text) + +
+          Write attribute text to output.
+ voidwriteCData(java.lang.String text) + +
+          Write CDATA text to document.
+protected  voidwriteMarkup(char chr) + +
+          Write markup character to output.
+protected  voidwriteMarkup(java.lang.String text) + +
+          Write markup text to output.
+ voidwriteTextContent(java.lang.String text) + +
+          Write ordinary character data text content to document.
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.StreamWriterBase
close, flush, indent, indent, makeSpace, popExtensionNamespaces, pushExtensionNamespaces, reset, setIndentSpaces, setOutput, undefineNamespace, writeEntity, writePrefix
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterBase
addAttribute, closeEmptyTag, closeStartTag, endTag, startTagClosed, startTagNamespaces, startTagOpen, writeComment, writeDocType, writeEntityRef, writePI, writeXMLDecl
+ + + + + + + +
Methods inherited from class org.jibx.runtime.impl.XMLWriterNamespaceBase
decrementNesting, getExtensionNamespaces, getNamespaceCount, getNamespacePrefix, getNamespaces, getNamespaceUri, getNestingDepth, getPrefixIndex, growArray, incrementNesting, openNamespaces, shrinkArray
+ + + + + + + +
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
+  +

+ + + + + + + + +
+Field Detail
+ +

+m_converts

+
+private byte[] m_converts
+
+
Conversion buffer for prefixes; +

+

+
+
+ + + + + + + + +
+Constructor Detail
+ +

+UTF8StreamWriter

+
+public UTF8StreamWriter(java.lang.String[] uris)
+
+
Constructor. +

+

+
Parameters:
uris - ordered array of URIs for namespaces used in document (must + be constant; the value in position 0 must always be the empty string "", + and the value in position 1 must always be the XML namespace + "http://www.w3.org/XML/1998/namespace")
+
+
+ +

+UTF8StreamWriter

+
+public UTF8StreamWriter(UTF8StreamWriter base,
+                        java.lang.String[] uris)
+
+
Copy constructor. This takes the stream from a supplied instance, while + setting a new array of namespace URIs. It's intended for use when + invoking one binding from within another binding. +

+

+
Parameters:
base - instance to be used as base for writer
uris - ordered array of URIs for namespaces used in document + (see UTF8StreamWriter(String[]))
+
+ + + + + + + + +
+Method Detail
+ +

+writeMarkup

+
+protected void writeMarkup(java.lang.String text)
+                    throws java.io.IOException
+
+
Write markup text to output. Markup text can be written directly to the + output without the need for any escaping, but still needs to be properly + encoded. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
text - markup text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeMarkup

+
+protected void writeMarkup(char chr)
+                    throws java.io.IOException
+
+
Write markup character to output. Markup text can be written directly to + the output without the need for any escaping, but still needs to be + properly encoded. +

+

+
Specified by:
writeMarkup in class XMLWriterBase
+
+
+
Parameters:
chr - markup character to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+defineNamespace

+
+protected void defineNamespace(int index,
+                               java.lang.String prefix)
+
+
Report that namespace has been defined. +

+

+
Specified by:
defineNamespace in class XMLWriterNamespaceBase
+
+
+
Parameters:
index - namespace URI index number
prefix - prefix used for namespace
+
+
+
+ +

+writeAttributeText

+
+protected void writeAttributeText(java.lang.String text)
+                           throws java.io.IOException
+
+
Write attribute text to output. This needs to write the text with any + appropriate escaping. +

+

+
Specified by:
writeAttributeText in class XMLWriterBase
+
+
+
Parameters:
text - attribute value text to be written +
Throws: +
java.io.IOException - if error writing to document
+
+
+
+ +

+writeTextContent

+
+public void writeTextContent(java.lang.String text)
+                      throws java.io.IOException
+
+
Write ordinary character data text content to document. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+writeCData

+
+public void writeCData(java.lang.String text)
+                throws java.io.IOException
+
+
Write CDATA text to document. +

+

+
Parameters:
text - content value text +
Throws: +
java.io.IOException - on error writing to document
+
+
+
+ +

+createChildWriter

+
+public IXMLWriter createChildWriter(java.lang.String[] uris)
+
+
Create a child writer instance to be used for a separate binding. The + child writer inherits the stream and encoding from this writer, while + using the supplied namespace URIs. +

+

+
Specified by:
createChildWriter in class XMLWriterBase
+
+
+
Parameters:
uris - ordered array of URIs for namespaces used in document + (see UTF8StreamWriter(String[])) +
Returns:
child writer
+
+
+ +
+ + + + + + + + + + + + + + + + + + + +
+ +
+ + + +
+

Project Web Site

+ + --- libjibx-java-1.0.1.orig/debian/rules +++ libjibx-java-1.0.1/debian/rules @@ -0,0 +1,19 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk +include /usr/share/cdbs/1/class/ant.mk +include /usr/share/cdbs/1/rules/simple-patchsys.mk + +DEB_COMPRESS_EXCLUDE := .class +JAVA_HOME_DIRS := /usr/lib/jvm/java-6-sun +ANT_HOME := /usr/share/ant +DEB_JARS := $(ANT_HOME)/lib/ant-launcher.jar +DEB_ANT_BUILD_TARGET := setrelease current devdoc +DEB_BUILDDIR := build +DEB_DH_INSTALLCHANGELOGS_ARGS := changes.txt + +LIBRARY=jibx +VERSION=1.0.1 + +clean:: + -rm -fr build/classes build/docs/dev/resources/inherit.gif lib/* --- libjibx-java-1.0.1.orig/debian/changelog +++ libjibx-java-1.0.1/debian/changelog @@ -0,0 +1,45 @@ +libjibx-java (1.0.1-2ubuntu1) intrepid; urgency=low + + * Merge from Debian unstable. Remaining Ubuntu changes (LP: #242795): + - debian/control + + Recommend firefox instead of iceweasel. + + Modify Maintainer value to match DebianMaintainerField spec. + + -- Nathan Handler Tue, 24 Jun 2008 17:58:19 -0500 + +libjibx-java (1.0.1-2) unstable; urgency=low + + [ Michael Bienia ] + * debian/control: + + Build-Depend on sun-java6-jdk instead of ibm-j2sdk1.6 | sun-j2sdk1.4. + + Depend on sun-java6-jre instead of sun-j2re1.4. + + Recommend iceweasel instead of mozilla. + * debian/rules: + + Set JAVA_HOME_DIRS to the correct value for sun-java6-jdk. + + [ Michael Koch ] + * Fixed clean target to make it possible to build the package two times in a + row. + * Moved debhelper and cdbs to Build-Depends. + * Updated Standards-Version to 3.7.3. + * Added myself to Uploaders. + + -- Michael Koch Fri, 25 Jan 2008 23:30:33 +0100 + +libjibx-java (1.0.1-1ubuntu1) hardy; urgency=low + + * debian/control: + + Build-Depend on sun-java6-jdk instead of ibm-j2sdk1.6 | sun-j2sdk1.4. + + Depend on sun-java6-jre instead of sun-j2re1.4. + + Recommend firefox instead of mozilla. + + Modify Maintainer value to match DebianMaintainerField spec. + * debian/rules: + + Set JAVA_HOME_DIRS to the correct value for sun-java6-jdk. + + -- Michael Bienia Mon, 21 Jan 2008 15:02:59 +0100 + +libjibx-java (1.0.1-1) unstable; urgency=low + + * Initial Release (closes: Bug#354374). + + -- Eric Lavarde Sat, 4 Mar 2006 15:20:17 +0200 --- libjibx-java-1.0.1.orig/debian/install +++ libjibx-java-1.0.1/debian/install @@ -0,0 +1,3 @@ +lib/jibx-bind-1.0.1.jar usr/share/java +lib/jibx-run-1.0.1.jar usr/share/java +lib/jibx-extras-1.0.1.jar usr/share/java --- libjibx-java-1.0.1.orig/debian/copyright +++ libjibx-java-1.0.1/debian/copyright @@ -0,0 +1,26 @@ +This package was debianized by Eric Lavarde on +Mon, 1 Aug 2005 21:00:17 +0200. + +It was downloaded from http://jibx.sf.net/ + +Copyright Holder: Dennis Sosnoski + +License: + Redistribution and use in source and binary forms, with or without + modification, are permitted under the terms of the BSD License. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +On Debian systems, the complete text of the BSD License can be +found in `/usr/share/common-licenses/BSD'. + --- libjibx-java-1.0.1.orig/debian/libjibx-java-doc.doc-base +++ libjibx-java-1.0.1/debian/libjibx-java-doc.doc-base @@ -0,0 +1,10 @@ +Document: libjibx-java-doc +Title: Programmer API for libjibx-java +Author: Dennis Sosnoski +Abstract: The programmer API of JiBX, a framework for + binding XML data to Java objects. +Section: Programming/Java + +Format: HTML +Index: /usr/share/doc/libjibx-java-doc/dev/index.html +Files: /usr/share/doc/libjibx-java-doc/dev/* --- libjibx-java-1.0.1.orig/debian/control +++ libjibx-java-1.0.1/debian/control @@ -0,0 +1,30 @@ +Source: libjibx-java +Section: contrib/libs +Priority: optional +Maintainer: Ubuntu MOTU Developers +XSBC-Original-Maintainer: Debian Java Maintainers +Uploaders: Eric Lavarde , Michael Koch +Build-Depends: debhelper (>= 4.1.0), cdbs (>= 0.4.8) +Build-Depends-Indep: gjdoc, sun-java6-jdk, ant, antlr, libbcel-java, libxpp3-java +Standards-Version: 3.7.3 + +Package: libjibx-java +Architecture: all +Depends: sun-java6-jre | java2-runtime, libbcel-java, libxpp3-java +Suggests: java-virtual-machine, libjibx-java-doc +Description: Framework for binding XML data to Java objects + JiBX lets you work with data from XML documents using your own class + structures. The JiBX framework handles all the details of converting + your data to and from XML based on your instructions. JiBX is designed + to perform the translation between internal data structures and XML + with very high efficiency, but still allows you a high degree of + control over the translation process. + +Package: libjibx-java-doc +Section: contrib/doc +Architecture: all +Recommends: firefox | www-browser +Suggests: libjibx-java +Description: Documentation for libjibx-java + This package contains documentation, javadocs (or should I say gjdocs) and + tutorial code for JiBX. --- libjibx-java-1.0.1.orig/debian/compat +++ libjibx-java-1.0.1/debian/compat @@ -0,0 +1 @@ +4 --- libjibx-java-1.0.1.orig/debian/dirs +++ libjibx-java-1.0.1/debian/dirs @@ -0,0 +1 @@ +usr/share/java --- libjibx-java-1.0.1.orig/debian/libjibx-java-doc.docs +++ libjibx-java-1.0.1/debian/libjibx-java-doc.docs @@ -0,0 +1,5 @@ +readme.html +docs/ +tutorial/ +starter/ +build/docs/dev/ --- libjibx-java-1.0.1.orig/debian/docs +++ libjibx-java-1.0.1/debian/docs @@ -0,0 +1 @@ +readme.html --- libjibx-java-1.0.1.orig/debian/links +++ libjibx-java-1.0.1/debian/links @@ -0,0 +1,3 @@ +usr/share/java/jibx-bind-1.0.1.jar usr/share/java/jibx-bind.jar +usr/share/java/jibx-run-1.0.1.jar usr/share/java/jibx-run.jar +usr/share/java/jibx-extras-1.0.1.jar usr/share/java/jibx-extras.jar --- libjibx-java-1.0.1.orig/debian/patches/01_build_xml.patch +++ libjibx-java-1.0.1/debian/patches/01_build_xml.patch @@ -0,0 +1,140 @@ +--- jibx-1.0.1/build/build.xml 2006-01-02 19:45:56.000000000 +0000 ++++ jibx-1.0.1_COMPILED/build/build.xml 2006-03-05 16:44:08.000000000 +0000 +@@ -15,6 +15,7 @@ + + + ++ + + + +@@ -36,9 +37,9 @@ + + + +- +- +- ++ ++ ++ + + + +@@ -58,19 +59,19 @@ + + + +- ++ + +- +- ++ ++ + + + + +- +- ++ ++ + +- +- ++ ++ + + + +@@ -79,53 +80,63 @@ + + + +- +- ++ ++ + +- +- ++ ++ + + + + + +- +- ++ ++ + +- +- ++ ++ + +- +- ++ ++ + + + + + +- +- ++ ++ + + + +- +- ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +- ++ + + + + + +- ++ + + + + + +- ++ + + + +@@ -279,7 +290,7 @@ + + + +- ++ + + +