--- 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 @@ + + + +
+ ++ | +
---|
All Classes
+
+
+Packages
+ |
+
+ + + --- 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 @@ + + + +
+ +
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+org.jibx.* | +
---|
+ +
org.jibx.binding.Run | +||
---|---|---|
+private static final java.lang.String |
+BINDING_LIST_RESOURCE |
+"jibx_bindings.txt" |
+
+private static final java.lang.String |
+DEFAULT_BINDING_RESOURCE |
+"jibx_binding.xml" |
+
+ +
+ +
org.jibx.binding.SchemaGenerator | +||
---|---|---|
+public static final java.lang.String |
+XML_URI |
+"http://www.w3.org/XML/1998/namespace" |
+
+public static final java.lang.String |
+XMLNS_URI |
+"http://www.w3.org/2000/xmlns/" |
+
+private static final java.lang.String |
+XSD_URI |
+"http://www.w3.org/2001/XMLSchema" |
+
+ +
+ +
org.jibx.binding.Utility | +||
---|---|---|
+private static final int |
+COPY_BUFFER_SIZE |
+1024 |
+
+ +
+ +
org.jibx.binding.classes.BoundClass | +||
---|---|---|
+private static final java.lang.String |
+ACCESS_PREFIX |
+"JiBX_access_" |
+
+private static final java.lang.String |
+GENERIC_MUNGE_CLASS |
+"JiBX_MungeAdapter" |
+
+ +
+ +
org.jibx.binding.classes.ClassFile | +||
---|---|---|
+public static final int |
+PACKAGE_ACCESS |
+1 |
+
+public static final int |
+PRIVATE_ACCESS |
+0 |
+
+protected static final int |
+PRIVATEFIELD_ACCESS |
+2 |
+
+public static final int |
+PROTECTED_ACCESS |
+2 |
+
+public static final int |
+PUBLIC_ACCESS |
+3 |
+
+ +
+ +
org.jibx.binding.classes.MarshalBuilder | +||
---|---|---|
+protected static final java.lang.String |
+MARSHAL_EXCEPTION_TEXT |
+"Error while marshalling" |
+
+private static final java.lang.String |
+MARSHALCONTEXT_CLASS |
+"org.jibx.runtime.impl.MarshallingContext" |
+
+ +
+ +
org.jibx.binding.classes.MethodBuilder | +||
---|---|---|
+public static final java.lang.String |
+EXCEPTION_CONSTRUCTOR_SIGNATURE1 |
+"(Ljava/lang/String;)V" |
+
+public static final java.lang.String |
+EXCEPTION_CONSTRUCTOR_SIGNATURE2 |
+"(Ljava/lang/String;Ljava/lang/Throwable;)V" |
+
+public static final java.lang.String |
+FRAMEWORK_EXCEPTION_CLASS |
+"org.jibx.runtime.JiBXException" |
+
+ +
+ +
org.jibx.binding.classes.MungedClass | +||
---|---|---|
+private static final java.lang.String |
+BINDING_LISTNAME |
+"JiBX_bindingList" |
+
+ +
+ +
org.jibx.binding.classes.UnmarshalBuilder | +||
---|---|---|
+protected static final java.lang.String |
+UNMARSHAL_EXCEPTION_TEXT |
+"Error while unmarshalling " |
+
+private static final java.lang.String |
+UNMARSHALCONTEXT_CLASS |
+"org.jibx.runtime.impl.UnmarshallingContext" |
+
+protected static final java.lang.String |
+UNMARSHALLING_POSITION_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.buildPositionString" |
+
+protected static final java.lang.String |
+UNMARSHALLING_POSITION_SIGNATURE |
+"()Ljava/lang/String;" |
+
+ +
+ +
org.jibx.binding.def.BindingBuilder | +||
---|---|---|
+static final int |
+ACC_PACKAGE |
+1 |
+
+static final int |
+ACC_PRIVATE |
+0 |
+
+static final int |
+ACC_PROTECTED |
+2 |
+
+static final int |
+ACC_PUBLIC |
+3 |
+
+private static final java.lang.String |
+BINDING_DIRECTION |
+"direction" |
+
+private static final java.lang.String |
+BINDING_ELEMENT |
+"binding" |
+
+private static final java.lang.String |
+BINDING_FORCE |
+"force-classes" |
+
+private static final java.lang.String |
+BINDING_FORWARDS |
+"forwards" |
+
+private static final java.lang.String |
+BINDING_GLOBALID |
+"global-id" |
+
+private static final java.lang.String |
+BINDING_NAME |
+"name" |
+
+private static final java.lang.String |
+BINDING_PACKAGE |
+"package" |
+
+private static final java.lang.String |
+BINDING_TRACKING |
+"track-source" |
+
+private static final java.lang.String |
+COLLECTION_ADDMETHOD |
+"add-method" |
+
+private static final java.lang.String |
+COLLECTION_ELEMENT |
+"collection" |
+
+private static final java.lang.String |
+COLLECTION_ITEMTYPE |
+"item-type" |
+
+private static final java.lang.String |
+COLLECTION_ITERMETHOD |
+"iter-method" |
+
+private static final java.lang.String |
+COLLECTION_LOADMETHOD |
+"load-method" |
+
+private static final java.lang.String |
+COLLECTION_SIZEMETHOD |
+"size-method" |
+
+private static final java.lang.String |
+COLLECTION_STOREMETHOD |
+"store-method" |
+
+private static final java.lang.String |
+COMMON_ACCESSLEVEL |
+"access-level" |
+
+private static final java.lang.String |
+COMMON_AUTOLINK |
+"auto-link" |
+
+private static final java.lang.String |
+COMMON_CHOICE |
+"choice" |
+
+private static final java.lang.String |
+COMMON_DEFAULT |
+"default" |
+
+private static final java.lang.String |
+COMMON_DESERIALIZER |
+"deserializer" |
+
+private static final java.lang.String |
+COMMON_FACTORY |
+"factory" |
+
+private static final java.lang.String |
+COMMON_FIELD |
+"field" |
+
+private static final java.lang.String |
+COMMON_GETMETHOD |
+"get-method" |
+
+private static final java.lang.String |
+COMMON_LABEL |
+"label" |
+
+private static final java.lang.String |
+COMMON_MARSHALLER |
+"marshaller" |
+
+private static final java.lang.String |
+COMMON_NAME |
+"name" |
+
+private static final java.lang.String |
+COMMON_NAMESPACE |
+"ns" |
+
+private static final java.lang.String |
+COMMON_NAMESTYLE |
+"name-style" |
+
+private static final java.lang.String |
+COMMON_ORDERED |
+"ordered" |
+
+private static final java.lang.String |
+COMMON_POSTSET |
+"post-set" |
+
+private static final java.lang.String |
+COMMON_PREGET |
+"pre-get" |
+
+private static final java.lang.String |
+COMMON_PRESET |
+"pre-set" |
+
+private static final java.lang.String |
+COMMON_SERIALIZER |
+"serializer" |
+
+private static final java.lang.String |
+COMMON_SETMETHOD |
+"set-method" |
+
+private static final java.lang.String |
+COMMON_STRIPPREFIX |
+"strip-prefix" |
+
+private static final java.lang.String |
+COMMON_STRIPSUFFIX |
+"strip-suffix" |
+
+private static final java.lang.String |
+COMMON_STYLE |
+"value-style" |
+
+private static final java.lang.String |
+COMMON_TESTMETHOD |
+"test-method" |
+
+private static final java.lang.String |
+COMMON_TYPE |
+"type" |
+
+private static final java.lang.String |
+COMMON_UNMARSHALLER |
+"unmarshaller" |
+
+private static final java.lang.String |
+COMMON_USAGE |
+"usage" |
+
+private static final java.lang.String |
+COMMON_USING |
+"using" |
+
+private static final int |
+DIRECTION_BOTH |
+2 |
+
+private static final int |
+DIRECTION_INPUT |
+0 |
+
+private static final int |
+DIRECTION_OUTPUT |
+1 |
+
+private static final java.lang.String |
+FORMAT_ELEMENT |
+"format" |
+
+private static final java.lang.String |
+FORMAT_NAME |
+"label" |
+
+private static final java.lang.String |
+FORMAT_TYPE |
+"type" |
+
+private static final java.lang.String |
+INCLUDE_ELEMENT |
+"include" |
+
+private static final java.lang.String |
+INCLUDE_PATH |
+"path" |
+
+static final int |
+LINK_FIELDS |
+1 |
+
+static final int |
+LINK_METHODS |
+2 |
+
+static final int |
+LINK_NONE |
+0 |
+
+private static final java.lang.String |
+MAPPING_ABSTRACT |
+"abstract" |
+
+private static final java.lang.String |
+MAPPING_CLASS |
+"class" |
+
+private static final java.lang.String |
+MAPPING_ELEMENT |
+"mapping" |
+
+private static final java.lang.String |
+MAPPING_EXTENDS |
+"extends" |
+
+private static final java.lang.String |
+MAPPING_TYPENAME |
+"type-name" |
+
+private static final java.lang.String |
+MARSHALLER_INTERFACE |
+"org.jibx.runtime.IMarshaller" |
+
+private static final java.lang.String |
+MARSHALLER_INTERFACETYPE |
+"Lorg/jibx/runtime/IMarshaller;" |
+
+static final int |
+NAME_HYPHENS |
+0 |
+
+static final int |
+NAME_MIXED |
+1 |
+
+private static final java.lang.String |
+NAMESPACE_DEFAULT |
+"default" |
+
+private static final java.lang.String |
+NAMESPACE_ELEMENT |
+"namespace" |
+
+private static final java.lang.String |
+NAMESPACE_PREFIX |
+"prefix" |
+
+private static final java.lang.String |
+NAMESPACE_URI |
+"uri" |
+
+private static final java.lang.String |
+STRUCTURE_ELEMENT |
+"structure" |
+
+private static final java.lang.String |
+STRUCTURE_MAPAS |
+"map-as" |
+
+private static final java.lang.String |
+UNMARSHALLER_INTERFACE |
+"org.jibx.runtime.IUnmarshaller" |
+
+private static final java.lang.String |
+UNMARSHALLER_INTERFACETYPE |
+"Lorg/jibx/runtime/IUnmarshaller;" |
+
+private static final java.lang.String |
+USAGE_OPTIONAL |
+"optional" |
+
+private static final java.lang.String |
+USAGE_REQUIRED |
+"required" |
+
+private static final java.lang.String |
+VALUE_CONSTANT |
+"constant" |
+
+private static final java.lang.String |
+VALUE_ELEMENT |
+"value" |
+
+private static final java.lang.String |
+VALUE_FORMAT |
+"format" |
+
+private static final java.lang.String |
+VALUE_IDENT |
+"ident" |
+
+private static final java.lang.String |
+VALUE_STYLE |
+"style" |
+
+ +
+ +
org.jibx.binding.def.BindingDefinition | +||
---|---|---|
+private static final java.lang.String |
+CLASSES_ARRAYNAME |
+"m_classes" |
+
+private static final java.lang.String |
+CREATEMARSHAL_METHODNAME |
+"createMarshallingContext" |
+
+private static final java.lang.String |
+CREATEUNMARSHAL_METHODNAME |
+"createUnmarshallingContext" |
+
+public static final java.lang.String |
+CURRENT_VERSION_NAME |
+"@distrib@" |
+
+static final java.lang.String |
+DEFAULT_AUTOPREFIX |
+"id_" |
+
+private static final int |
+FACTORY_INSTACCESS |
+10 |
+
+private static final java.lang.String |
+FACTORY_INSTNAME |
+"m_inst" |
+
+private static final java.lang.String |
+FACTORY_INTERFACE |
+"org.jibx.runtime.IBindingFactory" |
+
+private static final java.lang.String |
+FACTORY_SUFFIX |
+"Factory" |
+
+public static final java.lang.String |
+GENERATE_PREFIX |
+"JiBX_" |
+
+private static final java.lang.String |
+GETCLASSES_METHODNAME |
+"getMappedClasses" |
+
+private static final java.lang.String |
+GETDEFINEDNSS_METHODNAME |
+"getNamespaces" |
+
+private static final java.lang.String |
+GETDEFINEDPREFS_METHODNAME |
+"getPrefixes" |
+
+private static final java.lang.String |
+GETDISTRIB_METHODNAME |
+"getCompilerDistribution" |
+
+private static final java.lang.String |
+GETELEMENTNAMES_METHODNAME |
+"getElementNames" |
+
+private static final java.lang.String |
+GETELEMENTNSS_METHODNAME |
+"getElementNamespaces" |
+
+private static final java.lang.String |
+GETINST_METHODNAME |
+"getInstance" |
+
+private static final java.lang.String |
+GETTYPEINDEX_METHODNAME |
+"getTypeIndex" |
+
+private static final java.lang.String |
+GETVERSION_METHODNAME |
+"getCompilerVersion" |
+
+private static final java.lang.String |
+GNAMES_ARRAYNAME |
+"m_globalNames" |
+
+private static final java.lang.String |
+GURIS_ARRAYNAME |
+"m_globalUris" |
+
+private static final java.lang.String |
+IDNAMES_ARRAYNAME |
+"m_idNames" |
+
+private static final java.lang.String |
+MARSHALCONTEXT_IMPLEMENTATION |
+"org.jibx.runtime.impl.MarshallingContext" |
+
+private static final java.lang.String |
+MARSHALCONTEXT_INTERFACE |
+"org.jibx.runtime.IMarshallingContext" |
+
+private static final java.lang.String |
+MARSHALCONTEXTINIT_SIGNATURE |
+"([Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Lorg/jibx/runtime/IBindingFactory;)V" |
+
+private static final java.lang.String |
+MARSHALLER_ARRAYNAME |
+"m_marshallers" |
+
+private static final java.lang.String |
+PREFIXES_ARRAYNAME |
+"m_prefixes" |
+
+private static final java.lang.String |
+STRING_ARRAYTYPE |
+"java.lang.String[]" |
+
+private static final java.lang.String |
+STRINGINT_MAPTYPE |
+"org.jibx.runtime.impl.StringIntHashMap" |
+
+private static final java.lang.String |
+STRINGINTADD_METHOD |
+"org.jibx.runtime.impl.StringIntHashMap.add" |
+
+private static final java.lang.String |
+STRINGINTADD_SIGNATURE |
+"(Ljava/lang/String;I)I" |
+
+private static final java.lang.String |
+STRINGINTGET_METHOD |
+"org.jibx.runtime.impl.StringIntHashMap.get" |
+
+private static final java.lang.String |
+STRINGINTGET_SIGNATURE |
+"(Ljava/lang/String;)I" |
+
+private static final java.lang.String |
+STRINGINTINIT_SIGNATURE |
+"(I)V" |
+
+private static final int |
+TYPEMAP_MINIMUM_SIZE |
+5 |
+
+private static final java.lang.String |
+TYPEMAP_NAME |
+"m_typeMap" |
+
+private static final java.lang.String |
+UNMARSHALCONTEXT_IMPLEMENTATION |
+"org.jibx.runtime.impl.UnmarshallingContext" |
+
+private static final java.lang.String |
+UNMARSHALCONTEXT_INTERFACE |
+"org.jibx.runtime.IUnmarshallingContext" |
+
+private static final java.lang.String |
+UNMARSHALCONTEXTINIT_SIGNATURE |
+"(I[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;[Ljava/lang/String;Lorg/jibx/runtime/IBindingFactory;)V" |
+
+private static final java.lang.String |
+UNMARSHALLER_ARRAYNAME |
+"m_unmarshallers" |
+
+private static final java.lang.String |
+UNSUPPORTED_EXCEPTION_CLASS |
+"java.lang.UnsupportedOperationException" |
+
+private static final java.lang.String |
+URIS_ARRAYNAME |
+"m_uris" |
+
+ +
+ +
org.jibx.binding.def.DirectGeneric | +||
---|---|---|
+private static final java.lang.String |
+ISEND_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.isEnd" |
+
+private static final java.lang.String |
+ISEND_SIGNATURE |
+"()Z" |
+
+private static final java.lang.String |
+MARSHALLABLE_INTERFACE |
+"org.jibx.runtime.IMarshallable" |
+
+private static final java.lang.String |
+MARSHALLABLE_METHOD |
+"org.jibx.runtime.IMarshallable.marshal" |
+
+private static final java.lang.String |
+MARSHALLABLE_SIGNATURE |
+"(Lorg/jibx/runtime/IMarshallingContext;)V" |
+
+private static final java.lang.String |
+UNMARSHALELEMENT_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.unmarshalElement" |
+
+private static final java.lang.String |
+UNMARSHALELEMENT_SIGNATURE |
+"()Ljava/lang/Object;" |
+
+ +
+ +
org.jibx.binding.def.DirectObject | +||
---|---|---|
+private static final java.lang.String |
+ABSTRACTMARSHAL_METHOD |
+"org.jibx.runtime.IAbstractMarshaller.baseMarshal" |
+
+private static final java.lang.String |
+ABSTRACTMARSHAL_SIGNATURE |
+"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V" |
+
+private static final java.lang.String |
+ABSTRACTMARSHALLER_INTERFACE |
+"org.jibx.runtime.IAbstractMarshaller" |
+
+private static final java.lang.String |
+ALIASABLE_INTERFACETYPE |
+"Lorg/jibx/runtime/IAliasable;" |
+
+private static final java.lang.String |
+ANY_INIT_SIG |
+"()V" |
+
+private static final java.lang.String |
+ANY_INITCLASS_SIG |
+"(Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+GETMARSHALLER_METHOD |
+"org.jibx.runtime.IMarshallingContext.getMarshaller" |
+
+private static final java.lang.String |
+GETMARSHALLER_SIGNATURE |
+"(ILjava/lang/String;)Lorg/jibx/runtime/IMarshaller;" |
+
+private static final java.lang.String |
+GETUNMARSHALLER_METHOD |
+"org.jibx.runtime.IUnmarshallingContext.getUnmarshaller" |
+
+private static final java.lang.String |
+GETUNMARSHALLER_SIGNATURE |
+"(I)Lorg/jibx/runtime/IUnmarshaller;" |
+
+private static final java.lang.String |
+MARSHALLER_MARSHAL_METHOD |
+"org.jibx.runtime.IMarshaller.marshal" |
+
+private static final java.lang.String |
+MARSHALLER_MARSHAL_SIGNATURE |
+"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V" |
+
+private static final java.lang.String |
+MARSHALONLY_INIT_SIG |
+"(ILjava/lang/String;)V" |
+
+private static final java.lang.String |
+MARSHALONLY_INITCLASS_SIG |
+"(ILjava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+MARSHALUNMARSHAL_INIT_SIG |
+"(Ljava/lang/String;ILjava/lang/String;)V" |
+
+private static final java.lang.String |
+MARSHALUNMARSHAL_INITCLASS_SIG |
+"(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+UNMARSHALLER_TESTPRESENT_METHOD |
+"org.jibx.runtime.IUnmarshaller.isPresent" |
+
+private static final java.lang.String |
+UNMARSHALLER_TESTPRESENT_SIGNATURE |
+"(Lorg/jibx/runtime/IUnmarshallingContext;)Z" |
+
+private static final java.lang.String |
+UNMARSHALLER_UNMARSHAL_METHOD |
+"org.jibx.runtime.IUnmarshaller.unmarshal" |
+
+private static final java.lang.String |
+UNMARSHALLER_UNMARSHAL_SIGNATURE |
+"(Ljava/lang/Object;Lorg/jibx/runtime/IUnmarshallingContext;)Ljava/lang/Object;" |
+
+private static final java.lang.String |
+UNMARSHALONLY_INIT_SIG |
+"(Ljava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+UNMARSHALONLY_INITCLASS_SIG |
+"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" |
+
+ +
+ +
org.jibx.binding.def.ElementWrapper | +||
---|---|---|
+private static final java.lang.String |
+MARSHAL_CLOSESTARTCONTENT |
+"org.jibx.runtime.impl.MarshallingContext.closeStartContent" |
+
+private static final java.lang.String |
+MARSHAL_CLOSESTARTEMPTY |
+"org.jibx.runtime.impl.MarshallingContext.closeStartEmpty" |
+
+private static final java.lang.String |
+MARSHAL_CLOSESTARTSIGNATURE |
+"()Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+private static final java.lang.String |
+MARSHAL_STARTNAMESPACESSIGNATURE |
+"(ILjava/lang/String;[I[Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+private static final java.lang.String |
+MARSHAL_WRITEENDMETHOD |
+"org.jibx.runtime.impl.MarshallingContext.endTag" |
+
+private static final java.lang.String |
+MARSHAL_WRITEENDSIGNATURE |
+"(ILjava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+private static final java.lang.String |
+MARSHAL_WRITESTARTATTRIBUTES |
+"org.jibx.runtime.impl.MarshallingContext.startTagAttributes" |
+
+private static final java.lang.String |
+MARSHAL_WRITESTARTNAMESPACES |
+"org.jibx.runtime.impl.MarshallingContext.startTagNamespaces" |
+
+private static final java.lang.String |
+MARSHAL_WRITESTARTNOATTRIBUTES |
+"org.jibx.runtime.impl.MarshallingContext.startTag" |
+
+private static final java.lang.String |
+MARSHAL_WRITESTARTSIGNATURE |
+"(ILjava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+private static final java.lang.String |
+MARSHALLING_CONTEXT |
+"org.jibx.runtime.impl.MarshallingContext" |
+
+private static final java.lang.String |
+UNMARSHAL_ISATMETHOD |
+"org.jibx.runtime.IUnmarshallingContext.isAt" |
+
+private static final java.lang.String |
+UNMARSHAL_ISATSIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)Z" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSEENDMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.parsePastCurrentEndTag" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSEENDSIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSEPASTSTART |
+"org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSESTARTATTRIBUTES |
+"org.jibx.runtime.impl.UnmarshallingContext.parseToStartTag" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSESTARTNOATTRIBUTES |
+"org.jibx.runtime.impl.UnmarshallingContext.parsePastStartTag" |
+
+private static final java.lang.String |
+UNMARSHAL_PARSESTARTSIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+UNMARSHAL_SKIPELEMENTMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.parsePastElement" |
+
+private static final java.lang.String |
+UNMARSHAL_SKIPELEMENTSIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+UNMARSHALLING_CONTEXT |
+"org.jibx.runtime.impl.UnmarshallingContext" |
+
+ +
+ +
org.jibx.binding.def.MappingBase | +||
---|---|---|
+protected static final java.lang.String |
+ABSTRACTMARSHALLER_INTERFACE |
+"org.jibx.runtime.IAbstractMarshaller" |
+
+protected static final java.lang.String |
+CHECKEXTENDS_METHODNAME |
+"isExtension" |
+
+protected static final java.lang.String |
+CHECKEXTENDS_SIGNATURE |
+"(I)Z" |
+
+protected static final java.lang.String |
+GETINDEX_METHODNAME |
+"JiBX_getIndex" |
+
+protected static final java.lang.String |
+GETINDEX_SIGNATURE |
+"()I" |
+
+protected static final java.lang.String |
+GETMARSHALLER_METHOD |
+"org.jibx.runtime.IMarshallingContext.getMarshaller" |
+
+protected static final java.lang.String |
+GETMARSHALLER_SIGNATURE |
+"(ILjava/lang/String;)Lorg/jibx/runtime/IMarshaller;" |
+
+protected static final java.lang.String |
+GETUNMARSHALLER_METHOD |
+"org.jibx.runtime.IUnmarshallingContext.getUnmarshaller" |
+
+protected static final java.lang.String |
+GETUNMARSHALLER_SIGNATURE |
+"(I)Lorg/jibx/runtime/IUnmarshaller;" |
+
+protected static final java.lang.String |
+IMARSHALLABLE_INTERFACE |
+"org.jibx.runtime.IMarshallable" |
+
+protected static final java.lang.String |
+IUNMARSHALLABLE_INTERFACE |
+"org.jibx.runtime.IUnmarshallable" |
+
+protected static final java.lang.String |
+MARSHALLABLE_METHODNAME |
+"marshal" |
+
+protected static final java.lang.String |
+MARSHALLABLE_SIGNATURE |
+"(Lorg/jibx/runtime/IMarshallingContext;)V" |
+
+protected static final java.lang.String |
+MARSHALLER_INTERFACE |
+"org.jibx.runtime.IMarshaller" |
+
+protected static final java.lang.String |
+MARSHALLERMARSHAL_METHOD |
+"org.jibx.runtime.IMarshaller.marshal" |
+
+protected static final java.lang.String |
+MARSHALLERMARSHAL_SIGNATURE |
+"(Ljava/lang/Object;Lorg/jibx/runtime/IMarshallingContext;)V" |
+
+protected static final java.lang.String |
+UNMARSHALLABLE_METHODNAME |
+"unmarshal" |
+
+protected static final java.lang.String |
+UNMARSHALLABLE_SIGNATURE |
+"(Lorg/jibx/runtime/IUnmarshallingContext;)V" |
+
+protected static final java.lang.String |
+UNMARSHALLER_INTERFACE |
+"org.jibx.runtime.IUnmarshaller" |
+
+protected static final java.lang.String |
+UNMARSHALLERUNMARSHAL_METHOD |
+"org.jibx.runtime.IUnmarshaller.unmarshal" |
+
+protected static final java.lang.String |
+UNMARSHALLERUNMARSHAL_SIGNATURE |
+"(Ljava/lang/Object;Lorg/jibx/runtime/IUnmarshallingContext;)Ljava/lang/Object;" |
+
+ +
+ +
org.jibx.binding.def.MappingDefinition | +||
---|---|---|
+private static final java.lang.String |
+ADAPTERCLASS_SUFFIX |
+"_access" |
+
+private static final java.lang.String |
+ADDMARSHALLER_METHOD |
+"org.jibx.runtime.impl.MarshallingContext.addMarshalling" |
+
+private static final java.lang.String |
+ADDMARSHALLER_SIGNATURE |
+"(ILjava/lang/String;)V" |
+
+private static final java.lang.String |
+ADDUNMARSHALLER_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.addUnmarshalling" |
+
+private static final java.lang.String |
+ADDUNMARSHALLER_SIGNATURE |
+"(ILjava/lang/String;Ljava/lang/String;Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+BASEMARSHAL_METHODNAME |
+"baseMarshal" |
+
+private static final java.lang.String |
+CHECKEXTENDS_METHOD |
+"org.jibx.runtime.IMarshaller.isExtension" |
+
+private static final java.lang.String |
+CURRENTELEMENT_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.currentNameString" |
+
+private static final java.lang.String |
+CURRENTELEMENT_SIGNATURE |
+"()Ljava/lang/String;" |
+
+private static final java.lang.String |
+GETINDEX_METHOD |
+"org.jibx.runtime.IMarshallable.JiBX_getIndex" |
+
+private static final java.lang.String |
+ISPRESENT_METHODNAME |
+"isPresent" |
+
+private static final java.lang.String |
+MARSHAL_METHODNAME |
+"marshal" |
+
+private static final java.lang.String |
+MARSHALCONTEXT_CLASS |
+"org.jibx.runtime.impl.MarshallingContext" |
+
+private static final java.lang.String |
+MARSHALCONTEXT_INTERFACE |
+"org.jibx.runtime.IMarshallingContext" |
+
+private static final java.lang.String |
+REMOVEMARSHALLER_METHOD |
+"org.jibx.runtime.impl.MarshallingContext.removeMarshalling" |
+
+private static final java.lang.String |
+REMOVEMARSHALLER_SIGNATURE |
+"(I)V" |
+
+private static final java.lang.String |
+REMOVEUNMARSHALLER_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.removeUnmarshalling" |
+
+private static final java.lang.String |
+REMOVEUNMARSHALLER_SIGNATURE |
+"(I)V" |
+
+private static final java.lang.String |
+UNMARSHAL_ISATMETHOD |
+"org.jibx.runtime.IUnmarshallingContext.isAt" |
+
+private static final java.lang.String |
+UNMARSHAL_ISATSIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)Z" |
+
+private static final java.lang.String |
+UNMARSHAL_METHODNAME |
+"unmarshal" |
+
+private static final java.lang.String |
+UNMARSHALCONTEXT_CLASS |
+"org.jibx.runtime.impl.UnmarshallingContext" |
+
+private static final java.lang.String |
+UNMARSHALCONTEXT_INTERFACE |
+"org.jibx.runtime.IUnmarshallingContext" |
+
+private static final java.lang.String |
+UNMARSHALLERPRESENT_METHOD |
+"org.jibx.runtime.IUnmarshaller.isPresent" |
+
+private static final java.lang.String |
+UNMARSHALLERPRESENT_SIGNATURE |
+"(Lorg/jibx/runtime/IUnmarshallingContext;)Z" |
+
+ +
+ +
org.jibx.binding.def.NamespaceDefinition | +||
---|---|---|
+static final int |
+ALLDEFAULT_USAGE |
+3 |
+
+static final int |
+ATTRIBUTES_USAGE |
+2 |
+
+static final int |
+ELEMENTS_USAGE |
+1 |
+
+static final int |
+NODEFAULT_USAGE |
+0 |
+
+ +
+ +
org.jibx.binding.def.NestedCollection | +||
---|---|---|
+private static final java.lang.String |
+GROWARRAY_METHOD |
+"org.jibx.runtime.Utility.growArray" |
+
+private static final java.lang.String |
+GROWARRAY_SIGNATURE |
+"(Ljava/lang/Object;)Ljava/lang/Object;" |
+
+private static final java.lang.String |
+RESIZEARRAY_METHOD |
+"org.jibx.runtime.Utility.resizeArray" |
+
+private static final java.lang.String |
+RESIZEARRAY_SIGNATURE |
+"(ILjava/lang/Object;)Ljava/lang/Object;" |
+
+ +
+ +
org.jibx.binding.def.ObjectBinding | +||
---|---|---|
+private static final java.lang.String |
+GETSTACKTOP_SIGNATURE |
+"()Ljava/lang/Object;" |
+
+private static final java.lang.String |
+MARSHAL_ATTR_SUFFIX |
+"_marshalAttr" |
+
+private static final java.lang.String |
+MARSHAL_GETSTACKTOPMETHOD |
+"org.jibx.runtime.impl.MarshallingContext.getStackTop" |
+
+private static final java.lang.String |
+MARSHAL_POPOBJECTMETHOD |
+"org.jibx.runtime.impl.MarshallingContext.popObject" |
+
+private static final java.lang.String |
+MARSHAL_PUSHOBJECTMETHOD |
+"org.jibx.runtime.impl.MarshallingContext.pushObject" |
+
+private static final java.lang.String |
+MARSHAL_SUFFIX |
+"_marshal" |
+
+private static final java.lang.String |
+MARSHALLING_CONTEXT |
+"org.jibx.runtime.impl.MarshallingContext" |
+
+private static final java.lang.String |
+NEWINSTANCE_SUFFIX |
+"_newinstance" |
+
+private static final java.lang.String |
+POPOBJECT_SIGNATURE |
+"()V" |
+
+private static final java.lang.String |
+PUSHOBJECT_SIGNATURE |
+"(Ljava/lang/Object;)V" |
+
+private static final java.lang.String |
+SETSOURCE_METHODNAME |
+"jibx_setSource" |
+
+private static final java.lang.String |
+SOURCE_TRACKING_INTERFACE |
+"org.jibx.runtime.impl.ITrackSourceImpl" |
+
+private static final java.lang.String |
+SOURCECOLUMN_FIELDNAME |
+"jibx_sourceColumn" |
+
+private static final java.lang.String |
+SOURCECOLUMN_METHODNAME |
+"jibx_getColumnNumber" |
+
+private static final java.lang.String |
+SOURCEDOCUMENT_FIELDNAME |
+"jibx_sourceDocument" |
+
+private static final java.lang.String |
+SOURCELINE_FIELDNAME |
+"jibx_sourceLine" |
+
+private static final java.lang.String |
+SOURCELINE_METHODNAME |
+"jibx_getLineNumber" |
+
+private static final java.lang.String |
+SOURCENAME_METHODNAME |
+"jibx_getDocumentName" |
+
+private static final java.lang.String |
+UNMARSHAL_ATTR_SUFFIX |
+"_unmarshalAttr" |
+
+private static final java.lang.String |
+UNMARSHAL_GETSTACKTOPMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.getStackTop" |
+
+private static final java.lang.String |
+UNMARSHAL_PARAMETER_SIGNATURE |
+"(Lorg/jibx/runtime/impl/UnmarshallingContext;)" |
+
+private static final java.lang.String |
+UNMARSHAL_POPOBJECTMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.popObject" |
+
+private static final java.lang.String |
+UNMARSHAL_PUSHOBJECTMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.pushObject" |
+
+private static final java.lang.String |
+UNMARSHAL_PUSHTRACKEDOBJECTMETHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.pushTrackedObject" |
+
+private static final java.lang.String |
+UNMARSHAL_SUFFIX |
+"_unmarshal" |
+
+private static final java.lang.String |
+UNMARSHALLING_CONTEXT |
+"org.jibx.runtime.impl.UnmarshallingContext" |
+
+ +
+ +
org.jibx.binding.def.ObjectStringConversion | +||
---|---|---|
+private static final java.lang.String |
+FROMSTRING_SIGNATURE |
+"(Ljava/lang/String;)V" |
+
+private static final java.lang.String |
+TOSTRING_METHOD |
+"toString" |
+
+private static final java.lang.String |
+TOSTRING_SIGNATURE |
+"()Ljava/lang/String;" |
+
+ +
+ +
org.jibx.binding.def.PrimitiveStringConversion | +||
---|---|---|
+private static final int |
+DOUBLE_TYPE |
+3 |
+
+private static final int |
+FLOAT_TYPE |
+2 |
+
+private static final int |
+INT_TYPE |
+0 |
+
+private static final int |
+LONG_TYPE |
+1 |
+
+private static final java.lang.String |
+UNMARSHAL_SIG_LEAD |
+"(Ljava/lang/String;Ljava/lang/String;" |
+
+private static final java.lang.String |
+UTILITY_CLASS_NAME |
+"org.jibx.runtime.Utility" |
+
+ +
+ +
org.jibx.binding.def.StringConversion | +||
---|---|---|
+protected static final java.lang.String |
+COMPARE_OBJECTS_METHOD |
+"org.jibx.runtime.Utility.isEqual" |
+
+protected static final java.lang.String |
+COMPARE_OBJECTS_SIGNATURE |
+"(Ljava/lang/Object;Ljava/lang/Object;)Z" |
+
+protected static final java.lang.String |
+MARSHAL_ATTRIBUTE |
+"org.jibx.runtime.impl.MarshallingContext.attribute" |
+
+protected static final java.lang.String |
+MARSHAL_ELEMENT |
+"org.jibx.runtime.impl.MarshallingContext.element" |
+
+public static final int |
+MARSHAL_NAME_VALUES |
+2 |
+
+protected static final java.lang.String |
+MARSHAL_SIGNATURE |
+"(ILjava/lang/String;Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+protected static final java.lang.String |
+UNMARSHAL_OPT_ATTRIBUTE |
+"org.jibx.runtime.impl.UnmarshallingContext.attributeText" |
+
+protected static final java.lang.String |
+UNMARSHAL_OPT_ELEMENT |
+"org.jibx.runtime.impl.UnmarshallingContext.parseElementText" |
+
+protected static final java.lang.String |
+UNMARSHAL_OPT_SIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" |
+
+protected static final java.lang.String |
+UNMARSHAL_REQ_ATTRIBUTE |
+"org.jibx.runtime.impl.UnmarshallingContext.attributeText" |
+
+protected static final java.lang.String |
+UNMARSHAL_REQ_ELEMENT |
+"org.jibx.runtime.impl.UnmarshallingContext.parseElementText" |
+
+protected static final java.lang.String |
+UNMARSHAL_REQ_SIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;" |
+
+ +
+ +
org.jibx.binding.def.ValueChild | +||
---|---|---|
+static final int |
+ATTRIBUTE_STYLE |
+0 |
+
+static final int |
+AUTO_IDENT |
+1 |
+
+private static final java.lang.String |
+BACKFILL_METHODNAME |
+"backfill" |
+
+private static final java.lang.String |
+BACKFILL_SUFFIX |
+"_backfill_" |
+
+private static final java.lang.String |
+BOUNDREF_NAME |
+"m_obj" |
+
+static final int |
+CDATA_STYLE |
+3 |
+
+private static final java.lang.String |
+CHECK_ATTRIBUTE_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.hasAttribute" |
+
+private static final java.lang.String |
+CHECK_ELEMENT_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.isAt" |
+
+private static final java.lang.String |
+CHECK_SIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;)Z" |
+
+static final int |
+DEF_IDENT |
+2 |
+
+private static final java.lang.String |
+DEFINE_ID_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.defineID" |
+
+private static final java.lang.String |
+DEFINE_ID_SIGNATURE |
+"(Ljava/lang/String;ILjava/lang/Object;)V" |
+
+static final int |
+DIRECT_IDENT |
+0 |
+
+static final int |
+ELEMENT_STYLE |
+1 |
+
+protected static final java.lang.String |
+MARSHAL_ATTRIBUTE |
+"org.jibx.runtime.impl.MarshallingContext.attribute" |
+
+private static final java.lang.String |
+MARSHAL_CDATA_NAME |
+"org.jibx.runtime.impl.MarshallingContext.writeCData" |
+
+protected static final java.lang.String |
+MARSHAL_ELEMENT |
+"org.jibx.runtime.impl.MarshallingContext.element" |
+
+protected static final java.lang.String |
+MARSHAL_SIGNATURE |
+"(ILjava/lang/String;Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+private static final java.lang.String |
+MARSHAL_TEXT_NAME |
+"org.jibx.runtime.impl.MarshallingContext.writeContent" |
+
+private static final java.lang.String |
+MARSHAL_TEXT_SIGNATURE |
+"(Ljava/lang/String;)Lorg/jibx/runtime/impl/MarshallingContext;" |
+
+static final int |
+REF_IDENT |
+3 |
+
+private static final java.lang.String |
+REGISTER_BACKFILL_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.registerBackFill" |
+
+private static final java.lang.String |
+REGISTER_BACKFILL_SIGNATURE |
+"(ILorg/jibx/runtime/impl/BackFillReference;)V" |
+
+static final int |
+TEXT_STYLE |
+2 |
+
+private static final java.lang.String |
+UNMARSHAL_DEFREF_ATTR_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.attributeExistingIDREF" |
+
+private static final java.lang.String |
+UNMARSHAL_DEFREF_ELEM_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.parseElementExistingIDREF" |
+
+private static final java.lang.String |
+UNMARSHAL_DEFREF_SIGNATURE |
+"(Ljava/lang/String;Ljava/lang/String;I)Ljava/lang/Object;" |
+
+private static final java.lang.String |
+UNMARSHAL_FWDREF_ATTR_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.attributeForwardIDREF" |
+
+private static final java.lang.String |
+UNMARSHAL_FWDREF_ELEM_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.parseElementForwardIDREF" |
+
+private static final java.lang.String |
+UNMARSHAL_TEXT_NAME |
+"org.jibx.runtime.impl.UnmarshallingContext.parseContentText" |
+
+private static final java.lang.String |
+UNMARSHAL_TEXT_SIGNATURE |
+"()Ljava/lang/String;" |
+
+private static final java.lang.String |
+UNMARSHALLING_THROWEXCEPTION_METHOD |
+"org.jibx.runtime.impl.UnmarshallingContext.throwException" |
+
+private static final java.lang.String |
+UNMARSHALLING_THROWEXCEPTION_SIGNATURE |
+"(Ljava/lang/String;)V" |
+
+ +
+ +
org.jibx.extras.DocumentModelMapperBase | +||
---|---|---|
+public static final java.lang.String |
+XML_NAMESPACE |
+"http://www.w3.org/XML/1998/namespace" |
+
+public static final java.lang.String |
+XMLNS_NAMESPACE |
+"http://www.w3.org/2000/xmlns/" |
+
+ +
+ +
org.jibx.extras.HashMapperStringToComplex | +||
---|---|---|
+private static final int |
+DEFAULT_SIZE |
+10 |
+
+ +
+ +
org.jibx.extras.HashMapperStringToSchemaType | +||
---|---|---|
+public static final int |
+BOOLEAN_TYPE |
+0 |
+
+public static final int |
+BYTE_TYPE |
+1 |
+
+public static final int |
+BYTERRAY_TYPE |
+12 |
+
+public static final int |
+DATE_TYPE |
+8 |
+
+public static final int |
+DATETIME_TYPE |
+7 |
+
+public static final int |
+DECIMAL_TYPE |
+10 |
+
+private static final int |
+DEFAULT_SIZE |
+10 |
+
+public static final int |
+DOUBLE_TYPE |
+2 |
+
+private static final java.lang.String |
+ENTRY_ELEMENT_NAME |
+"entry" |
+
+public static final int |
+FLOAT_TYPE |
+3 |
+
+public static final int |
+INT_TYPE |
+4 |
+
+public static final int |
+INTEGER_TYPE |
+11 |
+
+private static final java.lang.String |
+KEY_ATTRIBUTE_NAME |
+"key" |
+
+public static final int |
+LONG_TYPE |
+5 |
+
+public static final int |
+SHORT_TYPE |
+6 |
+
+private static final java.lang.String |
+SIZE_ATTRIBUTE_NAME |
+"size" |
+
+public static final int |
+STRING_TYPE |
+13 |
+
+public static final int |
+TIME_TYPE |
+9 |
+
+private static final java.lang.String |
+TYPE_ATTRIBUTE_NAME |
+"type" |
+
+private static final java.lang.String |
+XSD_NAMESPACE_PREFIX |
+"xsd" |
+
+private static final java.lang.String |
+XSD_NAMESPACE_URI |
+"http://www.w3.org/2001/XMLSchema" |
+
+private static final java.lang.String |
+XSD_PREFIX_LEAD |
+"xsd:" |
+
+private static final java.lang.String |
+XSI_NAMESPACE_PREFIX |
+"xsi" |
+
+private static final java.lang.String |
+XSI_NAMESPACE_URI |
+"http://www.w3.org/2001/XMLSchema-instance" |
+
+ +
+ +
org.jibx.runtime.BindingDirectory | +||
---|---|---|
+public static final java.lang.String |
+BINDINGFACTORY_PREFIX |
+"JiBX_" |
+
+public static final java.lang.String |
+BINDINGFACTORY_SUFFIX |
+"Factory" |
+
+public static final java.lang.String |
+BINDINGLIST_NAME |
+"JiBX_bindingList" |
+
+public static final java.lang.String |
+FACTORY_INSTMETHOD |
+"getInstance" |
+
+ +
+ +
org.jibx.runtime.EnumSet | +||
---|---|---|
+public static final int |
+VALUE_LIMIT |
+512 |
+
+ +
+ +
org.jibx.runtime.IBindingFactory | +||
---|---|---|
+public static final int |
+COMPATIBLE_VERSION_MASK |
+-65536 |
+
+public static final java.lang.String |
+CURRENT_VERSION_NAME |
+"jibx_1_0" |
+
+public static final int |
+CURRENT_VERSION_NUMBER |
+65536 |
+
+ +
+ +
org.jibx.runtime.Utility | +||
---|---|---|
+private static final long |
+LMSPERDAY |
+86400000L |
+
+public static final int |
+MINIMUM_GROWN_ARRAY_SIZE |
+16 |
+
+private static final long |
+MSPERAVGYEAR |
+31557600000L |
+
+private static final long |
+MSPERCENTURY |
+3155695200000L |
+
+private static final int |
+MSPERDAY |
+86400000 |
+
+private static final int |
+MSPERHOUR |
+3600000 |
+
+private static final int |
+MSPERMINUTE |
+60000 |
+
+private static final long |
+MSPERYEAR |
+31536000000L |
+
+private static final char |
+PAD_CHAR |
+61 |
+
+private static final long |
+TIME_BASE |
+62135596800000L |
+
+ +
+ +
org.jibx.runtime.impl.InputStreamWrapper | +||
---|---|---|
+private static final int |
+BUFFER_SIZE |
+2048 |
+
+ +
+ +
org.jibx.runtime.impl.MarshallingContext | +||
---|---|---|
+private static final int |
+INITIAL_STACK_SIZE |
+20 |
+
+public static final java.lang.String |
+XML_NAMESPACE |
+"http://www.w3.org/XML/1998/namespace" |
+
+ +
+ +
org.jibx.runtime.impl.StreamWriterBase | +||
---|---|---|
+private static final int |
+INITIAL_BUFFER_SIZE |
+2048 |
+
+ +
+ +
org.jibx.runtime.impl.StringIntHashMap | +||
---|---|---|
+protected static final double |
+DEFAULT_FILL |
+0.3 |
+
+public static final int |
+DEFAULT_NOT_FOUND |
+-2147483648 |
+
+protected static final int |
+MINIMUM_SIZE |
+31 |
+
+ +
+ +
org.jibx.runtime.impl.UnmarshallingContext | +||
---|---|---|
+public static final int |
+CDSECT |
+5 |
+
+public static final int |
+COMMENT |
+9 |
+
+private static final java.lang.String |
+DEFAULT_PARSER_NAME |
+"org.xmlpull.mxp1.MXParserFactory" |
+
+public static final int |
+DOCDECL |
+10 |
+
+public static final int |
+END_DOCUMENT |
+1 |
+
+public static final int |
+END_TAG |
+3 |
+
+public static final int |
+ENTITY_REF |
+6 |
+
+public static final int |
+IGNORABLE_WHITESPACE |
+7 |
+
+private static final int |
+INITIAL_STACK_SIZE |
+20 |
+
+public static final int |
+PROCESSING_INSTRUCTION |
+8 |
+
+public static final int |
+START_DOCUMENT |
+0 |
+
+public static final int |
+START_TAG |
+2 |
+
+public static final int |
+TEXT |
+4 |
+
+ +
+
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+Packages | +|
---|---|
org.jibx.binding | ++ |
org.jibx.binding.classes | ++ |
org.jibx.binding.def | ++ |
org.jibx.extras | +Extra goodies for working with JiBX. | +
org.jibx.runtime | +User interface to JiBX data binding framework runtime. | +
org.jibx.runtime.impl | +JiBX data binding framework runtime implementation package. | +
+
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+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 | +
---|
+java.lang.Throwable m_rootCause+
+
+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 | +
---|
+ +
+
+
+
|
++ + | +|||||
+ PREV + NEXT | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.HashMapperStringToSchemaType ++
public class HashMapperStringToSchemaType
+
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.
++ +
+
+Field Summary | +|
---|---|
+static int |
+BOOLEAN_TYPE
+
++ |
+
+static int |
+BYTE_TYPE
+
++ |
+
+static int |
+BYTERRAY_TYPE
+
++ |
+
+static int |
+DATE_TYPE
+
++ |
+
+static int |
+DATETIME_TYPE
+
++ |
+
+static int |
+DECIMAL_TYPE
+
++ |
+
+private static int |
+DEFAULT_SIZE
+
++ |
+
+static int |
+DOUBLE_TYPE
+
++ |
+
+private static java.lang.String |
+ENTRY_ELEMENT_NAME
+
++ |
+
+static int |
+FLOAT_TYPE
+
++ |
+
+static int |
+INT_TYPE
+
++ |
+
+static int |
+INTEGER_TYPE
+
++ |
+
+private static java.lang.String |
+KEY_ATTRIBUTE_NAME
+
++ |
+
+static int |
+LONG_TYPE
+
++ |
+
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_uri
+
++ |
+
+private static EnumSet |
+s_javaTypesEnum
+
++ |
+
+private static EnumSet |
+s_schemaTypesEnum
+
++ |
+
+private static java.lang.String[] |
+SCHEMA_NAMESPACE_PREFIXES
+
++ |
+
+private static java.lang.String[] |
+SCHEMA_NAMESPACE_URIS
+
++ |
+
+static int |
+SHORT_TYPE
+
++ |
+
+private static java.lang.String |
+SIZE_ATTRIBUTE_NAME
+
++ |
+
+static int |
+STRING_TYPE
+
++ |
+
+static int |
+TIME_TYPE
+
++ |
+
+private static java.lang.String |
+TYPE_ATTRIBUTE_NAME
+
++ |
+
+private static java.lang.String |
+XSD_NAMESPACE_PREFIX
+
++ |
+
+private static java.lang.String |
+XSD_NAMESPACE_URI
+
++ |
+
+private static java.lang.String |
+XSD_PREFIX_LEAD
+
++ |
+
+private static java.lang.String |
+XSI_NAMESPACE_PREFIX
+
++ |
+
+private static java.lang.String |
+XSI_NAMESPACE_URI
+
++ |
+
+Constructor Summary | +|
---|---|
HashMapperStringToSchemaType()
+
++ Default constructor. |
+|
HashMapperStringToSchemaType(java.lang.String uri,
+ int index,
+ java.lang.String name)
+
++ Aliased constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private static final java.lang.String SIZE_ATTRIBUTE_NAME+
+private static final java.lang.String ENTRY_ELEMENT_NAME+
+private static final java.lang.String KEY_ATTRIBUTE_NAME+
+private static final java.lang.String TYPE_ATTRIBUTE_NAME+
+private static final java.lang.String XSI_NAMESPACE_URI+
+private static final java.lang.String XSD_NAMESPACE_URI+
+private static final java.lang.String[] SCHEMA_NAMESPACE_URIS+
+private static final java.lang.String XSI_NAMESPACE_PREFIX+
+private static final java.lang.String XSD_NAMESPACE_PREFIX+
+private static final java.lang.String[] SCHEMA_NAMESPACE_PREFIXES+
+private static final java.lang.String XSD_PREFIX_LEAD+
+private static final int DEFAULT_SIZE+
+public static final int BOOLEAN_TYPE+
+public static final int BYTE_TYPE+
+public static final int DOUBLE_TYPE+
+public static final int FLOAT_TYPE+
+public static final int INT_TYPE+
+public static final int LONG_TYPE+
+public static final int SHORT_TYPE+
+public static final int DATETIME_TYPE+
+public static final int DATE_TYPE+
+public static final int TIME_TYPE+
+public static final int DECIMAL_TYPE+
+public static final int INTEGER_TYPE+
+public static final int BYTERRAY_TYPE+
+public static final int STRING_TYPE+
+private static final EnumSet s_javaTypesEnum+
+private static final EnumSet s_schemaTypesEnum+
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+Constructor Detail | +
---|
+public HashMapperStringToSchemaType()+
+
+public HashMapperStringToSchemaType(java.lang.String uri, + int index, + java.lang.String name)+
+
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 definitionsname
- local name for the top-level element+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.QName ++
public class QName
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_prefix
+
++ |
+
+private java.lang.String |
+m_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 QName |
+deserialize(java.lang.String text,
+ IUnmarshallingContext ictx)
+
++ JiBX deserializer method. |
+
+ java.lang.String |
+getName()
+
++ Get local name. |
+
+ java.lang.String |
+getPrefix()
+
++ Get namespace prefix. |
+
+ java.lang.String |
+getUri()
+
++ Get namespace URI. |
+
+static java.lang.String |
+serialize(QName qname,
+ IMarshallingContext ictx)
+
++ JiBX serializer method. |
+
+ void |
+setName(java.lang.String name)
+
++ Set local name. |
+
+ void |
+setPrefix(java.lang.String prefix)
+
++ Set namespace prefix. |
+
+ void |
+setUri(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 | +
---|
+private java.lang.String m_uri+
+private java.lang.String m_prefix+
+private java.lang.String m_name+
+Constructor Detail | +
---|
+public QName()+
+
+public QName(java.lang.String uri, + java.lang.String prefix, + java.lang.String name)+
+
uri
- prefix
- name
- +Method Detail | +
---|
+public java.lang.String getName()+
+
+public void setName(java.lang.String name)+
+
name
- name+public java.lang.String getPrefix()+
+
+public void setPrefix(java.lang.String prefix)+
+
prefix
- prefix+public java.lang.String getUri()+
+
+public void setUri(java.lang.String uri)+
+
uri
- uri+public static QName deserialize(java.lang.String text, + IUnmarshallingContext ictx) + throws JiBXException+
+
text
- value textictx
- unmarshalling context
+JiBXException
- on error in unmarshalling+public static java.lang.String serialize(QName qname, + IMarshallingContext ictx) + throws JiBXException+
+
text
- value textictx
- unmarshalling context
+JiBXException
- on error in marshalling
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase ++
public class DocumentModelMapperBase
+
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.
++ +
+
+Field Summary | +|
---|---|
+protected UnmarshallingContext |
+m_unmarshalContext
+
++ Context being used for unmarshalling. |
+
+protected IXMLWriter |
+m_xmlWriter
+
++ Writer for direct output as XML. |
+
+static java.lang.String |
+XML_NAMESPACE
+
++ Fixed XML namespace. |
+
+static java.lang.String |
+XMLNS_NAMESPACE
+
++ Fixed XML namespace namespace. |
+
+Constructor Summary | +|
---|---|
DocumentModelMapperBase()
+
++ |
+
+Method Summary | +|
---|---|
+protected java.lang.String |
+accumulateText()
+
++ Accumulate text content. |
+
+protected java.lang.String |
+getNamespaceUri(int index)
+
++ Get namespace URI for index. |
+
+protected int |
+getNextNamespaceIndex()
+
++ Get next namespace index. |
+
+protected boolean |
+isWhitespace(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 | +
---|
+public static final java.lang.String XML_NAMESPACE+
+
+public static final java.lang.String XMLNS_NAMESPACE+
+
+protected IXMLWriter m_xmlWriter+
+
+protected UnmarshallingContext m_unmarshalContext+
+
+Constructor Detail | +
---|
+public DocumentModelMapperBase()+
+Method Detail | +
---|
+protected java.lang.String getNamespaceUri(int index)+
+
index
- namespace index to look up
++protected int getNextNamespaceIndex()+
+
+protected java.lang.String accumulateText() + throws JiBXException+
+
JiBXException
- on error in unmarshalling+protected boolean isWhitespace(char chr)+
+
chr
- character to be checked
+true
if whitespace, false
if not
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.Dom4JMapperBase + org.jibx.extras.Dom4JElementMapper ++
public class Dom4JElementMapper
+
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.
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_index
+
++ Namespace URI index in binding. |
+
+private java.lang.String |
+m_name
+
++ Root element name. |
+
+private java.lang.String |
+m_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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private final java.lang.String m_uri+
+
+private final int m_index+
+
+private final java.lang.String m_name+
+
+Constructor Detail | +
---|
+public Dom4JElementMapper()+
+
+public Dom4JElementMapper(java.lang.String uri, + int index, + java.lang.String name)+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the top-level element+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.TestRoundtrip ++
public class TestRoundtrip
+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. +
+ +
+
+Constructor Summary | +|
---|---|
TestRoundtrip()
+
++ |
+
+Method Summary | +|
---|---|
+static void |
+main(java.lang.String[] args)
+
++ |
+
+protected static boolean |
+runTest(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 | +
---|
+public TestRoundtrip()+
+Method Detail | +
---|
+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+
java.io.IOException
+JiBXException
+org.xmlpull.v1.XmlPullParserException
+public static void main(java.lang.String[] args)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.Dom4JMapperBase ++
public class Dom4JMapperBase
+
Base implementation for custom marshaller/unmarshallers to dom4j + representation. This provides the basic code used for both single element and + content list handling.
++ +
+
+Field Summary | +|
---|---|
+protected int |
+m_defaultNamespaceIndex
+
++ Current default namespace index. |
+
+protected java.lang.String |
+m_defaultNamespaceURI
+
++ Current default namespace URI ( null if not determined). |
+
+private static org.dom4j.DocumentFactory |
+s_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 int |
+findNamespaceIndex(org.dom4j.Namespace ns)
+
++ Get index number for declared namespace. |
+
+protected void |
+marshalContent(java.util.List content)
+
++ Marshal content list. |
+
+protected void |
+marshalElement(org.dom4j.Element element)
+
++ Marshal element with all attributes and content. |
+
+protected void |
+unmarshalContent(java.util.List content)
+
++ Unmarshal element content. |
+
+protected org.dom4j.Element |
+unmarshalElement()
+
++ 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 | +
---|
+private static org.dom4j.DocumentFactory s_factory+
+
+protected java.lang.String m_defaultNamespaceURI+
null
if not determined).
++
+protected int m_defaultNamespaceIndex+
+
+Constructor Detail | +
---|
+public Dom4JMapperBase()+
+Method Detail | +
---|
+private int findNamespaceIndex(org.dom4j.Namespace ns)+
+
ns
- namespace of interest
+-1
if not declared or
+ masked+protected void marshalContent(java.util.List content) + throws JiBXException, + java.io.IOException+
+
content
- list of content items to marshal
+JiBXException
- on error in marshalling
+java.io.IOException
- on error writing to output+protected void marshalElement(org.dom4j.Element element) + throws JiBXException, + java.io.IOException+
+
element
- element to be marshalled
+JiBXException
- on error in marshalling
+java.io.IOException
- on error writing to output+protected void unmarshalContent(java.util.List content) + throws JiBXException, + java.io.IOException+
+
content
- list for unmarshalled content
+JiBXException
- on error in unmarshalling
+java.io.IOException
- on error reading input+protected org.dom4j.Element unmarshalElement() + throws JiBXException, + java.io.IOException+
+
JiBXException
- on error in unmarshalling
+java.io.IOException
- on error reading input
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DiscardListMapper ++
public class DiscardListMapper
+
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.
++ +
+
+Constructor Summary | +|
---|---|
DiscardListMapper()
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+public DiscardListMapper()+
+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx)+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.TestMultRoundtrip ++
public class TestMultRoundtrip
+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 . +
+ +
+
+Constructor Summary | +|
---|---|
TestMultRoundtrip()
+
++ |
+
+Method Summary | +|
---|---|
+static void |
+main(java.lang.String[] args)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+public TestMultRoundtrip()+
+Method Detail | +
---|
+public static void main(java.lang.String[] args)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.DomMapperBase + org.jibx.extras.DomListMapper ++
public class DomListMapper
+
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.
+ +
+
+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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+public DomListMapper() + throws JiBXException+
+
JiBXException
- on configuration error+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.ObjectArrayMapper ++
public class ObjectArrayMapper
+
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.
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.Object[] |
+DUMMY_ARRAY
+
++ |
+
+private java.util.ArrayList |
+m_holder
+
++ |
+
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_uri
+
++ |
+
+Constructor Summary | +|
---|---|
ObjectArrayMapper()
+
++ Default constructor. |
+|
ObjectArrayMapper(java.lang.String uri,
+ int index,
+ java.lang.String name)
+
++ Aliased constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private static final java.lang.Object[] DUMMY_ARRAY+
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+private java.util.ArrayList m_holder+
+Constructor Detail | +
---|
+public ObjectArrayMapper()+
+
+public ObjectArrayMapper(java.lang.String uri, + int index, + java.lang.String name)+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the top-level element+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.extras.JDOMWriter ++
public class JDOMWriter
+JDOM implementation of XML writer interface. The Document
that is
+ created can be accessed by using getDocument()
.
+
+ +
+
+Field Summary | +|
---|---|
+private org.jdom.Element |
+currentElement
+
++ The currently open Element that is used for add* methods. |
+
+private org.jdom.Document |
+document
+
++ 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 | +|
---|---|
+ void |
+addAttribute(int index,
+ java.lang.String name,
+ java.lang.String value)
+
++ Add attribute to current open start tag. |
+
+ void |
+close()
+
++ Does nothing. |
+
+ void |
+closeEmptyTag()
+
++ Close the current open start tag as an empty element. |
+
+ void |
+closeStartTag()
+
++ Close the current open start tag. |
+
+protected void |
+defineNamespace(int index,
+ java.lang.String prefix)
+
++ Does nothing. |
+
+ void |
+endTag(int index,
+ java.lang.String name)
+
++ Generate end tag. |
+
+ void |
+flush()
+
++ Does nothing. |
+
+ org.jdom.Document |
+getDocument()
+
++ |
+
+private org.jdom.Namespace |
+getNamespace(int index)
+
++ This will retrieve (if in existence) or create (if not) a + Namespace for the supplied namespace index. |
+
+ void |
+indent()
+
++ Does nothing. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+setIndentSpaces(int count,
+ java.lang.String newline,
+ char indent)
+
++ Does nothing. |
+
+ void |
+startTagClosed(int index,
+ java.lang.String name)
+
++ Generate closed start tag. |
+
+ void |
+startTagNamespaces(int index,
+ java.lang.String name,
+ int[] nums,
+ java.lang.String[] prefs)
+
++ Generate start tag for element with namespaces. |
+
+ void |
+startTagOpen(int index,
+ java.lang.String name)
+
++ Generate open start tag. |
+
+protected void |
+undefineNamespace(int index)
+
++ Does nothing. |
+
+ void |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+ void |
+writeComment(java.lang.String text)
+
++ Write comment to document. |
+
+ void |
+writeDocType(java.lang.String name,
+ java.lang.String sys,
+ java.lang.String pub,
+ java.lang.String subset)
+
++ Write DOCTYPE declaration to document. |
+
+ void |
+writeEntityRef(java.lang.String name)
+
++ Write entity reference to document. |
+
+ void |
+writePI(java.lang.String target,
+ java.lang.String data)
+
++ Write processing instruction to document. |
+
+ void |
+writeTextContent(java.lang.String text)
+
++ Write ordinary character data text content to document. |
+
+ void |
+writeXMLDecl(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 | +
---|
+private org.jdom.Document document+
Document
this writer is creating.
++
+private org.jdom.Element currentElement+
Element
that is used for add* methods.
++
+Constructor Detail | +
---|
+public JDOMWriter(java.lang.String[] namespaces)+
+
+public JDOMWriter(java.lang.String[] namespaces, + org.jdom.Document document)+
+
document
- must not be null+public JDOMWriter(java.lang.String[] namespaces, + org.jdom.Element currentElement)+
+
currentElement
- must not be null+Method Detail | +
---|
+public void setIndentSpaces(int count, + java.lang.String newline, + char indent)+
+
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+public void writeXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + throws java.io.IOException+
+
version
- XML version textencoding
- text for encoding attribute (unspecified if
+ null
)standalone
- text for standalone attribute (unspecified if
+ null
)
+java.io.IOException
- on error writing to document+public void startTagOpen(int index, + java.lang.String name) + throws java.io.IOException+
IXMLWriter
IXMLWriter.closeStartTag()
call.
++
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void startTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + throws java.io.IOException+
IXMLWriter
+
index
- namespace URI index numbername
- element namenums
- 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)
+java.io.IOException
- on error writing to document+public void addAttribute(int index, + java.lang.String name, + java.lang.String value) + throws java.io.IOException+
IXMLWriter
IXMLWriter.startTagOpen(int, java.lang.String)
and before the corresponding call to IXMLWriter.closeStartTag()
.
++
index
- namespace URI index numbername
- unqualified attribute namevalue
- text value for attribute
+java.io.IOException
- on error writing to document+public void closeStartTag() + throws java.io.IOException+
IXMLWriter
IXMLWriter.startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+public void closeEmptyTag() + throws java.io.IOException+
IXMLWriter
IXMLWriter.startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+public void startTagClosed(int index, + java.lang.String name) + throws java.io.IOException+
IXMLWriter
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void endTag(int index, + java.lang.String name) + throws java.io.IOException+
IXMLWriter
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void writeTextContent(java.lang.String text) + throws java.io.IOException+
IXMLWriter
+
text
- content value text (must not be null
)
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text) + throws java.io.IOException+
IXMLWriter
+
text
- content value text (must not be null
)
+java.io.IOException
- on error writing to document+public void writeComment(java.lang.String text) + throws java.io.IOException+
IXMLWriter
+
text
- comment text (must not be null
)
+java.io.IOException
- on error writing to document+public void writeEntityRef(java.lang.String name) + throws java.io.IOException+
IXMLWriter
+
name
- entity name (must not be null
)
+java.io.IOException
- on error writing to document+public void writeDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + throws java.io.IOException+
IXMLWriter
+
name
- root element namesys
- 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)
+java.io.IOException
- on error writing to document+public void writePI(java.lang.String target, + java.lang.String data) + throws java.io.IOException+
IXMLWriter
+
target
- processing instruction target name (must not be
+ null
)data
- processing instruction data (must not be null
)
+java.io.IOException
- on error writing to document+public void indent() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void flush() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void close() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void reset()+
XMLWriterNamespaceBase
+
reset
in interface IXMLWriter
reset
in class XMLWriterNamespaceBase
+public org.jdom.Document getDocument()+
Document
this writer created.+protected void defineNamespace(int index, + java.lang.String prefix) + throws java.io.IOException+
+
defineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index numberprefix
- prefix used for namespace
+java.io.IOException
- if error writing to document+protected void undefineNamespace(int index)+
+
undefineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index number+private org.jdom.Namespace getNamespace(int index)+
Namespace
for the supplied namespace index.
++
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.DomMapperBase + org.jibx.extras.DomFragmentMapper ++
public class DomFragmentMapper
+
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.
+ +
+
+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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+public DomFragmentMapper() + throws JiBXException+
+
JiBXException
- on configuration error+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.HashMapperStringToComplex ++
public class HashMapperStringToComplex
+
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.
++ +
+
+Field Summary | +|
---|---|
+private static int |
+DEFAULT_SIZE
+
++ |
+
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_uri
+
++ |
+
+Constructor Summary | +|
---|---|
HashMapperStringToComplex()
+
++ Default constructor. |
+|
HashMapperStringToComplex(java.lang.String uri,
+ int index,
+ java.lang.String name)
+
++ Aliased constructor. |
+
+Method Summary | +|
---|---|
+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. |
+
+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. |
+
+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. |
+
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private static final int DEFAULT_SIZE+
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+Constructor Detail | +
---|
+public HashMapperStringToComplex()+
+
+public HashMapperStringToComplex(java.lang.String uri, + int index, + java.lang.String name)+
+
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 definitionsname
- local name for the top-level element+Method Detail | +
---|
+protected java.lang.String getSizeAttributeName()+
null
.
++
+protected java.lang.String getEntryElementName()+
+
+protected java.lang.String getKeyAttributeName()+
+
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.IdRefMapperBase ++
public abstract class IdRefMapperBase
+
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.
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_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.String |
+getAttributeName()
+
++ Method which can be overridden to supply a different name for the ID + reference attribute. |
+
+protected abstract java.lang.String |
+getIdValue(java.lang.Object item)
+
++ Get the ID value from object being marshalled. |
+
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+Constructor Detail | +
---|
+public IdRefMapperBase(java.lang.String uri, + int index, + java.lang.String name)+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the top-level element+Method Detail | +
---|
+protected abstract java.lang.String getIdValue(java.lang.Object item)+
+
+protected java.lang.String getAttributeName()+
+
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentComparator ++
public class DocumentComparator
+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. +
+ +
+
+Field Summary | +|
---|---|
+protected java.io.PrintStream |
+m_differencePrint
+
++ Print stream for reporting differences. |
+
+protected org.xmlpull.v1.XmlPullParser |
+m_parserA
+
++ Parser for first document. |
+
+protected org.xmlpull.v1.XmlPullParser |
+m_parserB
+
++ Parser for second document. |
+
+Constructor Summary | +|
---|---|
DocumentComparator(java.io.PrintStream print)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected java.lang.String |
+buildPositionString(org.xmlpull.v1.XmlPullParser parser)
+
++ Build parse input position description. |
+
+ 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. |
+
+protected boolean |
+matchAttributes()
+
++ Verifies that the attributes on the current start tags match. |
+
+protected boolean |
+matchNames()
+
++ Verifies that the current start or end tag names match. |
+
+protected void |
+printError(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 | +
---|
+protected org.xmlpull.v1.XmlPullParser m_parserA+
+
+protected org.xmlpull.v1.XmlPullParser m_parserB+
+
+protected java.io.PrintStream m_differencePrint+
+
+Constructor Detail | +
---|
+public DocumentComparator(java.io.PrintStream print) + throws org.xmlpull.v1.XmlPullParserException+
+
print
- print stream for reporting differences
+org.xmlpull.v1.XmlPullParserException
- on error creating parsers+Method Detail | +
---|
+protected java.lang.String buildPositionString(org.xmlpull.v1.XmlPullParser parser)+
+
parser
- for which to build description
++protected void printError(java.lang.String msg)+
+
msg
- error message text+protected boolean matchAttributes()+
+
true
if the attributes match, false
if
+ not+protected boolean matchNames()+
+
true
if the names match, false
if not+public boolean compare(java.io.Reader rdra, + java.io.Reader rdrb)+
+
rdra
- reader for first document to be comparedrdrb
- reader for second document to be compared
+true
if the documents are the same,
+ false
if they're different
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.IdDefRefMapperBase ++
public abstract class IdDefRefMapperBase
+
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.
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_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.String |
+getAttributeName()
+
++ Method which can be overridden to supply a different name for the ID + reference attribute. |
+
+protected abstract java.lang.String |
+getIdValue(java.lang.Object item)
+
++ Get the ID value from object being marshalled. |
+
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ictx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+Constructor Detail | +
---|
+public IdDefRefMapperBase(java.lang.String uri, + int index, + java.lang.String name)+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the reference element+Method Detail | +
---|
+protected abstract java.lang.String getIdValue(java.lang.Object item)+
+
+protected java.lang.String getAttributeName()+
+
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ictx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.DomMapperBase ++
public class DomMapperBase
+
Base implementation for custom marshaller/unmarshallers to DOM + representation. This provides the basic code used for both single element and + content list handling.
++ +
+
+Field Summary | +|
---|---|
+protected int |
+m_defaultNamespaceIndex
+
++ Current default namespace index. |
+
+protected java.lang.String |
+m_defaultNamespaceURI
+
++ Current default namespace URI ( null if not determined). |
+
+protected org.w3c.dom.Document |
+m_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 int |
+findNamespaceIndex(java.lang.String prefix,
+ java.lang.String uri)
+
++ Get index number for declared namespace. |
+
+protected void |
+marshalContent(org.w3c.dom.NodeList content)
+
++ Marshal node list. |
+
+protected void |
+marshalElement(org.w3c.dom.Element element)
+
++ Marshal element with all attributes and content. |
+
+protected void |
+marshalNode(org.w3c.dom.Node node)
+
++ Marshal node. |
+
+protected void |
+unmarshalContent(org.w3c.dom.Node parent)
+
++ Unmarshal node content. |
+
+protected org.w3c.dom.Element |
+unmarshalElement()
+
++ Unmarshal element with all attributes and content. |
+
+protected org.w3c.dom.Node |
+unmarshalNode()
+
++ 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 | +
---|
+protected org.w3c.dom.Document m_document+
+
+protected java.lang.String m_defaultNamespaceURI+
null
if not determined).
++
+protected int m_defaultNamespaceIndex+
+
+Constructor Detail | +
---|
+protected DomMapperBase() + throws JiBXException+
+
JiBXException
- on error creating document+Method Detail | +
---|
+private int findNamespaceIndex(java.lang.String prefix, + java.lang.String uri)+
+
prefix
- namespace prefix (null
if none)uri
- namespace URI (empty string if none)
+-1
if not declared or
+ masked+protected void marshalNode(org.w3c.dom.Node node) + throws JiBXException, + java.io.IOException+
+
node
- node to be marshalled
+JiBXException
- on error in marshalling
+java.io.IOException
- on error writing to output+protected void marshalContent(org.w3c.dom.NodeList content) + throws JiBXException, + java.io.IOException+
+
content
- list of nodes to marshal
+JiBXException
- on error in marshalling
+java.io.IOException
- on error writing to output+protected void marshalElement(org.w3c.dom.Element element) + throws JiBXException, + java.io.IOException+
+
element
- element to be marshalled
+JiBXException
- on error in marshalling
+java.io.IOException
- on error writing to output+protected org.w3c.dom.Node unmarshalNode() + throws JiBXException, + java.io.IOException+
+
JiBXException
- on error in unmarshalling
+java.io.IOException
- on error reading input+protected void unmarshalContent(org.w3c.dom.Node parent) + throws JiBXException, + java.io.IOException+
+
parent
- node to which children are to be added
+JiBXException
- on error in unmarshalling
+java.io.IOException
- on error reading input+protected org.w3c.dom.Element unmarshalElement() + throws JiBXException, + java.io.IOException+
+
JiBXException
- on error in unmarshalling
+java.io.IOException
- on error reading input
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.Dom4JMapperBase + org.jibx.extras.Dom4JListMapper ++
public class Dom4JListMapper
+
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.
+ +
+
+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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+public Dom4JListMapper()+
+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +BindingSelector + +DiscardElementMapper + +DiscardListMapper + +DocumentComparator + +DocumentModelMapperBase + +Dom4JElementMapper + +Dom4JListMapper + +Dom4JMapperBase + +DomElementMapper + +DomFragmentMapper + +DomListMapper + +DomMapperBase + +HashMapperStringToComplex + +HashMapperStringToSchemaType + +IdDefRefMapperBase + +IdRefMapperBase + +JDOMWriter + +ObjectArrayMapper + +QName + +TestMultRoundtrip + +TestRoundtrip + +TypedArrayMapper |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Class Summary | +|
---|---|
BindingSelector | +Binding selector that supports versioned XML documents. | +
DiscardElementMapper | +Custom marshaller/unmarshaller for arbitrary ignored element. | +
DiscardListMapper | +Custom marshaller/unmarshaller for arbitrary ignored content to end of + element. | +
DocumentComparator | +XML document comparator. | +
DocumentModelMapperBase | +Base implementation for custom marshaller/unmarshallers to any document + model representation. | +
Dom4JElementMapper | +Custom element marshaller/unmarshaller to dom4j representation. | +
Dom4JListMapper | +Custom content list marshaller/unmarshaller to dom4j representation. | +
Dom4JMapperBase | +Base implementation for custom marshaller/unmarshallers to dom4j + representation. | +
DomElementMapper | +Custom element marshaller/unmarshaller to DOM representation. | +
DomFragmentMapper | +Custom content list marshaller/unmarshaller to DOM representation. | +
DomListMapper | +Custom content list marshaller/unmarshaller to DOM representation. | +
DomMapperBase | +Base implementation for custom marshaller/unmarshallers to DOM + representation. | +
HashMapperStringToComplex | +Custom marshaller/unmarshaller for java.util.Map
+ instances. |
+
HashMapperStringToSchemaType | +Custom marshaller/unmarshaller for java.util.Map
+ instances. |
+
IdDefRefMapperBase | +Abstract base custom marshaller/unmarshaller for an object that may have + multiple references. | +
IdRefMapperBase | +Abstract base custom marshaller/unmarshaller for an object reference. | +
JDOMWriter | +JDOM implementation of XML writer interface. | +
ObjectArrayMapper | +Custom marshaller/unmarshaller for Object[] instances. |
+
QName | +Representation of a qualified name. | +
TestMultRoundtrip | +Test program for the JiBX framework. | +
TestRoundtrip | +Test program for the JiBX framework. | +
TypedArrayMapper | +Custom marshaller/unmarshaller for reference arrays of a particular type. | +
+Extra goodies for working with JiBX. These are helper classes that can be useful +but are not core to the JiBX framework. +
+ +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.BindingSelector ++
public class BindingSelector
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String |
+m_attributeName
+
++ Name of version selection attribute. |
+
+private java.lang.String |
+m_attributeUri
+
++ URI of version selection attribute. |
+
+private UnmarshallingContext |
+m_context
+
++ Basic unmarshalling context used to determine document version. |
+
+private java.lang.String |
+m_outputEncoding
+
++ Encoding for output stream. |
+
+private int |
+m_outputIndent
+
++ Indentation for marshalling. |
+
+private java.io.OutputStream |
+m_outputStream
+
++ Stream for marshalling output. |
+
+private java.io.Writer |
+m_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 | +|
---|---|
+ IUnmarshallingContext |
+getContext()
+
++ Get initial unmarshalling context. |
+
+ void |
+marshalVersioned(java.lang.Object obj,
+ java.lang.String version)
+
++ Marshal according to supplied version. |
+
+ void |
+setIndent(int indent)
+
++ Set nesting indent spaces. |
+
+ void |
+setOutput(java.io.OutputStream outs,
+ java.lang.String enc)
+
++ Set output stream and encoding. |
+
+ void |
+setOutput(java.io.Writer outw)
+
++ Set output writer. |
+
+ java.lang.Object |
+unmarshalVersioned(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 | +
---|
+private final java.lang.String m_attributeUri+
+
+private final java.lang.String m_attributeName+
+
+private final java.lang.String[] m_versionTexts+
+
+private final java.lang.String[] m_versionBindings+
+
+private final UnmarshallingContext m_context+
+
+private java.io.OutputStream m_outputStream+
+
+private java.lang.String m_outputEncoding+
+
+private java.io.Writer m_outputWriter+
+
+private int m_outputIndent+
+
+Constructor Detail | +
---|
+public BindingSelector(java.lang.String uri, + java.lang.String name, + java.lang.String[] versions, + java.lang.String[] bindings)+
+
uri
- version selection attribute URI (null
if none)name
- version selection attribute nameversions
- array of version texts (first is default)bindings
- array of binding names corresponding to versions+Method Detail | +
---|
+public IUnmarshallingContext getContext()+
unmarshalVersioned(java.lang.Class)
.
++
+public void setOutput(java.io.OutputStream outs, + java.lang.String enc)+
+
outs
- stream for document data outputenc
- document output encoding, or null
for default+public void setOutput(java.io.Writer outw)+
+
outw
- writer for document data output+public void setIndent(int indent)+
+
indent
- number of spaces to indent per level, or disable
+ indentation if negative+public void marshalVersioned(java.lang.Object obj, + java.lang.String version) + throws JiBXException+
+
obj
- root object to be marshalledversion
- identifier for version to be used in marshalling
+JiBXException
- if error in marshalling+public java.lang.Object unmarshalVersioned(java.lang.Class clas) + throws JiBXException+
+
clas
- expected class mapped to root element of document (used only
+ to look up the binding)
+JiBXException
- if error in unmarshalling
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DocumentModelMapperBase + org.jibx.extras.DomMapperBase + org.jibx.extras.DomElementMapper ++
public class DomElementMapper
+
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.
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_index
+
++ Namespace URI index in binding. |
+
+private java.lang.String |
+m_name
+
++ Root element name. |
+
+private java.lang.String |
+m_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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private final java.lang.String m_uri+
+
+private final int m_index+
+
+private final java.lang.String m_name+
+
+Constructor Detail | +
---|
+public DomElementMapper() + throws JiBXException+
+
JiBXException
- on error creating document+public DomElementMapper(java.lang.String uri, + int index, + java.lang.String name) + throws JiBXException+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the top-level element
+JiBXException
- on error creating document+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.DiscardElementMapper ++
public class DiscardElementMapper
+
Custom marshaller/unmarshaller for arbitrary ignored element. This ignores + an element when unmarshalling, if one is present, and does nothing when + marshalling.
++ +
+
+Constructor Summary | +|
---|---|
DiscardElementMapper()
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+public DiscardElementMapper()+
+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx)+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.extras.TypedArrayMapper ++
public class TypedArrayMapper
+
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.
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.Object[] |
+DUMMY_ARRAY
+
++ |
+
+private java.lang.Object[] |
+m_baseArray
+
++ |
+
+private java.util.ArrayList |
+m_holder
+
++ |
+
+private int |
+m_index
+
++ |
+
+private java.lang.String |
+m_name
+
++ |
+
+private java.lang.String |
+m_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 | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ictx)
+
++ Marshal instance of handled class. |
+
+ java.lang.Object |
+unmarshal(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 | +
---|
+private static final java.lang.Object[] DUMMY_ARRAY+
+private java.lang.String m_uri+
+private int m_index+
+private java.lang.String m_name+
+private java.lang.Object[] m_baseArray+
+private java.util.ArrayList m_holder+
+Constructor Detail | +
---|
+public TypedArrayMapper(java.lang.String uri, + int index, + java.lang.String name, + java.lang.String type)+
+
uri
- namespace URI for the top-level elementindex
- namespace index corresponding to the defined URI within the
+ marshalling context definitionsname
- local name for the top-level elementtype
- class name for type of items in array+public TypedArrayMapper(java.lang.String type)+
+
type
- class name for type of items in array+Method Detail | +
---|
+public boolean isExtension(int index)+
IMarshaller
+
isExtension
in interface IMarshaller
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+public void marshal(java.lang.Object obj, + IMarshallingContext ictx) + throws JiBXException+
IMarshaller
+
marshal
in interface IMarshaller
obj
- object to be marshalled (may be null
if property
+ is not optional)ictx
- XML text output context
+JiBXException
- on error in marshalling process+public boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
IUnmarshaller
+
isPresent
in interface IUnmarshaller
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+public java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ictx) + throws JiBXException+
IUnmarshaller
+
unmarshal
in interface IUnmarshaller
obj
- object to be unmarshalled (may be null
)ictx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.ClassLoader + java.security.SecureClassLoader + java.net.URLClassLoader + org.jibx.binding.Loader ++
public class Loader
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.util.ArrayList |
+m_bindings
+
++ Binding definitions used by loader. |
+
+private java.util.HashMap |
+m_classMap
+
++ Map of classes modified by binding. |
+
+private boolean |
+m_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.Class |
+findClass(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. |
+
+ void |
+loadBinding(java.lang.String fname,
+ java.lang.String sname,
+ java.io.InputStream is,
+ java.net.URL url)
+
++ Load binding definition. |
+
+ void |
+loadFileBinding(java.lang.String path)
+
++ Load binding definition from file path. |
+
+ void |
+loadResourceBinding(java.lang.String path)
+
++ Load binding definition from file path. |
+
+ void |
+processBindings()
+
++ Process the binding definitions. |
+
+ void |
+reset()
+
++ 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 | +
---|
+private java.util.ArrayList m_bindings+
+
+private boolean m_isBound+
+
+private java.util.HashMap m_classMap+
+
+Constructor Detail | +
---|
+public Loader(java.net.URL[] paths, + java.lang.ClassLoader parent)+
+
paths
- array of classpath URLsparent
- classloader used for delegation loading+public Loader(java.net.URL[] paths)+
+
paths
- array of classpath URLs+public Loader() + throws java.net.MalformedURLException+
+
java.net.MalformedURLException
- on error in classpath URLs+Method Detail | +
---|
+public void reset()+
+
+public static java.net.URL[] getClassPaths() + throws java.net.MalformedURLException+
+
java.net.MalformedURLException
+public void loadBinding(java.lang.String fname, + java.lang.String sname, + java.io.InputStream is, + java.net.URL url) + throws JiBXException, + java.io.IOException+
+
fname
- binding definition full namesname
- short form of name to use as the default name of the bindingis
- input stream for binding definition documenturl
- URL for binding definition (null
if not
+ available)
+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+public void loadFileBinding(java.lang.String path) + throws JiBXException, + java.io.IOException+
+
path
- binding definition file path
+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+public void loadResourceBinding(java.lang.String path) + throws JiBXException, + java.io.IOException+
+
path
- binding definition file path
+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+public void processBindings() + throws JiBXException+
+
JiBXException
- if error in processing the binding definition+protected java.lang.Class findClass(java.lang.String name) + throws java.lang.ClassNotFoundException+
+
findClass
in class java.net.URLClassLoader
name
- fully qualified package and class name to be found
+java.lang.ClassNotFoundException
- if the class cannot be foundClassLoader.findClass(java.lang.String)
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.ClassLoader + java.security.SecureClassLoader + java.net.URLClassLoader + org.jibx.binding.Compile.DirectLoader ++
private static class Compile.DirectLoader
+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.Class |
+load(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 | +
---|
+protected Compile.DirectLoader(java.net.URL[] urls)+
+Method Detail | +
---|
+protected java.lang.Class load(java.lang.String name, + byte[] data)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.Run ++
public class Run
+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. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+BINDING_LIST_RESOURCE
+
++ |
+
+private static java.lang.String |
+DEFAULT_BINDING_RESOURCE
+
++ |
+
+Constructor Summary | +|
---|---|
+private |
+Run()
+
++ |
+
+Method Summary | +|
---|---|
+private static void |
+addBindings(java.io.InputStream is,
+ java.util.ArrayList bindings)
+
++ Accumulate list of bindings from stream. |
+
+static void |
+main(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 | +
---|
+private static final java.lang.String BINDING_LIST_RESOURCE+
+private static final java.lang.String DEFAULT_BINDING_RESOURCE+
+Constructor Detail | +
---|
+private Run()+
+Method Detail | +
---|
+private static void addBindings(java.io.InputStream is, + java.util.ArrayList bindings) + throws java.io.IOException+
+
is
- stream to be read for list of bindings (one per line)bindings
- accumulated collection of bindings
+java.io.IOException
+public static void main(java.lang.String[] args)+
+
args
- command line arguments
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.Utility ++
public class Utility
+Binding compiler support class. Supplies common methods for use in compiling + binding definitions. +
+ +
+
+Field Summary | +|
---|---|
+private static int |
+COPY_BUFFER_SIZE
+
++ |
+
+Constructor Summary | +|
---|---|
+private |
+Utility()
+
++ |
+
+Method Summary | +|
---|---|
+static java.lang.String |
+convertName(java.lang.String name)
+
++ Generate binding name. |
+
+static java.lang.String |
+fileName(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 BindingDefinition |
+loadBinding(java.lang.String fname,
+ java.lang.String sname,
+ java.io.InputStream istrm,
+ java.net.URL url,
+ boolean test)
+
++ Load validated binding definition. |
+
+static BindingDefinition |
+loadFileBinding(java.lang.String path,
+ boolean valid)
+
++ Load binding definition from file. |
+
+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. |
+
+static org.jibx.binding.model.BindingElement |
+validateBinding(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 | +
---|
+private static final int COPY_BUFFER_SIZE+
+Constructor Detail | +
---|
+private Utility()+
+Method Detail | +
---|
+private static byte[] getStreamData(java.io.InputStream is) + throws java.io.IOException+
+
is
- input stream to be read
+java.io.IOException
- on stream access error+private static void recursePathJars(java.lang.String path, + java.util.ArrayList paths)+
+
path
- jar path componentpaths
- set of paths processed (added to by call)+public static java.lang.String[] getClassPaths()+
+
+public static java.lang.String convertName(java.lang.String name)+
+
name
- base binding name
++public static java.lang.String fileName(java.lang.String path)+
+
path
- full file path
++public static org.jibx.binding.model.BindingElement validateBinding(java.lang.String name, + java.net.URL url, + java.io.InputStream is)+
+
name
- identifier for binding definitionurl
- URL for binding definition (null
if not
+ available)is
- input stream for reading binding definition
+null
if one or more errors in binding+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+
+
fname
- binding definition full namesname
- short form of name to use as the default name of the bindingistrm
- input stream for binding definition documenturl
- URL for binding definition (null
if not
+ available)test
- validate binding flag
+java.io.FileNotFoundException
- if path cannot be accessed
+JiBXException
- if error in processing the binding definition
+java.io.IOException
+public static BindingDefinition loadFileBinding(java.lang.String path, + boolean valid) + throws JiBXException, + java.io.IOException+
+
path
- file path for binding definitionvalid
- validate binding flag
+java.io.IOException
- if error accessing file
+JiBXException
- if error in processing the binding definition
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.SchemaGenerator ++
public class SchemaGenerator
+Binding generator. This loads the specified input classes and processes them + to generate a default binding definition. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+CURRENT_VERSION
+
++ Generator version. |
+
+private org.jibx.binding.model.IClassLocator |
+m_classLocator
+
++ Locator for finding classes referenced by binding. |
+
+private org.w3c.dom.Document |
+m_document
+
++ Document used for all schema definitions. |
+
+private java.lang.String |
+m_indentSequence
+
++ Indentation sequence per level of nesting. |
+
+private boolean |
+m_isAttributeQualified
+
++ Use qualified attributes default in schema flag. |
+
+private boolean |
+m_isElementQualified
+
++ Use qualified elements default in schema flag. |
+
+private java.util.HashMap |
+m_schemaMap
+
++ Map from namespaces to schemas. |
+
+private org.jibx.binding.util.ObjectStack |
+m_structureStack
+
++ Stack of structure definitions in progress (used to detect cycles). |
+
+private boolean |
+m_verbose
+
++ Show verbose output flag. |
+
+private static java.util.HashMap |
+s_objectTypeMap
+
++ Set of object types mapped to schema types. |
+
+private static java.util.HashMap |
+s_primitiveTypeMap
+
++ Set of primitive types mapped to schema types. |
+
+static java.lang.String |
+XML_URI
+
++ Fixed XML namespace. |
+
+static java.lang.String |
+XMLNS_URI
+
++ Fixed XML namespace namespace. |
+
+private static java.lang.String |
+XSD_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.Element |
+addChildElement(org.w3c.dom.Element parent,
+ java.lang.String name)
+
++ Add child element with appropriate indentation. |
+
+private void |
+addComment(org.w3c.dom.Element parent,
+ java.lang.String text)
+
++ Add comment with appropriate indentation. |
+
+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. |
+
+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. |
+
+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. |
+
+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. |
+
+ void |
+generate(org.jibx.binding.model.BindingElement binding)
+
++ Process a binding definition for schema generation. |
+
+private void |
+generateSchema(org.jibx.binding.model.BindingElement binding)
+
++ Generate a schema from a binding using supplied classpaths. |
+
+ org.jibx.binding.model.DefinitionContext |
+getDefinitions()
+
++ Get innermost containing definition context. |
+
+ org.w3c.dom.Element[] |
+getSchemas()
+
++ Get array of generated schemas. |
+
+private void |
+indentForClose(org.w3c.dom.Element parent)
+
++ Generate indentation to proper depth for current item. |
+
+static void |
+main(java.lang.String[] args)
+
++ Main method for running compiler as application. |
+
+ void |
+setAttributeQualified(boolean qual)
+
++ Set control flag for attribute qualified default schema. |
+
+ void |
+setElementQualified(boolean qual)
+
++ Set control flag for element qualified default schema. |
+
+ void |
+setVerbose(boolean verbose)
+
++ Set control flag for verbose processing reports. |
+
+private java.lang.String |
+simpleClassName(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 | +
---|
+private static java.lang.String CURRENT_VERSION+
+
+private static final java.lang.String XSD_URI+
+
+public static final java.lang.String XML_URI+
+
+public static final java.lang.String XMLNS_URI+
+
+private static java.util.HashMap s_objectTypeMap+
+
+private static java.util.HashMap s_primitiveTypeMap+
+
+private boolean m_verbose+
+
+private boolean m_isElementQualified+
+
+private boolean m_isAttributeQualified+
+
+private java.lang.String m_indentSequence+
+
+private java.util.HashMap m_schemaMap+
+
+private org.jibx.binding.model.IClassLocator m_classLocator+
+
+private org.w3c.dom.Document m_document+
+
+private org.jibx.binding.util.ObjectStack m_structureStack+
+
+Constructor Detail | +
---|
+public SchemaGenerator(java.util.ArrayList paths)+
+
paths
- class paths to be checked for classes referenced by bindings+public SchemaGenerator(boolean verbose, + boolean equal, + boolean aqual, + java.util.ArrayList paths)+
+
verbose
- report binding details and resultsequal
- use element form default qualified flagaqual
- use attribute form default qualified flagpaths
- class paths to be checked for classes referenced by bindings+Method Detail | +
---|
+public void setVerbose(boolean verbose)+
+
verbose
- report verbose information in processing bindings flag+public void setElementQualified(boolean qual)+
+
qual
- element qualified default schemas flag+public void setAttributeQualified(boolean qual)+
+
qual
- attribute qualified default schemas flag+public org.w3c.dom.Element[] getSchemas()+
+
+private void indentForClose(org.w3c.dom.Element parent)+
+
parent
- element to contain indented child item+private void addComment(org.w3c.dom.Element parent, + java.lang.String text)+
+
parent
- element to contain indented child itemtext
- comment text+private org.w3c.dom.Element addChildElement(org.w3c.dom.Element parent, + java.lang.String name)+
+
parent
- element to contain indented child itemname
- child element name+public org.jibx.binding.model.DefinitionContext getDefinitions()+
+
+private void defineEmptyStructureComponent(org.jibx.binding.model.StructureElementBase comp, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup)+
+
comp
- structure component to be processedegroup
- schema element to contain element definitionsagroup
- schema element to contain attribute definitions+private void defineStructureComponent(org.jibx.binding.model.StructureElementBase comp, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup, + boolean mult)+
+
comp
- structure component to be processedegroup
- schema element to contain element definitionsagroup
- schema element to contain attribute definitionsmult
- allow any number of occurrences of components flag+private void defineList(java.util.ArrayList comps, + org.w3c.dom.Element egroup, + org.w3c.dom.Element agroup, + boolean mult)+
+
comps
- binding component listegroup
- schema element to contain element definitionsagroup
- schema element to contain attribute definitionsmult
- allow any number of occurrences of components flag+private org.w3c.dom.Element defineNestedStructure(org.jibx.binding.model.ContainerElementBase container, + org.w3c.dom.Element parent)+
+
container
- binding definition element containing nested structureparent
- schema element to hold the definition
++private void generateSchema(org.jibx.binding.model.BindingElement binding)+
+
binding
- root element of binding+public void generate(org.jibx.binding.model.BindingElement binding) + throws JiBXException+
+
binding
- root element of binding
+JiBXException
- if error in generating the schema+private java.lang.String simpleClassName(java.lang.String cname)+
+
cname
- class name with full package specification
++public static void main(java.lang.String[] args)+
+
args
- command line arguments
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.BindingGenerator ++
public class BindingGenerator
+Binding generator. This loads the specified input classes and processes them + to generate a default binding definition. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+CURRENT_VERSION
+
++ Generator version. |
+
+private java.util.HashMap |
+m_beanNames
+
++ Class names to properties list map. |
+
+private java.util.HashMap |
+m_enumerationNames
+
++ Class names to deserializers map for typesafe enumerations. |
+
+private java.util.HashSet |
+m_ignoreNames
+
++ Class names to be treated like interfaces (not mapped directly). |
+
+private java.util.HashMap |
+m_mappedNames
+
++ Class names to mapped element names map. |
+
+private boolean |
+m_mixedCase
+
++ Use camel case for XML names flag. |
+
+private java.lang.String |
+m_namespaceUri
+
++ Namespace URI for elements. |
+
+private java.util.HashSet |
+m_structureNames
+
++ Class names bound as nested structures. |
+
+private org.jibx.binding.util.ObjectStack |
+m_structureStack
+
++ Stack of structure definitions in progress (used to detect cycles). |
+
+private boolean |
+m_verbose
+
++ Show verbose output flag. |
+
+private static java.util.HashSet |
+s_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.String |
+convertName(java.lang.String base)
+
++ Convert class or unprefixed field name to element or attribute name. |
+
+private org.jibx.binding.model.MappingElement |
+createMapping(ClassFile cf,
+ boolean abstr)
+
++ Create the mapping element for a particular class. |
+
+private org.jibx.binding.model.StructureElement |
+createStructure(ClassFile cf,
+ java.lang.String fname)
+
++ Create the structure element for a particular class. |
+
+private void |
+defineFields(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 void |
+defineProperties(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 void |
+defineStructure(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.String |
+elementName(java.lang.String cname)
+
++ Generate structure element name from class name using set conversions. |
+
+static void |
+findClassesUsed(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.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)
+
++ Generate a set of bindings using supplied classpaths and class names. |
+
+private static boolean |
+isMappable(java.lang.String cname)
+
++ |
+
+static void |
+main(java.lang.String[] args)
+
++ Main method for running compiler as application. |
+
+private void |
+nestingIndent(java.io.PrintStream pw)
+
++ Indent to proper depth for current item. |
+
+ void |
+setCamelCase(boolean camel)
+
++ Set control flag for camel case element naming. |
+
+ void |
+setVerbose(boolean verbose)
+
++ Set control flag for verbose processing reports. |
+
+private java.lang.String |
+valueName(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 | +
---|
+private static java.lang.String CURRENT_VERSION+
+
+private static java.util.HashSet s_objectPrimitiveSet+
+
+private boolean m_verbose+
+
+private boolean m_mixedCase+
+
+private java.lang.String m_namespaceUri+
+
+private java.util.HashMap m_mappedNames+
+
+private java.util.HashMap m_beanNames+
+
+private java.util.HashMap m_enumerationNames+
+
+private org.jibx.binding.util.ObjectStack m_structureStack+
+
+private java.util.HashSet m_structureNames+
+
+private java.util.HashSet m_ignoreNames+
+
+Constructor Detail | +
---|
+public BindingGenerator()+
+
+public BindingGenerator(boolean verbose, + boolean mixed, + java.lang.String uri)+
+
verbose
- report binding details and resultsmixed
- use camel case in element namesuri
- namespace URI for element bindings+Method Detail | +
---|
+public void setVerbose(boolean verbose)+
+
verbose
- report verbose information in processing bindings flag+public void setCamelCase(boolean camel)+
+
camel
- use camel case element naming flag+private void nestingIndent(java.io.PrintStream pw)+
+
pw
- output print stream to be indented+private java.lang.String convertName(java.lang.String base)+
+
base
- class or simple field name to be converted
++public java.lang.String elementName(java.lang.String cname)+
+
cname
- class name to be converted
++private java.lang.String valueName(java.lang.String fname)+
+
fname
- field name to be converted
++private void defineFields(ClassFile cf, + org.jibx.binding.model.ContainerElementBase contain) + throws JiBXException+
+
cf
- class informationcontain
- binding structure container element
+JiBXException
- on error in binding generation+private void defineProperties(ClassFile cf, + java.util.ArrayList props, + boolean internal, + org.jibx.binding.model.ContainerElementBase contain) + throws JiBXException+
+
cf
- class informationprops
- list of properties specified for classinternal
- allow private get/set methods flagcontain
- binding structure container element
+JiBXException
- on error in binding generation+private void defineStructure(ClassFile cf, + org.jibx.binding.model.ContainerElementBase contain) + throws JiBXException+
+
cf
- class informationcontain
- binding structure container element
+JiBXException
- on error in binding generation+private org.jibx.binding.model.StructureElement createStructure(ClassFile cf, + java.lang.String fname) + throws JiBXException+
+
cf
- class informationfname
- name of field supplying reference
+JiBXException
- on error in binding generation+private org.jibx.binding.model.MappingElement createMapping(ClassFile cf, + boolean abstr) + throws JiBXException+
+
cf
- class informationabstr
- force abstract mapping flag
+JiBXException
- on error in binding generation+private static boolean isMappable(java.lang.String cname)+
+public static void findClassesUsed(java.lang.String cname, + java.util.ArrayList mnames, + java.util.HashSet dataset, + java.util.HashSet exceptset) + throws JiBXException+
java.lang.String
, and java.lang.Object
.
+ Exception classes thrown by the methods are also optionally accumulated.
++
cname
- target class namemnames
- method names to be checkeddataset
- 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
)
+JiBXException
- on error in loading class information+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+
+
names
- list of class names to be included in bindingabstracts
- set of classes to be handled with abstract mappings in
+ bindingcustoms
- map of customized class names to marshaller/unmarshaller
+ class namesbeans
- map of class names to supplied lists of propertiesenums
- map of typesafe enumeration classes to deserializer methodsignores
- list of non-interface classes to be treated as interfaces
+ (no mapping, but mapped subclasses are used at runtime)
+JiBXException
- if error in generating the binding definition+public static void main(java.lang.String[] args)+
+
args
- command line arguments
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.Compile ++
public class Compile
+Binding compiler. This version checks the modified and generated classes + by loading them and listing method information. +
+ +
+
+Nested Class Summary | +|
---|---|
+private static class |
+Compile.DirectLoader
+
++ Direct class loader. |
+
+Field Summary | +|
---|---|
+private boolean |
+m_errorOverride
+
++ |
+
+private boolean |
+m_load
+
++ |
+
+private boolean |
+m_skipValidate
+
++ |
+
+private boolean |
+m_trackBranches
+
++ |
+
+private boolean |
+m_verbose
+
++ |
+
+private boolean |
+m_verify
+
++ |
+
+Constructor Summary | +|
---|---|
Compile()
+
++ Default constructor. |
+|
Compile(boolean verbose,
+ boolean load,
+ boolean verify,
+ boolean track,
+ boolean over)
+
++ Constructor with settings specified. |
+
+Method Summary | +|
---|---|
+ void |
+compile(java.lang.String[] paths,
+ java.lang.String[] files)
+
++ Compile a set of bindings using supplied classpaths. |
+
+private void |
+handleOutput(java.lang.String[] paths)
+
++ Output all generated and modified class files. |
+
+static void |
+main(java.lang.String[] args)
+
++ Main method for running compiler as application. |
+
+ void |
+setLoad(boolean load)
+
++ Set control flag for test loading generated/modified classes. |
+
+ void |
+setSkipValidate(boolean skip)
+
++ Set control flag for skipping binding validation. |
+
+ void |
+setVerbose(boolean verbose)
+
++ Set control flag for verbose processing reports. |
+
+ void |
+setVerify(boolean verify)
+
++ Set control flag for verifying generated/modified classes with BCEL. |
+
+private boolean |
+verifyBCEL(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 | +
---|
+private boolean m_verbose+
+private boolean m_load+
+private boolean m_verify+
+private boolean m_trackBranches+
+private boolean m_errorOverride+
+private boolean m_skipValidate+
+Constructor Detail | +
---|
+public Compile()+
+
+public Compile(boolean verbose, + boolean load, + boolean verify, + boolean track, + boolean over)+
+
verbose
- report binding details and resultsload
- test load modified classes to validateverify
- use BCEL validation of modified classestrack
- keep tracking information for source of branch generationover
- override code generation error handling+Method Detail | +
---|
+private boolean verifyBCEL(ClassFile file)+
+
file
- information for class to be verified
+true
if successfully verified, false
if
+ problem found (automatically reported)+private void handleOutput(java.lang.String[] paths) + throws JiBXException, + java.io.IOException+
+
paths
- array of paths used for loading files
+JiBXException
- if error in processing the binding definition
+java.io.IOException
- if path cannot be accessed+public void setLoad(boolean load)+
+
load
- test load generated/modified classes flag+public void setVerbose(boolean verbose)+
+
verbose
- report verbose information in processing bindings flag+public void setVerify(boolean verify)+
+
verify
- use BCEL verification for generated/modified classes flag+public void setSkipValidate(boolean skip)+
+
skip
- test load generated/modified classes flag+public void compile(java.lang.String[] paths, + java.lang.String[] files) + throws JiBXException+
+
paths
- list of paths for loading classesfiles
- list of binding definition files
+JiBXException
- if error in processing the binding definition+public static void main(java.lang.String[] args)+
+
args
- command line arguments
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +BindingGenerator + +Compile + +Compile.DirectLoader + +Loader + +Run + +SchemaGenerator + +Utility |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
BindingGenerator | +Binding generator. | +
Compile | +Binding compiler. | +
Compile.DirectLoader | +Direct class loader. | +
Loader | +Binding classloader. | +
Run | +Bind-on-load class runner. | +
SchemaGenerator | +Binding generator. | +
Utility | +Binding compiler support class. | +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IMapping
+Interface for mapping definitions. This defines the additional access methods + used with mappings (beyond those used with ordinary components). +
+ +
+
+Method Summary | +|
---|---|
+ void |
+addExtension(MappingDefinition mdef)
+
++ Add extension to abstract mapping. |
+
+ void |
+addNamespace(NamespaceDefinition ns)
+
++ Add namespace. |
+
+ IComponent |
+buildRef(IContainer parent,
+ IContextObj objc,
+ java.lang.String type,
+ PropertyDefinition prop)
+
++ Build reference to mapping. |
+
+ void |
+generateCode(boolean force)
+
++ Generate required code for mapping. |
+
+ java.lang.String |
+getBoundType()
+
++ Get class name handled by mapping. |
+
+ IComponent |
+getImplComponent()
+
++ Get binding component implementing mapping. |
+
+ int |
+getIndex()
+
++ Get mapped class index number. |
+
+ ClassFile |
+getMarshaller()
+
++ Get marshaller class used for mapping. |
+
+ NameDefinition |
+getName()
+
++ Get mapped element name. |
+
+ java.lang.String |
+getReferenceType()
+
++ Get class name of type to be assumed for references to this mapping. |
+
+ java.lang.String |
+getTypeName()
+
++ Get type name. |
+
+ ClassFile |
+getUnmarshaller()
+
++ Get unmarshaller class used for mapping. |
+
+ boolean |
+isAbstract()
+
++ Check if mapping is abstract. |
+
+ boolean |
+isBase()
+
++ 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 | +
---|
+java.lang.String getBoundType()+
+
+java.lang.String getReferenceType()+
+
+IComponent getImplComponent()+
+
+ClassFile getMarshaller() + throws JiBXException+
+
JiBXException
- if error in configuration+ClassFile getUnmarshaller() + throws JiBXException+
+
JiBXException
- if error in configuration+NameDefinition getName()+
+
null
if no
+ element name defined for mapping)+java.lang.String getTypeName()+
+
null
if unnamed)+int getIndex()+
+
+void addNamespace(NamespaceDefinition ns) + throws JiBXException+
+
ns
- namespace definition to be added
+JiBXException
- if error in defining namespace+boolean isAbstract()+
+
true
if an abstract mapping, false
if
+ not+boolean isBase()+
+
true
if one or more mappings extend this mapping,
+ false
if not+void addExtension(MappingDefinition mdef) + throws JiBXException+
+
mdef
- extension mapping definition
+JiBXException
- if configuration error+IComponent buildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + throws JiBXException+
+
parent
- containing binding definition structureobjc
- current object contexttype
- mapped value typeprop
- property definition (may be null
)
+JiBXException
- if configuration error+void generateCode(boolean force) + throws JiBXException+
+
force
- add marshaller/unmarshaller classes for abstract non-base
+ mappings flag (not passed on to children)
+JiBXException
- if error in transformation
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.BaseMappingWrapper ++
public class BaseMappingWrapper
+Component decorator for abstract base mapping from extension mapping. This + just handles necessary glue code generation. +
+ +
+
+Field Summary | +
---|
Fields inherited from class org.jibx.binding.def.PassThroughComponent | +
---|
m_component |
+
+Constructor Summary | +|
---|---|
BaseMappingWrapper(IComponent wrap)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ void |
+print(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 | +
---|
+public BaseMappingWrapper(IComponent wrap)+
+
wrap
- wrapped binding component+Method Detail | +
---|
+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
genAttributeUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
genContentUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genNewInstance
in interface IComponent
genNewInstance
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IComponent
+Child component (attribute or content) interface definition. This interface + provides the basic hooks for generating code from the binding definition. +
+ +
+
+Method Summary | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ Establish and validate linkages between binding components. |
+
+Method Detail | +
---|
+boolean isOptional()+
+
true
if optional, false
if required+boolean hasAttribute()+
+
true
if one or more attribute values defined for
+ containing element, false
if not+void genAttrPresentTest(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if configuration error+void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+boolean hasContent()+
setLinkages()
.
++
true
if one or more content values defined
+ for containing element, false
if not+void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if configuration error+void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+void genNewInstance(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+java.lang.String getType()+
+
+boolean hasId()+
+
true
if ID value defined for instances,
+ false
if not+void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
String
).
++
mb
- method builder
+JiBXException
- if configuration error+boolean checkContentSequence(boolean text) + throws JiBXException+
+
text
- allow text value flag from last component
+JiBXException
- if error in configuration+void setLinkages() + throws JiBXException+
+
JiBXException
- if error in configuration+void print(int depth)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.DirectObject ++
public class DirectObject
+Linkage to object with supplied marshaller and unmarshaller. This provides + methods used to generate code for calling the supplied classes. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+ABSTRACTMARSHAL_METHOD
+
++ |
+
+private static java.lang.String |
+ABSTRACTMARSHAL_SIGNATURE
+
++ |
+
+private static java.lang.String |
+ABSTRACTMARSHALLER_INTERFACE
+
++ |
+
+private static java.lang.String |
+ALIASABLE_INTERFACETYPE
+
++ |
+
+private static java.lang.String |
+ANY_INIT_SIG
+
++ |
+
+private static java.lang.String |
+ANY_INITCLASS_SIG
+
++ |
+
+private static java.lang.String |
+GETMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+GETMARSHALLER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+GETUNMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+GETUNMARSHALLER_SIGNATURE
+
++ |
+
+private DefinitionContext |
+m_defContext
+
++ Definition context for resolving names. |
+
+private boolean |
+m_isAbstract
+
++ Abstract mapping flag. |
+
+private boolean |
+m_isSlotSet
+
++ Flag for marshaller/unmarshaller slot defined. |
+
+private ClassFile |
+m_marshaller
+
++ Marshaller class (lazy create on first use if name supplied). |
+
+private ClassFile |
+m_marshallerBase
+
++ Marshaller base class. |
+
+private int |
+m_mumSlot
+
++ Marshaller/unmarshaller slot number. |
+
+private NameDefinition |
+m_name
+
++ Element name information ( null if no bound element). |
+
+private IContainer |
+m_parent
+
++ Containing binding definition structure. |
+
+private ClassFile |
+m_targetClass
+
++ Class handled by this binding. |
+
+private ClassFile |
+m_unmarshaller
+
++ Unmarshaller class (lazy create on first use if name supplied). |
+
+private ClassFile |
+m_unmarshallerBase
+
++ Unmarshaller base class. |
+
+private static java.lang.String |
+MARSHALLER_MARSHAL_METHOD
+
++ |
+
+private static java.lang.String |
+MARSHALLER_MARSHAL_SIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHALONLY_INIT_SIG
+
++ |
+
+private static java.lang.String |
+MARSHALONLY_INITCLASS_SIG
+
++ |
+
+private static java.lang.String |
+MARSHALUNMARSHAL_INIT_SIG
+
++ |
+
+private static java.lang.String |
+MARSHALUNMARSHAL_INITCLASS_SIG
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_TESTPRESENT_METHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_TESTPRESENT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_UNMARSHAL_METHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_UNMARSHAL_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALONLY_INIT_SIG
+
++ |
+
+private static java.lang.String |
+UNMARSHALONLY_INITCLASS_SIG
+
++ |
+
+Constructor Summary | +|
---|---|
DirectObject(IContainer parent,
+ DefinitionContext defc,
+ ClassFile target,
+ boolean abs,
+ ClassFile mcf,
+ ClassFile ucf,
+ int slot,
+ NameDefinition name)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+private void |
+createSubclass(boolean out)
+
++ Create aliased subclass for marshaller or unmarshaller with element name + defined by binding. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+private void |
+genLoadSlot(ContextMethodBuilder mb)
+
++ Load marshaller/unmarshaller index. |
+
+ void |
+genMarshal(ContextMethodBuilder mb)
+
++ Generate marshalling code for this mapping. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ void |
+genTestPresent(ContextMethodBuilder mb)
+
++ Generate presence test code for this mapping. |
+
+ void |
+genUnmarshal(ContextMethodBuilder mb)
+
++ Generate unmarshalling code for this mapping. |
+
+ ClassFile |
+getMarshaller()
+
++ Get marshaller class used for mapping. |
+
+ NameDefinition |
+getName()
+
++ Get mapped element name. |
+
+private int |
+getSlot()
+
++ Get marshaller/unmarshaller index. |
+
+ ClassFile |
+getTargetClass()
+
++ Get target class for mapping. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ ClassFile |
+getUnmarshaller()
+
++ Get unmarshaller class used for mapping. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private static final java.lang.String GETUNMARSHALLER_METHOD+
+private static final java.lang.String GETUNMARSHALLER_SIGNATURE+
+private static final java.lang.String GETMARSHALLER_METHOD+
+private static final java.lang.String GETMARSHALLER_SIGNATURE+
+private static final java.lang.String MARSHALLER_MARSHAL_METHOD+
+private static final java.lang.String MARSHALLER_MARSHAL_SIGNATURE+
+private static final java.lang.String UNMARSHALLER_TESTPRESENT_METHOD+
+private static final java.lang.String UNMARSHALLER_TESTPRESENT_SIGNATURE+
+private static final java.lang.String UNMARSHALLER_UNMARSHAL_METHOD+
+private static final java.lang.String UNMARSHALLER_UNMARSHAL_SIGNATURE+
+private static final java.lang.String ABSTRACTMARSHALLER_INTERFACE+
+private static final java.lang.String ABSTRACTMARSHAL_METHOD+
+private static final java.lang.String ABSTRACTMARSHAL_SIGNATURE+
+private static final java.lang.String ALIASABLE_INTERFACETYPE+
+private static final java.lang.String ANY_INIT_SIG+
+private static final java.lang.String ANY_INITCLASS_SIG+
+private static final java.lang.String MARSHALUNMARSHAL_INIT_SIG+
+private static final java.lang.String MARSHALONLY_INIT_SIG+
+private static final java.lang.String UNMARSHALONLY_INIT_SIG+
+private static final java.lang.String MARSHALUNMARSHAL_INITCLASS_SIG+
+private static final java.lang.String MARSHALONLY_INITCLASS_SIG+
+private static final java.lang.String UNMARSHALONLY_INITCLASS_SIG+
+private final IContainer m_parent+
+
+private final DefinitionContext m_defContext+
+
+private final boolean m_isAbstract+
+
+private final NameDefinition m_name+
null
if no bound element).
++
+private boolean m_isSlotSet+
+
+private int m_mumSlot+
+
+private final ClassFile m_targetClass+
+
+private final ClassFile m_marshallerBase+
+
+private final ClassFile m_unmarshallerBase+
+
+private ClassFile m_marshaller+
+
+private ClassFile m_unmarshaller+
+
+Constructor Detail | +
---|
+public DirectObject(IContainer parent, + DefinitionContext defc, + ClassFile target, + boolean abs, + ClassFile mcf, + ClassFile ucf, + int slot, + NameDefinition name) + throws JiBXException+
+
parent
- containing binding definition structuretarget
- class handled by this bindingabs
- abstract mapping flagmcf
- 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)
+JiBXException
- if configuration error+Method Detail | +
---|
+private int getSlot() + throws JiBXException+
+
JiBXException
- on configuration error+private void genLoadSlot(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
+private void createSubclass(boolean out) + throws JiBXException+
+
out
- true
if alias needed for marshalling,
+ false
if for unmarshalling
+JiBXException
- on configuration error+public void genTestPresent(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in generating code+public void genUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
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.
++
mb
- method builder
+JiBXException
- if error in generating code+public void genMarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+public ClassFile getTargetClass()+
+
+public NameDefinition getName()+
+
null
if no
+ element name defined for mapping)+public ClassFile getMarshaller() + throws JiBXException+
+
JiBXException
- if error in transformation+public ClassFile getUnmarshaller() + throws JiBXException+
+
JiBXException
- if error in transformation+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb)+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder+public void genAttributeUnmarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder+public void genAttributeMarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb)+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb)+
IComponent
String
).
++
genLoadId
in interface IComponent
mb
- method builder+public boolean checkContentSequence(boolean text)+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
++public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.ElementWrapper ++
public class ElementWrapper
+Component decorator for element definition. This associates an element name + with a component. +
+ +
+
+Field Summary | +|
---|---|
+private IComponent |
+m_component
+
++ Property value binding component. |
+
+private DefinitionContext |
+m_defContext
+
++ Binding definition context. |
+
+private boolean |
+m_directAccess
+
++ Flag for value from collection (TODO: fix this in update). |
+
+private NameDefinition |
+m_name
+
++ Element name information. |
+
+private boolean |
+m_optionalIgnored
+
++ Flag for optional ignored element (TODO: fix this in update). |
+
+private boolean |
+m_optionalNormal
+
++ Flag for optional normal element (TODO: fix this in update). |
+
+private boolean |
+m_structureObject
+
++ Flag for optional structure object (TODO: fix this in update). |
+
+private static java.lang.String |
+MARSHAL_CLOSESTARTCONTENT
+
++ |
+
+private static java.lang.String |
+MARSHAL_CLOSESTARTEMPTY
+
++ |
+
+private static java.lang.String |
+MARSHAL_CLOSESTARTSIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHAL_STARTNAMESPACESSIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITEENDMETHOD
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITEENDSIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITESTARTATTRIBUTES
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITESTARTNAMESPACES
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITESTARTNOATTRIBUTES
+
++ |
+
+private static java.lang.String |
+MARSHAL_WRITESTARTSIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHALLING_CONTEXT
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_ISATMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_ISATSIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSEENDMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSEENDSIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSEPASTSTART
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSESTARTATTRIBUTES
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSESTARTNOATTRIBUTES
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARSESTARTSIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_SKIPELEMENTMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_SKIPELEMENTSIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALLING_CONTEXT
+
++ |
+
+Constructor Summary | +|
---|---|
ElementWrapper(DefinitionContext defc,
+ NameDefinition name,
+ IComponent wrap)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setDirect(boolean direct)
+
++ Set the direct access flag. |
+
+ void |
+setLinkages()
+
++ Establish and validate linkages between binding components. |
+
+ void |
+setOptionalIgnored(boolean opt)
+
++ Set flag for an optional ignored element. |
+
+ void |
+setOptionalNormal(boolean opt)
+
++ Set flag for an optional normal element. |
+
+ void |
+setStructureObject(boolean opt)
+
++ Set flag for an optional structure object. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+private static final java.lang.String UNMARSHAL_PARSESTARTATTRIBUTES+
+private static final java.lang.String UNMARSHAL_PARSESTARTNOATTRIBUTES+
+private static final java.lang.String UNMARSHAL_PARSEPASTSTART+
+private static final java.lang.String UNMARSHAL_PARSESTARTSIGNATURE+
+private static final java.lang.String UNMARSHAL_PARSEENDMETHOD+
+private static final java.lang.String UNMARSHAL_PARSEENDSIGNATURE+
+private static final java.lang.String UNMARSHAL_ISATMETHOD+
+private static final java.lang.String UNMARSHAL_ISATSIGNATURE+
+private static final java.lang.String UNMARSHAL_SKIPELEMENTMETHOD+
+private static final java.lang.String UNMARSHAL_SKIPELEMENTSIGNATURE+
+private static final java.lang.String MARSHAL_WRITESTARTNAMESPACES+
+private static final java.lang.String MARSHAL_STARTNAMESPACESSIGNATURE+
+private static final java.lang.String MARSHAL_WRITESTARTATTRIBUTES+
+private static final java.lang.String MARSHAL_WRITESTARTNOATTRIBUTES+
+private static final java.lang.String MARSHAL_WRITESTARTSIGNATURE+
+private static final java.lang.String MARSHAL_CLOSESTARTCONTENT+
+private static final java.lang.String MARSHAL_CLOSESTARTEMPTY+
+private static final java.lang.String MARSHAL_CLOSESTARTSIGNATURE+
+private static final java.lang.String MARSHAL_WRITEENDMETHOD+
+private static final java.lang.String MARSHAL_WRITEENDSIGNATURE+
+private static final java.lang.String MARSHALLING_CONTEXT+
+private static final java.lang.String UNMARSHALLING_CONTEXT+
+private final IComponent m_component+
+
+private final DefinitionContext m_defContext+
+
+private final NameDefinition m_name+
+
+private boolean m_directAccess+
+
+private boolean m_optionalIgnored+
+
+private boolean m_optionalNormal+
+
+private boolean m_structureObject+
+
+Constructor Detail | +
---|
+public ElementWrapper(DefinitionContext defc, + NameDefinition name, + IComponent wrap)+
+
defc
- definition context for this componentname
- element name definitionwrap
- wrapped binding component (may be null
, in the
+ case of a throwaway component)+Method Detail | +
---|
+public void setDirect(boolean direct)+
+
direct
- true
if direct access from collection,
+ false
if not+public void setOptionalIgnored(boolean opt)+
+
opt
- true
if optional ignored element,
+ false
if not+public void setStructureObject(boolean opt)+
+
opt
- true
if optional structure object,
+ false
if not+public void setOptionalNormal(boolean opt)+
+
opt
- true
if optional normal element,
+ false
if not+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb)+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder+public void genAttributeUnmarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder+public void genAttributeMarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
genLoadId
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
+public java.lang.String toString()+
toString
in class java.lang.Object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.StringConversion + org.jibx.binding.def.ObjectStringConversion ++
public class ObjectStringConversion
+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.
+
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+FROMSTRING_SIGNATURE
+
++ |
+
+private ClassItem |
+m_initFromString
+
++ Initializer used for creating instance from String
+ (only used if no conversion needed and no deserializer supplied;
+ may be null ) |
+
+private ClassItem |
+m_instToString
+
++ toString() method for converting instance to
+ String (only used if conversion needed and no serializer
+ supplied; may be null ) |
+
+private boolean |
+m_needDeserialize
+
++ Flag for conversion from String needed (type is anything
+ other than String or Object ) |
+
+private boolean |
+m_needSerialize
+
++ Flag for conversion to String needed (type is anything
+ other than String ) |
+
+private static java.lang.String |
+TOSTRING_METHOD
+
++ |
+
+private static java.lang.String |
+TOSTRING_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.Object |
+convertDefault(java.lang.String text)
+
++ Convert text representation into default value object. |
+
+ StringConversion |
+derive(java.lang.String type,
+ java.lang.String ser,
+ java.lang.String dser,
+ java.lang.String dflt)
+
++ Derive from existing formatting information. |
+
+ void |
+genFromText(ContextMethodBuilder mb)
+
++ Generate code to convert String representation. |
+
+ void |
+genParseOptional(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert optional attribute or element. |
+
+ void |
+genParseRequired(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert required attribute or element. |
+
+protected BranchWrapper |
+genToOptionalText(java.lang.String type,
+ ContextMethodBuilder mb,
+ int extra)
+
++ Generate code to check if an optional value is not equal to the default. |
+
+ void |
+genToText(java.lang.String type,
+ ContextMethodBuilder mb)
+
++ Shared code generation for converting instance of type to + String . |
+
+private void |
+initMethods()
+
++ Initialize methods used for conversion of types without serializer or + deserializer. |
+
+ boolean |
+isPrimitive()
+
++ 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 | +
---|
+private static final java.lang.String TOSTRING_METHOD+
+private static final java.lang.String TOSTRING_SIGNATURE+
+private static final java.lang.String FROMSTRING_SIGNATURE+
+private boolean m_needDeserialize+
String
needed (type is anything
+ other than String
or Object
)
++
+private ClassItem m_initFromString+
String
+ (only used if no conversion needed and no deserializer supplied;
+ may be null
)
++
+private boolean m_needSerialize+
String
needed (type is anything
+ other than String
)
++
+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(java.lang.String type, + ObjectStringConversion inherit) + throws JiBXException+
+
type
- fully qualified name of class handled by conversioninherit
- conversion information inherited by this conversion
+JiBXException
- if error in configuration+ObjectStringConversion(java.lang.Object dflt, + java.lang.String ser, + java.lang.String deser, + java.lang.String type)+
+
dflt
- default value object (wrapped value for primitive types,
+ otherwise String
)ser
- fully qualified name of serialization methoddeser
- fully qualified name of deserialization methodtype
- fully qualified name of class handled by conversion+Method Detail | +
---|
+private void initMethods() + throws JiBXException+
+
JiBXException
+public void genFromText(ContextMethodBuilder mb) + throws JiBXException+
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.
++
genFromText
in class StringConversion
mb
- method builder
+JiBXException
- if error in configuration+public void genParseOptional(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
genParseOptional
in class StringConversion
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+public void genParseRequired(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
genParseRequired
in class StringConversion
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+public void genToText(java.lang.String type, + ContextMethodBuilder mb) + throws JiBXException+
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.
++
genToText
in class StringConversion
type
- fully qualified class name for value on stackmb
- marshal method builder
+JiBXException
- if error in configuration+protected BranchWrapper genToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + throws JiBXException+
+
genToOptionalText
in class StringConversion
type
- fully qualified class name for value on stackmb
- method builderextra
- count of extra values to be popped from stack if missing
+JiBXException
- if error in configuration+public boolean isPrimitive()+
+
isPrimitive
in class StringConversion
false
to indicate object type+protected java.lang.Object convertDefault(java.lang.String text) + throws JiBXException+
+
convertDefault
in class StringConversion
text
- value representation to be converted
+JiBXException
- on conversion error+public StringConversion derive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + throws JiBXException+
+
derive
in class StringConversion
type
- fully qualified name of class handled by conversionser
- 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)
+JiBXException
- if error in configuration information
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder.ContainerBase ++
static class BindingBuilder.ContainerBase
+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 int |
+m_accessLevel
+
++ Access level for default mappings. |
+
+protected int |
+m_autoLink
+
++ Auto-link style for default mappings. |
+
+protected IContainer |
+m_container
+
++ Containing binding component. |
+
+protected int |
+m_nameStyle
+
++ Style used for generating element or attribute names. |
+
+protected java.lang.String |
+m_stripPrefix
+
++ Prefix text to be stripped from names. |
+
+protected java.lang.String |
+m_stripSuffix
+
++ Suffix text to be stripped from names. |
+
+protected int |
+m_styleDefault
+
++ Default style for value expression. |
+
+Constructor Summary | +|
---|---|
BindingBuilder.ContainerBase(IContainer parent)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ int |
+getStyleDefault()
+
++ |
+
+ void |
+unmarshal(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 | +
---|
+protected IContainer m_container+
+
+protected int m_styleDefault+
+
+protected int m_autoLink+
+
+protected int m_accessLevel+
+
+protected java.lang.String m_stripPrefix+
+
+protected java.lang.String m_stripSuffix+
+
+protected int m_nameStyle+
+
+Constructor Detail | +
---|
+public BindingBuilder.ContainerBase(IContainer parent)+
+
parent
- containing binding definition context+Method Detail | +
---|
+public void unmarshal(UnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context information
+JiBXException
- if error in unmarshalling+public int getStyleDefault()+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionLoad ++
abstract static class NestedCollection.CollectionLoad
+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 void |
+genLoadDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after loading items from collection. |
+
+protected void |
+genLoadInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for loading items. |
+
+protected abstract BranchWrapper |
+genLoadItem(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()+
+Method Detail | +
---|
+protected void genLoadInit(ContextMethodBuilder mb) + throws JiBXException+
genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
+ method. The base class implementation does nothing.
++
mb
- method builder
+JiBXException
- if error in configuration+protected abstract BranchWrapper genLoadItem(ContextMethodBuilder mb) + throws JiBXException+
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.
++
mb
- method builder
+JiBXException
- if error in configuration+protected void genLoadDone(ContextMethodBuilder mb) + throws JiBXException+
genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionLoad + org.jibx.binding.def.NestedCollection.IndexedLoad ++
static class NestedCollection.IndexedLoad
+Collection item load strategy for collection with items accessed by + index number. +
+ +
+
+Field Summary | +|
---|---|
+private ClassItem |
+m_getMethod
+
++ Method used to get items by index from collection. |
+
+private ClassItem |
+m_sizeMethod
+
++ Method used to get count of items in collection. |
+
+Constructor Summary | +|
---|---|
NestedCollection.IndexedLoad(ClassItem size,
+ ClassItem get)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected void |
+genLoadDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after loading items from collection. |
+
+protected void |
+genLoadInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for loading items. |
+
+protected BranchWrapper |
+genLoadItem(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 | +
---|
+private final ClassItem m_sizeMethod+
+
+private final ClassItem m_getMethod+
+
+Constructor Detail | +
---|
+NestedCollection.IndexedLoad(ClassItem size, + ClassItem get)+
+
size
- method used to get count of items in collectionget
- method used to retrieve items by index from collection+Method Detail | +
---|
+protected void genLoadInit(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
+ method. The base class implementation does nothing.
++
genLoadInit
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected BranchWrapper genLoadItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
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.
++
genLoadItem
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected void genLoadDone(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
genLoadDone
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionLoad + org.jibx.binding.def.NestedCollection.ArrayLoad ++
static class NestedCollection.ArrayLoad
+Collection item load strategy for array. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String |
+m_itemType
+
++ Array item type. |
+
+private java.lang.Object |
+m_slotHandle
+
++ Handle for referencing loop counter local variable. |
+
+Constructor Summary | +|
---|---|
NestedCollection.ArrayLoad(java.lang.String itype)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected void |
+genLoadDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after loading items from collection. |
+
+protected void |
+genLoadInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for loading items. |
+
+protected BranchWrapper |
+genLoadItem(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 | +
---|
+private final java.lang.String m_itemType+
+
+private java.lang.Object m_slotHandle+
+
+Constructor Detail | +
---|
+NestedCollection.ArrayLoad(java.lang.String itype)+
+
itype
- array item type+Method Detail | +
---|
+protected void genLoadInit(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
+ method. The base class implementation does nothing.
++
genLoadInit
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected BranchWrapper genLoadItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
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.
++
genLoadItem
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected void genLoadDone(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
genLoadDone
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.StringConversion ++
public abstract class StringConversion
+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.
+
+ +
+
+Field Summary | +|
---|---|
+protected static java.lang.String |
+COMPARE_OBJECTS_METHOD
+
++ |
+
+protected static java.lang.String |
+COMPARE_OBJECTS_SIGNATURE
+
++ |
+
+protected static java.lang.String[] |
+DESERIALIZER_SIGNATURES
+
++ |
+
+protected java.lang.Object |
+m_default
+
++ Default value used for this type (wrapper for primitives, otherwise + String or null ). |
+
+protected ClassItem |
+m_deserializer
+
++ Deserializer method information. |
+
+protected java.lang.String |
+m_formatName
+
++ Name of format. |
+
+protected ClassItem |
+m_serializer
+
++ Serializer method information. |
+
+protected java.lang.String |
+m_typeName
+
++ Fully qualified name of class handled by conversion. |
+
+protected java.lang.String |
+m_typeSignature
+
++ Signature of class handled by conversion. |
+
+protected static java.lang.String |
+MARSHAL_ATTRIBUTE
+
++ |
+
+protected static java.lang.String |
+MARSHAL_ELEMENT
+
++ |
+
+static int |
+MARSHAL_NAME_VALUES
+
++ |
+
+protected static java.lang.String |
+MARSHAL_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_OPT_ATTRIBUTE
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_OPT_ELEMENT
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_OPT_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_REQ_ATTRIBUTE
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_REQ_ELEMENT
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_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.Object |
+convertDefault(java.lang.String text)
+
++ Convert text representation into default value object. |
+
+abstract StringConversion |
+derive(java.lang.String type,
+ java.lang.String ser,
+ java.lang.String dser,
+ java.lang.String dflt)
+
++ Derive from existing formatting information. |
+
+abstract void |
+genFromText(ContextMethodBuilder mb)
+
++ Generate code to convert String representation. |
+
+abstract void |
+genParseOptional(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert optional attribute or element. |
+
+abstract void |
+genParseRequired(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert required attribute or element. |
+
+ void |
+genPopValues(int count,
+ ContextMethodBuilder mb)
+
++ Generate code to pop values from stack. |
+
+protected abstract BranchWrapper |
+genToOptionalText(java.lang.String type,
+ ContextMethodBuilder mb,
+ int extra)
+
++ Generate code to check if an optional value is not equal to the default. |
+
+ void |
+genToText(java.lang.String type,
+ ContextMethodBuilder mb)
+
++ Generate code to convert value to a String . |
+
+ void |
+genWriteOptional(boolean attr,
+ java.lang.String type,
+ ContextMethodBuilder mb)
+
++ Generate code to convert and write optional value to generated document. |
+
+ void |
+genWriteRequired(boolean attr,
+ java.lang.String type,
+ ContextMethodBuilder mb)
+
++ Generate code to convert and write required value to generated document. |
+
+ void |
+genWriteText(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to write String value to generated document. |
+
+ java.lang.String |
+getTypeName()
+
++ Get name of type handled by this conversion. |
+
+abstract boolean |
+isPrimitive()
+
++ Check if the type handled by this conversion is of a primitive type. |
+
+protected void |
+setDeserializer(java.lang.String deser)
+
++ Set deserializer for conversion. |
+
+protected void |
+setSerializer(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 | +
---|
+protected static final java.lang.String UNMARSHAL_OPT_ATTRIBUTE+
+protected static final java.lang.String UNMARSHAL_OPT_ELEMENT+
+protected static final java.lang.String UNMARSHAL_OPT_SIGNATURE+
+protected static final java.lang.String UNMARSHAL_REQ_ATTRIBUTE+
+protected static final java.lang.String UNMARSHAL_REQ_ELEMENT+
+protected static final java.lang.String UNMARSHAL_REQ_SIGNATURE+
+protected static final java.lang.String MARSHAL_ATTRIBUTE+
+protected static final java.lang.String MARSHAL_ELEMENT+
+protected static final java.lang.String MARSHAL_SIGNATURE+
+protected static final java.lang.String COMPARE_OBJECTS_METHOD+
+protected static final java.lang.String COMPARE_OBJECTS_SIGNATURE+
+protected static final java.lang.String[] DESERIALIZER_SIGNATURES+
+public static final int MARSHAL_NAME_VALUES+
+protected java.lang.String m_formatName+
+
+protected java.lang.Object m_default+
String
or null
).
++
+protected ClassItem m_serializer+
+
+protected ClassItem m_deserializer+
+
+protected java.lang.String m_typeName+
+
+protected java.lang.String m_typeSignature+
+
+Constructor Detail | +
---|
+private StringConversion(java.lang.String type)+
+
type
- fully qualified name of class handled by conversion+protected StringConversion(java.lang.String type, + StringConversion inherit)+
+
type
- fully qualified name of class handled by conversioninherit
- conversion information inherited by this conversion+StringConversion(java.lang.Object dflt, + java.lang.String ser, + java.lang.String deser, + java.lang.String type)+
+
dflt
- default value object (wrapped value for primitive types,
+ otherwise String
)ser
- fully qualified name of serialization methoddeser
- fully qualified name of deserialization methodtype
- fully qualified name of class handled by conversion+Method Detail | +
---|
+public java.lang.String getTypeName()+
+
+public abstract void genFromText(ContextMethodBuilder mb) + throws JiBXException+
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.
++
mb
- method builder
+JiBXException
- if error in configuration+public abstract void genParseOptional(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+public abstract void genParseRequired(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+public void genWriteText(boolean attr, + ContextMethodBuilder mb)+
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.
++
attr
- item is an attribute (vs element) flagmb
- method builder+public void genPopValues(int count, + ContextMethodBuilder mb)+
+
count
- number of values to be poppedmb
- method builder+protected abstract BranchWrapper genToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + throws JiBXException+
+
type
- fully qualified class name for value on stackmb
- method builderextra
- count of extra words to be popped from stack if missing
+JiBXException
- if error in configuration+public void genToText(java.lang.String type, + ContextMethodBuilder mb) + throws JiBXException+
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.
++
type
- fully qualified class name for value on stackmb
- method builder
+JiBXException
- if error in configuration+public void genWriteOptional(boolean attr, + java.lang.String type, + ContextMethodBuilder mb) + throws JiBXException+
+
attr
- item is an attribute (vs element) flagtype
- fully qualified class name for value on stackmb
- method builder
+JiBXException
- if error in configuration+public void genWriteRequired(boolean attr, + java.lang.String type, + ContextMethodBuilder mb) + throws JiBXException+
+
attr
- item is an attribute (vs element) flagtype
- fully qualified class name for value on stackmb
- method builder
+JiBXException
- if error in configuration+public abstract boolean isPrimitive()+
+
true
if a primitive type, false
if an
+ object type+protected void setSerializer(java.lang.String ser) + throws JiBXException+
String
result.
++
ser
- fully qualified class and method name of serializer
+JiBXException
- if serializer not found or not usable+protected void setDeserializer(java.lang.String deser) + throws JiBXException+
String
, and to return a value of the handled type or a
+ subtype of that type.
++
deser
- fully qualified class and method name of deserializer
+JiBXException
- if deserializer not found or not usable+protected abstract java.lang.Object convertDefault(java.lang.String text) + throws JiBXException+
+
text
- value representation to be converted
+JiBXException
- on conversion error+public abstract StringConversion derive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + throws JiBXException+
+
type
- fully qualified name of class handled by conversionser
- 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)
+JiBXException
- if error in configuration information
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.ValueChild ++
public class ValueChild
+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.
+
+ +
+
+Field Summary | +|
---|---|
+(package private) static int |
+ATTRIBUTE_STYLE
+
++ |
+
+(package private) static int |
+AUTO_IDENT
+
++ |
+
+private static java.lang.String[] |
+BACKFILL_INTERFACES
+
++ |
+
+private static org.apache.bcel.generic.Type[] |
+BACKFILL_METHODARGS
+
++ |
+
+private static java.lang.String |
+BACKFILL_METHODNAME
+
++ |
+
+private static java.lang.String |
+BACKFILL_SUFFIX
+
++ Prefix used for backfill classes. |
+
+private static java.lang.String |
+BOUNDREF_NAME
+
++ |
+
+(package private) static int |
+CDATA_STYLE
+
++ |
+
+private static java.lang.String |
+CHECK_ATTRIBUTE_NAME
+
++ |
+
+private static java.lang.String |
+CHECK_ELEMENT_NAME
+
++ |
+
+private static java.lang.String |
+CHECK_SIGNATURE
+
++ |
+
+(package private) static int |
+DEF_IDENT
+
++ |
+
+private static java.lang.String |
+DEFINE_ID_NAME
+
++ |
+
+private static java.lang.String |
+DEFINE_ID_SIGNATURE
+
++ |
+
+(package private) static int |
+DIRECT_IDENT
+
++ |
+
+(package private) static int |
+ELEMENT_STYLE
+
++ |
+
+private java.lang.String |
+m_constantValue
+
++ Constant value. |
+
+private IContainer |
+m_container
+
++ Containing binding definition structure. |
+
+private StringConversion |
+m_conversion
+
++ Conversion handling for value. |
+
+private int |
+m_identType
+
++ Ident type code. |
+
+private IMapping |
+m_idRefMap
+
++ Mapping definition for object class supplying identifier. |
+
+private NameDefinition |
+m_name
+
++ Attribute or element name information. |
+
+private IContextObj |
+m_objContext
+
++ Containing object context. |
+
+private PropertyDefinition |
+m_property
+
++ Linked property information. |
+
+private java.lang.String |
+m_type
+
++ Fully qualified name of type. |
+
+private int |
+m_valueStyle
+
++ Value style code. |
+
+protected static java.lang.String |
+MARSHAL_ATTRIBUTE
+
++ |
+
+private static java.lang.String |
+MARSHAL_CDATA_NAME
+
++ |
+
+protected static java.lang.String |
+MARSHAL_ELEMENT
+
++ |
+
+protected static java.lang.String |
+MARSHAL_SIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHAL_TEXT_NAME
+
++ |
+
+private static java.lang.String |
+MARSHAL_TEXT_SIGNATURE
+
++ |
+
+(package private) static int |
+REF_IDENT
+
++ |
+
+private static java.lang.String |
+REGISTER_BACKFILL_NAME
+
++ |
+
+private static java.lang.String |
+REGISTER_BACKFILL_SIGNATURE
+
++ |
+
+(package private) static int |
+TEXT_STYLE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_DEFREF_ATTR_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_DEFREF_ELEM_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_DEFREF_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_FWDREF_ATTR_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_FWDREF_ELEM_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_TEXT_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_TEXT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALLING_THROWEXCEPTION_METHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHALLING_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 | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+private ClassFile |
+createBackfillClass()
+
++ Create backfill handler class if it does not already exist. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genIfPresentTest(UnmarshalBuilder mb)
+
++ Generate test if present code. |
+
+ void |
+genLoadId(ContextMethodBuilder mub)
+
++ Generate code to load ID value of instance to stack. |
+
+private void |
+genMarshal(ContextMethodBuilder mb)
+
++ Generate marshalling code. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+private void |
+genParseIdRef(ContextMethodBuilder mb)
+
++ Generate unmarshalling code for object identifier reference. |
+
+private void |
+genUnmarshal(ContextMethodBuilder mb)
+
++ Generate unmarshalling code. |
+
+ java.lang.String |
+getPropertyName()
+
++ Get property name. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+static final int DIRECT_IDENT+
+static final int AUTO_IDENT+
+static final int DEF_IDENT+
+static final int REF_IDENT+
+static final int ATTRIBUTE_STYLE+
+static final int ELEMENT_STYLE+
+static final int TEXT_STYLE+
+static final int CDATA_STYLE+
+private static final java.lang.String BACKFILL_SUFFIX+
+
+private static final java.lang.String[] BACKFILL_INTERFACES+
+private static final java.lang.String BACKFILL_METHODNAME+
+private static final org.apache.bcel.generic.Type[] BACKFILL_METHODARGS+
+private static final java.lang.String BOUNDREF_NAME+
+private static final java.lang.String CHECK_ELEMENT_NAME+
+private static final java.lang.String CHECK_ATTRIBUTE_NAME+
+private static final java.lang.String CHECK_SIGNATURE+
+private static final java.lang.String UNMARSHAL_DEFREF_ATTR_NAME+
+private static final java.lang.String UNMARSHAL_DEFREF_ELEM_NAME+
+private static final java.lang.String UNMARSHAL_FWDREF_ATTR_NAME+
+private static final java.lang.String UNMARSHAL_FWDREF_ELEM_NAME+
+private static final java.lang.String UNMARSHAL_DEFREF_SIGNATURE+
+private static final java.lang.String REGISTER_BACKFILL_NAME+
+private static final java.lang.String REGISTER_BACKFILL_SIGNATURE+
+private static final java.lang.String DEFINE_ID_NAME+
+private static final java.lang.String DEFINE_ID_SIGNATURE+
+private static final java.lang.String UNMARSHAL_TEXT_NAME+
+private static final java.lang.String UNMARSHAL_TEXT_SIGNATURE+
+private static final java.lang.String MARSHAL_TEXT_NAME+
+private static final java.lang.String MARSHAL_CDATA_NAME+
+private static final java.lang.String MARSHAL_TEXT_SIGNATURE+
+private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_METHOD+
+private static final java.lang.String UNMARSHALLING_THROWEXCEPTION_SIGNATURE+
+protected static final java.lang.String MARSHAL_ATTRIBUTE+
+protected static final java.lang.String MARSHAL_ELEMENT+
+protected static final java.lang.String MARSHAL_SIGNATURE+
+private final IContainer m_container+
+
+private final IContextObj m_objContext+
+
+private final int m_valueStyle+
+
+private final java.lang.String m_constantValue+
+
+private final int m_identType+
+
+private final NameDefinition m_name+
+
+private final java.lang.String m_type+
+
+private final PropertyDefinition m_property+
+
+private final StringConversion m_conversion+
+
+private IMapping m_idRefMap+
+
+Constructor Detail | +
---|
+public ValueChild(IContainer contain, + IContextObj objc, + NameDefinition name, + PropertyDefinition prop, + StringConversion conv, + int style, + int ident, + java.lang.String constant)+
+
contain
- containing binding definition structureobjc
- containing object contextname
- element or attribute name information (may be
+ null
)prop
- property reference informationconv
- string conversion handlerstyle
- value style codeident
- identifier type codeconstant
- value for constant+Method Detail | +
---|
+private ClassFile createBackfillClass() + throws JiBXException+
+
JiBXException
- if error in configuration+private void genParseIdRef(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+public void genIfPresentTest(UnmarshalBuilder mb) + throws JiBXException+
+
mb
- unmarshal method builder
+JiBXException
- if configuration error+private void genUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+private void genMarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+public java.lang.String getPropertyName()+
+
+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb)+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mub) + throws JiBXException+
IComponent
String
).
++
genLoadId
in interface IComponent
mub
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.OptionalStructureWrapper ++
public class OptionalStructureWrapper
+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. +
+ +
+
+Field Summary | +|
---|---|
+private boolean |
+m_loadMarshal
+
++ Load object for marshalling code generation flag. |
+
+private PropertyDefinition |
+m_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 | +|
---|---|
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+print(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 | +
---|
+private final PropertyDefinition m_property+
+
+private final boolean m_loadMarshal+
+
+Constructor Detail | +
---|
+public OptionalStructureWrapper(IComponent wrap, + PropertyDefinition prop, + boolean load)+
+
wrap
- wrapped binding componentload
- flag for need to load object for marshalling code+Method Detail | +
---|
+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.DirectProperty ++
public class DirectProperty
+Property reference with marshaller and unmarshaller. This handles loading + and storing the property value, calling the supplied marshaller and + unmarshaller for all else. +
+ +
+
+Field Summary | +|
---|---|
+private DirectObject |
+m_direct
+
++ Property value direct binding. |
+
+private PropertyDefinition |
+m_property
+
++ Property definition. |
+
+Constructor Summary | +|
---|---|
DirectProperty(PropertyDefinition prop,
+ DirectObject direct)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private final PropertyDefinition m_property+
+
+private final DirectObject m_direct+
+
+Constructor Detail | +
---|
+public DirectProperty(PropertyDefinition prop, + DirectObject direct)+
+
prop
- property definitiondirect
- object direct binding information+Method Detail | +
---|
+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb)+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
genLoadId
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.DefinitionContext ++
public class DefinitionContext
+Nesting level for definitions in binding. This tracks namespace and mapping + definitions that apply to all enclosed items. +
+ +
+
+Field Summary | +|
---|---|
+private NamespaceDefinition |
+m_attributeDefault
+
++ Namespace used by default at this level for attributes. |
+
+private org.jibx.binding.util.ArrayMap |
+m_classMap
+
++ Mapping from fully qualified class name to mapping index (lazy + create). |
+
+private IContainer |
+m_container
+
++ Containing binding definition component. |
+
+private DefinitionContext |
+m_context
+
++ Containing definition context. |
+
+private java.util.HashMap |
+m_convertMap
+
++ Map from signatures to String conversions. |
+
+private NamespaceDefinition |
+m_elementDefault
+
++ Namespace used by default at this level for elements. |
+
+private java.util.HashMap |
+m_formatMap
+
++ Map from format names to String conversions. |
+
+private java.util.ArrayList |
+m_mappings
+
++ Class mappings defined at level (lazy create). |
+
+private java.util.HashMap |
+m_namedStructureMap
+
++ Named binding components (only for root context of a binding). |
+
+private java.util.ArrayList |
+m_namespaces
+
++ Namespaces defined at level (lazy create). |
+
+private java.util.HashMap |
+m_prefixMap
+
++ Mapping from prefix to namespace definition (lazy create). |
+
+private java.util.HashMap |
+m_uriMap
+
++ Mapping from URI to namespace definition (lazy create). |
+
+Constructor Summary | +|
---|---|
DefinitionContext(IContainer contain)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+addConversion(java.lang.String name,
+ StringConversion conv)
+
++ Add named conversion. |
+
+ void |
+addMapping(IMapping def)
+
++ Add class mapping to set defined at this level. |
+
+ void |
+addNamedStructure(java.lang.String name,
+ IComponent comp)
+
++ Add named structure component to set defined at this level. |
+
+ void |
+addNamespace(NamespaceDefinition def)
+
++ Add namespace to set defined at this level. |
+
+ void |
+generateCode(boolean verbose,
+ boolean force)
+
++ Generate code. |
+
+private void |
+genFillNamespaceIndexes(java.util.ArrayList nss,
+ MethodBuilder mb)
+
++ Internal method to generate code to fill array with namespace indexes. |
+
+private void |
+genFillNamespacePrefixes(java.util.ArrayList nss,
+ MethodBuilder mb)
+
++ Internal method to generate code to fill array with namespace prefixes. |
+
+ void |
+genLoadNamespaces(MethodBuilder mb)
+
++ Generate code for loading namespace index and URI arrays. |
+
+ IMapping |
+getClassMapping(java.lang.String name)
+
++ Get mapping definition for class. |
+
+ StringConversion |
+getConversion(ClassFile clas)
+
++ Get conversion definition for class. |
+
+ int |
+getDefaultIndex(boolean attr)
+
++ Get the default namespace index for a contained name. |
+
+private NamespaceDefinition |
+getDefaultNamespace(boolean attr)
+
++ Get the default namespace for a contained name. |
+
+ java.lang.String |
+getDefaultURI(boolean attr)
+
++ Get the default namespace URI for a contained name. |
+
+ IMapping |
+getMappingAtLevel(java.lang.String name)
+
++ Get mapping definition for class if defined at this level. |
+
+ java.util.ArrayList |
+getMappings()
+
++ Get mapping definitions at level. |
+
+ StringConversion |
+getNamedConversion(java.lang.String name)
+
++ Get named conversion definition. |
+
+ IComponent |
+getNamedStructure(java.lang.String name)
+
++ Get nested structure by name. |
+
+ int |
+getNamespaceIndex(java.lang.String uri,
+ boolean attr)
+
++ Get namespace index for a given URI. |
+
+ StringConversion |
+getSpecificConversion(java.lang.String name)
+
++ Get specific conversion definition for type. |
+
+ boolean |
+hasNamespace()
+
++ Check if one or more namespaces are defined in this context. |
+
+ void |
+linkMappings()
+
++ Links extension mappings to their base mappings. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setConversion(StringConversion conv)
+
++ Set specific conversion definition for type. |
+
+ void |
+setDefaultConversion(java.lang.String name,
+ StringConversion conv)
+
++ Sets a conversion definition by both type and name. |
+
+ void |
+setLinkages()
+
++ Set linkages between binding components. |
+
+ void |
+setNamedConversion(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 | +
---|
+private final IContainer m_container+
+
+private final DefinitionContext m_context+
+
+private NamespaceDefinition m_attributeDefault+
+
+private NamespaceDefinition m_elementDefault+
+
+private java.util.ArrayList m_namespaces+
+
+private java.util.HashMap m_prefixMap+
+
+private java.util.HashMap m_uriMap+
+
+private org.jibx.binding.util.ArrayMap m_classMap+
+
+private java.util.ArrayList m_mappings+
+
+private java.util.HashMap m_convertMap+
String
conversions.
++
+private java.util.HashMap m_formatMap+
String
conversions.
++
+private java.util.HashMap m_namedStructureMap+
+
+Constructor Detail | +
---|
+public DefinitionContext(IContainer contain)+
+
contain
- containing binding definition component+Method Detail | +
---|
+public void addNamespace(NamespaceDefinition def) + throws JiBXException+
+
def
- namespace definition to be added
+JiBXException
- on namespace definition conflict+public void addMapping(IMapping def) + throws JiBXException+
+
def
- mapping definition to be added
+JiBXException
- on mapping definition conflict+public void addNamedStructure(java.lang.String name, + IComponent comp) + throws JiBXException+
+
name
- component name to be setcomp
- named component
+JiBXException
- on mapping definition conflict+private NamespaceDefinition getDefaultNamespace(boolean attr)+
+
attr
- flag for attribute name
+null
if none+public java.lang.String getDefaultURI(boolean attr)+
+
attr
- flag for attribute name
+null
if none+public int getDefaultIndex(boolean attr)+
+
attr
- flag for attribute name
++public int getNamespaceIndex(java.lang.String uri, + boolean attr) + throws JiBXException+
+
uri
- namespace URI to be foundattr
- flag for attribute name
+JiBXException
- if URI not defined or not usable+public IMapping getMappingAtLevel(java.lang.String name)+
+
name
- fully qualified class name
+null
if not defined+public IMapping getClassMapping(java.lang.String name)+
+
name
- fully qualified class name
+null
if not defined+public IComponent getNamedStructure(java.lang.String name) + throws JiBXException+
+
name
- component name to be found
+JiBXException
- if name not defined+public java.util.ArrayList getMappings()+
+
null
if none defined at level+public StringConversion getSpecificConversion(java.lang.String name)+
+
name
- fully qualified class name to be converted
+null
if not
+ found+public StringConversion getConversion(ClassFile clas)+
+
clas
- information for target conversion class
++public StringConversion getNamedConversion(java.lang.String name)+
+
name
- conversion name to be found
++public void addConversion(java.lang.String name, + StringConversion conv) + throws JiBXException+
+
name
- format name for this conversionconv
- conversion definition for class
+JiBXException
- if duplicate conversion definition+public void setConversion(StringConversion conv) + throws JiBXException+
+
conv
- conversion definition for class
+JiBXException
- if duplicate conversion definition+public void setNamedConversion(java.lang.String name, + StringConversion conv) + throws JiBXException+
+
name
- format name for this conversionconv
- conversion definition for class
+JiBXException
- if duplicate conversion definition+public void setDefaultConversion(java.lang.String name, + StringConversion conv) + throws JiBXException+
+
name
- format name for this conversionconv
- conversion definition for class
+JiBXException
- if duplicate conversion definition+public boolean hasNamespace()+
+
true
if namespaces are defined, false
+ if not+private void genFillNamespaceIndexes(java.util.ArrayList nss, + MethodBuilder mb)+
+
nss
- namespaces to be handledmb
- method builder for generated code+private void genFillNamespacePrefixes(java.util.ArrayList nss, + MethodBuilder mb)+
+
nss
- namespaces to be handledmb
- method builder for generated code+public void genLoadNamespaces(MethodBuilder mb)+
+
mb
- method builder for generated code+public void generateCode(boolean verbose, + boolean force) + throws JiBXException+
+
verbose
- flag for verbose outputforce
- create marshaller/unmarshaller even for abstract non-base
+ mappings flag
+JiBXException
- if error in transformation+public void linkMappings() + throws JiBXException+
+
JiBXException
- if error in linking+public void setLinkages() + throws JiBXException+
+
JiBXException
- if error in configuration+public void print(int depth)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder.ContainerBase + org.jibx.binding.def.BindingDefinition ++
public class BindingDefinition
+Binding definition. This is the root of the object graph for a binding. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+CLASSES_ARRAYNAME
+
++ |
+
+private static java.lang.String |
+CREATEMARSHAL_METHODNAME
+
++ |
+
+private static java.lang.String |
+CREATEUNMARSHAL_METHODNAME
+
++ |
+
+static java.lang.String |
+CURRENT_VERSION_NAME
+
++ Current distribution file name. |
+
+(package private) static java.lang.String |
+DEFAULT_AUTOPREFIX
+
++ Default prefix for automatic ID generation. |
+
+private static int |
+FACTORY_INSTACCESS
+
++ |
+
+private static java.lang.String |
+FACTORY_INSTNAME
+
++ |
+
+private static java.lang.String |
+FACTORY_INTERFACE
+
++ |
+
+private static java.lang.String[] |
+FACTORY_INTERFACES
+
++ |
+
+private static java.lang.String |
+FACTORY_SUFFIX
+
++ |
+
+static java.lang.String |
+GENERATE_PREFIX
+
++ Prefix used in all code generation for methods and classes. |
+
+private static java.lang.String |
+GETCLASSES_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETDEFINEDNSS_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETDEFINEDPREFS_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETDISTRIB_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETELEMENTNAMES_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETELEMENTNSS_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETINST_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETTYPEINDEX_METHODNAME
+
++ |
+
+private static java.lang.String |
+GETVERSION_METHODNAME
+
++ |
+
+private static java.lang.String |
+GNAMES_ARRAYNAME
+
++ |
+
+private static java.lang.String |
+GURIS_ARRAYNAME
+
++ |
+
+private static java.lang.String |
+IDNAMES_ARRAYNAME
+
++ |
+
+private DefinitionContext |
+m_activeContext
+
++ Inner definition context constructed for binding. |
+
+private java.util.ArrayList |
+m_extraClasses
+
++ Classes handled by in-line marshaller/unmarshaller references. |
+
+private java.util.ArrayList |
+m_extraMarshallers
+
++ Marshaller classes used in-line. |
+
+private java.util.ArrayList |
+m_extraUnmarshallers
+
++ Unmarshaller classes used in-line. |
+
+private int |
+m_index
+
++ Index number of this binding. |
+
+private boolean |
+m_isForceClasses
+
++ Generate marshaller/unmarshaller classes for top-level non-base abstract + mappings flag. |
+
+private boolean |
+m_isForwards
+
++ Support forward references to IDs flag. |
+
+private boolean |
+m_isIdGlobal
+
++ Use global ID values flag. |
+
+private boolean |
+m_isInput
+
++ Input binding flag. |
+
+private boolean |
+m_isMappedDone
+
++ Flag for done assigning indexes to mapped classes. |
+
+private boolean |
+m_isOutput
+
++ Output binding flag. |
+
+private boolean |
+m_isTrackSource
+
++ Generate souce tracking interface flag. |
+
+private int |
+m_mumIndex
+
++ Next index number for marshaller/unmarshaller slots used in-line. |
+
+private java.lang.String |
+m_name
+
++ Binding name. |
+
+private java.util.ArrayList |
+m_namespacePrefixes
+
++ Original prefixes for namespaces. |
+
+private org.jibx.binding.util.ArrayMap |
+m_namespaceUris
+
++ Namespaces URIs included in binding. |
+
+private DefinitionContext |
+m_outerContext
+
++ Outer definition context with default definitions. |
+
+private java.lang.String |
+m_targetPackage
+
++ Package for generated context factory. |
+
+private java.io.File |
+m_targetRoot
+
++ File root for generated context factory. |
+
+private org.jibx.binding.util.ArrayMap |
+m_uniqueIds
+
++ Classes using unique (per class) identifiers. |
+
+private static java.lang.String |
+MARSHALCONTEXT_IMPLEMENTATION
+
++ |
+
+private static java.lang.String |
+MARSHALCONTEXT_INTERFACE
+
++ |
+
+private static java.lang.String |
+MARSHALCONTEXTINIT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+MARSHALLER_ARRAYNAME
+
++ |
+
+private static java.lang.String |
+PREFIXES_ARRAYNAME
+
++ |
+
+static StringConversion |
+s_base64Conversion
+
++ |
+
+private static java.util.ArrayList |
+s_bindings
+
++ Table of defined bindings. |
+
+private static byte[] |
+s_blanks
+
++ |
+
+private static StringConversion |
+s_booleanConversion
+
++ |
+
+private static StringConversion |
+s_byteConversion
+
++ |
+
+private static StringConversion |
+s_charConversion
+
++ |
+
+private static StringConversion |
+s_dateConversion
+
++ |
+
+private static StringConversion |
+s_doubleConversion
+
++ |
+
+private static StringConversion |
+s_floatConversion
+
++ |
+
+private static StringConversion |
+s_intConversion
+
++ |
+
+private static StringConversion |
+s_longConversion
+
++ |
+
+private static org.jibx.binding.util.ArrayMap |
+s_mappedClasses
+
++ Classes included in any binding. |
+
+static StringConversion |
+s_objectConversion
+
++ |
+
+private static StringConversion |
+s_shortConversion
+
++ |
+
+private static StringConversion |
+s_sqlDateConversion
+
++ |
+
+private static StringConversion |
+s_sqlTimeConversion
+
++ |
+
+static StringConversion |
+s_stringConversion
+
++ |
+
+private static StringConversion |
+s_timestampConversion
+
++ |
+
+private static java.lang.String |
+STRING_ARRAYTYPE
+
++ |
+
+private static java.lang.String |
+STRINGINT_MAPTYPE
+
++ |
+
+private static java.lang.String |
+STRINGINTADD_METHOD
+
++ |
+
+private static java.lang.String |
+STRINGINTADD_SIGNATURE
+
++ |
+
+private static java.lang.String |
+STRINGINTGET_METHOD
+
++ |
+
+private static java.lang.String |
+STRINGINTGET_SIGNATURE
+
++ |
+
+private static java.lang.String |
+STRINGINTINIT_SIGNATURE
+
++ |
+
+private static int |
+TYPEMAP_MINIMUM_SIZE
+
++ Minimum size to use map for index from type name. |
+
+private static java.lang.String |
+TYPEMAP_NAME
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXT_IMPLEMENTATION
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXT_INTERFACE
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXTINIT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_ARRAYNAME
+
++ |
+
+private static java.lang.String |
+UNSUPPORTED_EXCEPTION_CLASS
+
++ |
+
+private static java.lang.String |
+URIS_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 | +|
---|---|
+ void |
+generateCode(boolean verbose)
+
++ Generate code. |
+
+static BindingDefinition |
+getBinding(int index)
+
++ Get indexed binding. |
+
+ BindingDefinition |
+getBindingRoot()
+
++ Get root of binding definition. |
+
+ BoundClass |
+getBoundClass()
+
++ Get class linked to binding element. |
+
+ java.lang.String |
+getDefaultPackage()
+
++ Get default package used for code generation. |
+
+ java.io.File |
+getDefaultRoot()
+
++ Get root directory for default code generation package. |
+
+ DefinitionContext |
+getDefinitionContext()
+
++ Get definition context for binding element. |
+
+ int |
+getIdClassIndex(java.lang.String name)
+
++ Get index for ID'ed class from binding. |
+
+ int |
+getIndex()
+
++ Get index number of binding. |
+
+ int |
+getMappedClassIndex(java.lang.String name)
+
++ Get index for mapped class from binding. |
+
+ int |
+getMarshallerUnmarshallerIndex(java.lang.String clas)
+
++ Get marshaller/unmarshaller slot index in binding. |
+
+ int |
+getNamespaceUriIndex(java.lang.String uri,
+ java.lang.String prefix)
+
++ Get index for namespace URI in binding. |
+
+ java.lang.String |
+getPrefix()
+
++ Get prefix for method or class generation. |
+
+ int |
+getStyleDefault()
+
++ Get default style for value expression. |
+
+ boolean |
+hasNamespaces()
+
++ |
+
+static void |
+indent(int depth)
+
++ |
+
+ boolean |
+isContentOrdered()
+
++ Check if content children are ordered. |
+
+ boolean |
+isForwards()
+
++ Check if forward ids are supported by unmarshalling binding. |
+
+ boolean |
+isIdGlobal()
+
++ Check if global ids are used by binding. |
+
+ boolean |
+isInput()
+
++ Check if binding is defined for unmarshalling. |
+
+ boolean |
+isOutput()
+
++ Check if binding is defined for marshalling. |
+
+ boolean |
+isTrackSource()
+
++ Check if source tracking is supported by unmarshalling binding. |
+
+ void |
+print()
+
++ |
+
+static void |
+reset()
+
++ Discard cached information and reset in preparation for a new binding + run. |
+
+ void |
+setFactoryLocation(java.lang.String tpack,
+ java.io.File root)
+
++ Set location for binding factory class generation. |
+
+ boolean |
+setIdChild(IComponent child)
+
++ Set ID property. |
+
+ void |
+setMarshallerUnmarshallerClasses(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 | +
---|
+public static final java.lang.String CURRENT_VERSION_NAME+
+
+public static final java.lang.String GENERATE_PREFIX+
+
+static final java.lang.String DEFAULT_AUTOPREFIX+
+
+private static final int TYPEMAP_MINIMUM_SIZE+
+
+private static java.util.ArrayList s_bindings+
+
+private static org.jibx.binding.util.ArrayMap s_mappedClasses+
+
+private static StringConversion s_byteConversion+
+private static StringConversion s_charConversion+
+private static StringConversion s_doubleConversion+
+private static StringConversion s_floatConversion+
+private static StringConversion s_intConversion+
+private static StringConversion s_longConversion+
+private static StringConversion s_shortConversion+
+private static StringConversion s_booleanConversion+
+private static StringConversion s_dateConversion+
+private static StringConversion s_sqlDateConversion+
+private static StringConversion s_sqlTimeConversion+
+private static StringConversion s_timestampConversion+
+public static StringConversion s_base64Conversion+
+public static StringConversion s_stringConversion+
+public static StringConversion s_objectConversion+
+private static final java.lang.String FACTORY_SUFFIX+
+private static final java.lang.String FACTORY_INTERFACE+
+private static final java.lang.String[] FACTORY_INTERFACES+
+private static final java.lang.String FACTORY_INSTNAME+
+private static final int FACTORY_INSTACCESS+
+private static final java.lang.String MARSHALLER_ARRAYNAME+
+private static final java.lang.String UNMARSHALLER_ARRAYNAME+
+private static final java.lang.String STRING_ARRAYTYPE+
+private static final java.lang.String CLASSES_ARRAYNAME+
+private static final java.lang.String URIS_ARRAYNAME+
+private static final java.lang.String PREFIXES_ARRAYNAME+
+private static final java.lang.String GNAMES_ARRAYNAME+
+private static final java.lang.String GURIS_ARRAYNAME+
+private static final java.lang.String IDNAMES_ARRAYNAME+
+private static final java.lang.String TYPEMAP_NAME+
+private static final java.lang.String CREATEMARSHAL_METHODNAME+
+private static final java.lang.String MARSHALCONTEXT_INTERFACE+
+private static final java.lang.String MARSHALCONTEXT_IMPLEMENTATION+
+private static final java.lang.String MARSHALCONTEXTINIT_SIGNATURE+
+private static final java.lang.String CREATEUNMARSHAL_METHODNAME+
+private static final java.lang.String UNMARSHALCONTEXT_INTERFACE+
+private static final java.lang.String UNMARSHALCONTEXT_IMPLEMENTATION+
+private static final java.lang.String UNMARSHALCONTEXTINIT_SIGNATURE+
+private static final java.lang.String GETINST_METHODNAME+
+private static final java.lang.String UNSUPPORTED_EXCEPTION_CLASS+
+private static final java.lang.String GETVERSION_METHODNAME+
+private static final java.lang.String GETDISTRIB_METHODNAME+
+private static final java.lang.String GETDEFINEDNSS_METHODNAME+
+private static final java.lang.String GETDEFINEDPREFS_METHODNAME+
+private static final java.lang.String GETCLASSES_METHODNAME+
+private static final java.lang.String GETELEMENTNSS_METHODNAME+
+private static final java.lang.String GETELEMENTNAMES_METHODNAME+
+private static final java.lang.String GETTYPEINDEX_METHODNAME+
+private static final java.lang.String STRINGINT_MAPTYPE+
+private static final java.lang.String STRINGINTINIT_SIGNATURE+
+private static final java.lang.String STRINGINTADD_METHOD+
+private static final java.lang.String STRINGINTADD_SIGNATURE+
+private static final java.lang.String STRINGINTGET_METHOD+
+private static final java.lang.String STRINGINTGET_SIGNATURE+
+private final java.lang.String m_name+
+
+private final int m_index+
+
+private final boolean m_isInput+
+
+private final boolean m_isOutput+
+
+private final boolean m_isIdGlobal+
+
+private final boolean m_isForwards+
+
+private final boolean m_isTrackSource+
+
+private final boolean m_isForceClasses+
+
+private java.lang.String m_targetPackage+
+
+private java.io.File m_targetRoot+
+
+private org.jibx.binding.util.ArrayMap m_uniqueIds+
null
+ and unused when using global ID values.
++
+private org.jibx.binding.util.ArrayMap m_namespaceUris+
+
+private java.util.ArrayList m_namespacePrefixes+
+
+private DefinitionContext m_outerContext+
+
+private DefinitionContext m_activeContext+
+
+private boolean m_isMappedDone+
+
+private int m_mumIndex+
+
+private java.util.ArrayList m_extraClasses+
+
+private java.util.ArrayList m_extraMarshallers+
+
+private java.util.ArrayList m_extraUnmarshallers+
+
+private static byte[] s_blanks+
+Constructor Detail | +
---|
+public BindingDefinition(java.lang.String name, + boolean ibind, + boolean obind, + java.lang.String tpack, + boolean glob, + boolean forward, + boolean source, + boolean force) + throws JiBXException+
+
name
- binding nameibind
- input binding flagobind
- output binding flagtpack
- target packageglob
- global IDs flagforward
- support forward referenced IDs flagsource
- add source tracking for unmarshalled objects flagforce
- create marshaller/unmarshaller classes for top-level
+ non-base mappings
+JiBXException
- if error in transformation+Method Detail | +
---|
+public BoundClass getBoundClass()+
IContainer
interface, just returns
+ null
in this case.
++
+public int getStyleDefault()+
IContainer
interface.
++
getStyleDefault
in interface IContainer
getStyleDefault
in class BindingBuilder.ContainerBase
+public boolean setIdChild(IComponent child)+
+
child
- child defining the ID property
+false
+public java.lang.String getDefaultPackage()+
+
+public java.io.File getDefaultRoot()+
+
+public void setFactoryLocation(java.lang.String tpack, + java.io.File root)+
+
tpack
- target package for generated context factoryroot
- target root for generated context factory+public int getIndex()+
+
+public boolean isInput()+
+
true
if defined, false
if not+public boolean isOutput()+
+
true
if defined, false
if not+public boolean isIdGlobal()+
+
true
if defined, false
if not+public boolean isForwards()+
+
true
if supported, false
if not+public boolean isTrackSource()+
+
true
if defined, false
if not+public java.lang.String getPrefix()+
+
+public int getMappedClassIndex(java.lang.String name)+
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.
++
name
- fully qualified name of mapped class
++public int getMarshallerUnmarshallerIndex(java.lang.String clas)+
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.
++
clas
- fully qualified name of class handled by
+ marshaller/unmarshaller
++public void setMarshallerUnmarshallerClasses(int slot, + java.lang.String mclas, + java.lang.String uclas)+
+
slot
- assigned marshaller/unmarshaller slot numbermclas
- fully qualified name of marshaller classuclas
- fully qualified name of unmarshaller class+public int getIdClassIndex(java.lang.String name)+
0
.
++
name
- fully qualified name of ID'ed class
++public int getNamespaceUriIndex(java.lang.String uri, + java.lang.String prefix)+
0
.
++
uri
- namespace URI to be included in bindingprefix
- prefix used with namespace
++public void generateCode(boolean verbose) + throws JiBXException+
+
verbose
- flag for verbose output
+JiBXException
- if error in code generation+public static BindingDefinition getBinding(int index)+
+
index
- number of binding to be returned
++public static void reset()+
+
+public boolean isContentOrdered()+
IContainer
+
isContentOrdered
in interface IContainer
true
if ordered, false
if not+public boolean hasNamespaces()+
+public BindingDefinition getBindingRoot()+
IContainer
+
getBindingRoot
in interface IContainer
+public DefinitionContext getDefinitionContext()+
IContainer
+
getDefinitionContext
in interface IContainer
+public static void indent(int depth)+
+public void print()+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent ++
public class PassThroughComponent
+Default component decorator. This just passes through all method calls to + the wrapped component. +
+ +
+
+Field Summary | +|
---|---|
+protected IComponent |
+m_component
+
++ Property value binding component. |
+
+Constructor Summary | +|
---|---|
+protected |
+PassThroughComponent()
+
++ No argument constructor. |
+
+protected |
+PassThroughComponent(IComponent comp)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ Establish and validate linkages between binding components. |
+
+protected void |
+setWrappedComponent(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 | +
---|
+protected IComponent m_component+
+
+Constructor Detail | +
---|
+protected PassThroughComponent()+
setWrappedComponent(org.jibx.binding.def.IComponent)
method.
++
+protected PassThroughComponent(IComponent comp)+
+
comp
- wrapped component+Method Detail | +
---|
+protected void setWrappedComponent(IComponent comp)+
+
comp
- wrapped component+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
genLoadId
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.ComponentProperty ++
public class ComponentProperty
+Property reference with binding defined by component. This handles loading + and storing the property value, calling the wrapped component methods for + everything else. +
+ +
+
+Field Summary | +|
---|---|
+private PropertyDefinition |
+m_property
+
++ Property definition. |
+
+private boolean |
+m_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 | +|
---|---|
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setSkipping(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 | +
---|
+private final PropertyDefinition m_property+
+
+private boolean m_skipMarshal+
+
+Constructor Detail | +
---|
+public ComponentProperty(PropertyDefinition prop, + IComponent impl, + boolean skip)+
+
prop
- actual property definitionimpl
- component that defines marshalling and unmarshallingskip
- flag for marshalling code tests to be skipped+Method Detail | +
---|
+public void setSkipping(boolean skip)+
+
skip
- true
if skipping, false
if not+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
isOptional
in class PassThroughComponent
true
if optional, false
if required+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
genAttributeUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
genContentUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ BindingDefinition |
+getBindingRoot()
+
++ Get root of binding definition. |
+
+ DefinitionContext |
+getDefinitionContext()
+
++ Get definition context for binding element. |
+
+ int |
+getStyleDefault()
+
++ Get default style for value expression. |
+
+ boolean |
+isContentOrdered()
+
++ Check if content children are ordered. |
+
+Method Detail | +
---|
+boolean isContentOrdered()+
+
true
if ordered, false
if not+int getStyleDefault()+
+
+DefinitionContext getDefinitionContext()+
+
+BindingDefinition getBindingRoot()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.LinkableBase + org.jibx.binding.def.MappingBase + org.jibx.binding.def.MappingDefinition ++
public class MappingDefinition
+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). +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+ADAPTERCLASS_SUFFIX
+
++ |
+
+private static java.lang.String |
+ADDMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+ADDMARSHALLER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+ADDUNMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+ADDUNMARSHALLER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+BASEMARSHAL_METHODNAME
+
++ |
+
+(package private) static java.lang.String[] |
+BOTH_INTERFACES
+
++ |
+
+private static java.lang.String |
+CHECKEXTENDS_METHOD
+
++ |
+
+private static java.lang.String |
+CURRENTELEMENT_METHOD
+
++ |
+
+private static java.lang.String |
+CURRENTELEMENT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+GETINDEX_METHOD
+
++ |
+
+private static org.apache.bcel.generic.Type[] |
+ISPRESENT_METHOD_ARGS
+
++ |
+
+private static java.lang.String |
+ISPRESENT_METHODNAME
+
++ |
+
+private IMapping |
+m_baseMapping
+
++ Abstract binding this one is based on ( null if not an
+ extension. |
+
+private java.lang.String |
+m_baseType
+
++ Name of abstract base type. |
+
+private BoundClass |
+m_class
+
++ Class linked to mapping. |
+
+private IContainer |
+m_container
+
++ Containing binding definition structure. |
+
+private DefinitionContext |
+m_defContext
+
++ Definition context for mapping. |
+
+private java.util.ArrayList |
+m_extensions
+
++ Mapping which extend this one ( null if none). |
+
+private boolean |
+m_isAbstract
+
++ Abstract mapping flag. |
+
+private ClassFile |
+m_marshaller
+
++ Constructed marshaller class. |
+
+private NameDefinition |
+m_name
+
++ Mapped element name (may be null if element(s) defined
+ by marshaller and unmarshaller, or if abstract mapping). |
+
+private java.lang.String |
+m_referenceType
+
++ Reference type of mapping, as fully qualifed class name. |
+
+private IComponent |
+m_thisBinding
+
++ Duplicate of component structure for use as "this" reference + ( null if not yet defined). |
+
+private java.lang.String |
+m_typeName
+
++ Abstract mapping type name. |
+
+private ClassFile |
+m_unmarshaller
+
++ Constructed unmarshaller class. |
+
+private static org.apache.bcel.generic.Type[] |
+MARSHAL_METHOD_ARGS
+
++ |
+
+private static java.lang.String |
+MARSHAL_METHODNAME
+
++ |
+
+private static java.lang.String |
+MARSHALCONTEXT_CLASS
+
++ |
+
+private static java.lang.String |
+MARSHALCONTEXT_INTERFACE
+
++ |
+
+(package private) static java.lang.String[] |
+MARSHALLER_INTERFACES
+
++ |
+
+private static java.lang.String |
+REMOVEMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+REMOVEMARSHALLER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+REMOVEUNMARSHALLER_METHOD
+
++ |
+
+private static java.lang.String |
+REMOVEUNMARSHALLER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_ISATMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_ISATSIGNATURE
+
++ |
+
+private static org.apache.bcel.generic.Type[] |
+UNMARSHAL_METHOD_ARGS
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_METHODNAME
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXT_CLASS
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXT_INTERFACE
+
++ |
+
+(package private) static java.lang.String[] |
+UNMARSHALLER_INTERFACES
+
++ |
+
+private static java.lang.String |
+UNMARSHALLERPRESENT_METHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHALLERPRESENT_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 | +|
---|---|
+ void |
+addExtension(MappingDefinition mdef)
+
++ Add extension to abstract mapping. |
+
+ void |
+addNamespace(NamespaceDefinition ns)
+
++ Add namespace. |
+
+ IComponent |
+buildRef(IContainer parent,
+ IContextObj objc,
+ java.lang.String type,
+ PropertyDefinition prop)
+
++ Build reference to mapping. |
+
+ void |
+generateCode(boolean force)
+
++ Generate required code for mapping. |
+
+(package private) void |
+genLoadNamespaces(MethodBuilder mb)
+
++ Generate code for loading namespace index and URI arrays. |
+
+ BoundClass |
+getBoundClass()
+
++ Get the mapped class information. |
+
+ java.lang.String |
+getBoundType()
+
++ Get class name handled by mapping. |
+
+ IComponent |
+getImplComponent()
+
++ Get binding component implementing mapping. |
+
+ ClassFile |
+getMarshaller()
+
++ Get marshaller class used for mapping. |
+
+ NameDefinition |
+getName()
+
++ Get mapped element name. |
+
+ java.lang.String |
+getReferenceType()
+
++ Get class name of type to be assumed for references to this mapping. |
+
+ java.lang.String |
+getTypeName()
+
++ Get type name. |
+
+ ClassFile |
+getUnmarshaller()
+
++ Get unmarshaller class used for mapping. |
+
+(package private) boolean |
+hasNamespace()
+
++ Check if one or more namespaces are defined for element. |
+
+ boolean |
+isAbstract()
+
++ Check if mapping is abstract. |
+
+ boolean |
+isBase()
+
++ Check if mapping has extensions. |
+
+ void |
+linkMappings()
+
++ Links extension mappings to their base mappings. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private static final java.lang.String ADAPTERCLASS_SUFFIX+
+private static final java.lang.String MARSHAL_METHODNAME+
+private static final java.lang.String BASEMARSHAL_METHODNAME+
+private static final java.lang.String UNMARSHAL_METHODNAME+
+private static final java.lang.String ISPRESENT_METHODNAME+
+private static final java.lang.String UNMARSHALCONTEXT_CLASS+
+private static final java.lang.String MARSHALCONTEXT_CLASS+
+private static final java.lang.String UNMARSHAL_ISATMETHOD+
+private static final java.lang.String UNMARSHAL_ISATSIGNATURE+
+private static final java.lang.String CHECKEXTENDS_METHOD+
+private static final java.lang.String GETINDEX_METHOD+
+private static final java.lang.String UNMARSHALLERPRESENT_METHOD+
+private static final java.lang.String UNMARSHALLERPRESENT_SIGNATURE+
+private static final java.lang.String UNMARSHALCONTEXT_INTERFACE+
+private static final java.lang.String MARSHALCONTEXT_INTERFACE+
+private static final java.lang.String CURRENTELEMENT_METHOD+
+private static final java.lang.String CURRENTELEMENT_SIGNATURE+
+private static final java.lang.String ADDUNMARSHALLER_METHOD+
+private static final java.lang.String ADDUNMARSHALLER_SIGNATURE+
+private static final java.lang.String REMOVEUNMARSHALLER_METHOD+
+private static final java.lang.String REMOVEUNMARSHALLER_SIGNATURE+
+private static final java.lang.String ADDMARSHALLER_METHOD+
+private static final java.lang.String ADDMARSHALLER_SIGNATURE+
+private static final java.lang.String REMOVEMARSHALLER_METHOD+
+private static final java.lang.String REMOVEMARSHALLER_SIGNATURE+
+private static final org.apache.bcel.generic.Type[] ISPRESENT_METHOD_ARGS+
+private static final org.apache.bcel.generic.Type[] UNMARSHAL_METHOD_ARGS+
+private static final org.apache.bcel.generic.Type[] MARSHAL_METHOD_ARGS+
+static final java.lang.String[] UNMARSHALLER_INTERFACES+
+static final java.lang.String[] MARSHALLER_INTERFACES+
+static final java.lang.String[] BOTH_INTERFACES+
+private final IContainer m_container+
+
+private final DefinitionContext m_defContext+
+
+private final BoundClass m_class+
+
+private final NameDefinition m_name+
null
if element(s) defined
+ by marshaller and unmarshaller, or if abstract mapping).
++
+private final java.lang.String m_typeName+
+
+private final boolean m_isAbstract+
+
+private final java.lang.String m_baseType+
+
+private IMapping m_baseMapping+
null
if not an
+ extension.
++
+private IComponent m_thisBinding+
null
if not yet defined).
++
+private ClassFile m_marshaller+
+
+private ClassFile m_unmarshaller+
+
+private java.util.ArrayList m_extensions+
null
if none).
++
+private java.lang.String m_referenceType+
+
+Constructor Detail | +
---|
+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+
+
contain
- containing binding definition structuredefc
- definition context for this mappingtype
- bound class namename
- mapped element name information (null
if defined
+ by marshaller and unmarshaller)tname
- type name for abstract mapping (null
if none)abs
- abstract mapping flagbase
- abstract mapping extended by this onebind
- binding definition component
+JiBXException
- if class definition not found+Method Detail | +
---|
+boolean hasNamespace()+
+
true
if namespaces are defined, false
+ if not+void genLoadNamespaces(MethodBuilder mb)+
+
mb
- method builder for generated code+public BoundClass getBoundClass()+
+
getBoundClass
in class MappingBase
+public void linkMappings() + throws JiBXException+
+
JiBXException
- if error in linking+public java.lang.String getBoundType()+
IMapping
+
+public java.lang.String getReferenceType()+
IMapping
+
+public IComponent getImplComponent()+
IMapping
+
+public ClassFile getMarshaller()+
IMapping
+
+public ClassFile getUnmarshaller()+
IMapping
+
+public NameDefinition getName()+
IMapping
+
null
if no
+ element name defined for mapping)+public java.lang.String getTypeName()+
IMapping
+
null
if unnamed)+public void addNamespace(NamespaceDefinition ns) + throws JiBXException+
IMapping
+
ns
- namespace definition to be added
+JiBXException
- if error in defining namespace+public boolean isAbstract()+
IMapping
+
true
if an abstract mapping, false
if
+ not+public boolean isBase()+
IMapping
+
true
if one or more mappings extend this mapping,
+ false
if not+public void addExtension(MappingDefinition mdef) + throws JiBXException+
IMapping
+
mdef
- extension mapping definition
+JiBXException
- if configuration error+public IComponent buildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + throws JiBXException+
IMapping
+
parent
- containing binding definition structureobjc
- current object contexttype
- mapped value typeprop
- property definition (may be null
)
+JiBXException
- if configuration error+public void generateCode(boolean force) + throws JiBXException+
IMapping
+
force
- add marshaller/unmarshaller classes for abstract non-base
+ mappings flag (not passed on to children)
+JiBXException
- if error in transformation+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class LinkableBase
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class LinkableBase
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.LinkableBase + org.jibx.binding.def.MappingBase + org.jibx.binding.def.MappingDirect ++
public class MappingDirect
+Direct mapping using supplied marshaller and unmarshaller. +
+ +
+
+Field Summary | +|
---|---|
+private BoundClass |
+m_boundClass
+
++ Class file to use for added code. |
+
+private boolean |
+m_isGenerated
+
++ Flag for code added to class (if appropriate). |
+
+private DirectObject |
+m_mappingImpl
+
++ Direct mapping implementation. |
+
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 | +|
---|---|
+ void |
+addExtension(MappingDefinition mdef)
+
++ Add extension to abstract mapping. |
+
+ void |
+addNamespace(NamespaceDefinition ns)
+
++ Add namespace. |
+
+ IComponent |
+buildRef(IContainer parent,
+ IContextObj objc,
+ java.lang.String type,
+ PropertyDefinition prop)
+
++ Build reference to mapping. |
+
+ void |
+generateCode(boolean force)
+
++ Generate required code for mapping. |
+
+ BoundClass |
+getBoundClass()
+
++ Get the mapped class information. |
+
+ java.lang.String |
+getBoundType()
+
++ Get class name handled by mapping. |
+
+ IComponent |
+getImplComponent()
+
++ Get binding component implementing mapping. |
+
+ ClassFile |
+getMarshaller()
+
++ Get marshaller class used for mapping. |
+
+ NameDefinition |
+getName()
+
++ Get mapped element name. |
+
+ java.lang.String |
+getReferenceType()
+
++ Get class name of type to be assumed for references to this mapping. |
+
+ java.lang.String |
+getTypeName()
+
++ Get type name. |
+
+ ClassFile |
+getUnmarshaller()
+
++ Get unmarshaller class used for mapping. |
+
+ boolean |
+isAbstract()
+
++ Check if mapping is abstract. |
+
+ boolean |
+isBase()
+
++ Check if mapping has extensions. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private final DirectObject m_mappingImpl+
+
+private final BoundClass m_boundClass+
+
+private boolean m_isGenerated+
+
+Constructor Detail | +
---|
+public MappingDirect(IContainer contain, + java.lang.String type, + DirectObject dir) + throws JiBXException+
+
contain
- containing binding definition structuretype
- bound class namedir
- direct object information
+JiBXException
- on mapping definition conflict+Method Detail | +
---|
+public BoundClass getBoundClass()+
+
getBoundClass
in class MappingBase
+public java.lang.String getBoundType()+
IMapping
+
+public java.lang.String getReferenceType()+
IMapping
+
+public IComponent getImplComponent()+
IMapping
+
+public ClassFile getMarshaller() + throws JiBXException+
IMapping
+
JiBXException
- if error in configuration+public ClassFile getUnmarshaller() + throws JiBXException+
IMapping
+
JiBXException
- if error in configuration+public NameDefinition getName()+
IMapping
+
null
if no
+ element name defined for mapping)+public java.lang.String getTypeName()+
IMapping
+
null
if unnamed)+public void addNamespace(NamespaceDefinition ns)+
IMapping
+
ns
- namespace definition to be added+public boolean isAbstract()+
IMapping
+
true
if an abstract mapping, false
if
+ not+public boolean isBase()+
IMapping
+
true
if one or more mappings extend this mapping,
+ false
if not+public void addExtension(MappingDefinition mdef)+
IMapping
+
mdef
- extension mapping definition+public IComponent buildRef(IContainer parent, + IContextObj objc, + java.lang.String type, + PropertyDefinition prop) + throws JiBXException+
IMapping
+
parent
- containing binding definition structureobjc
- current object contexttype
- mapped value typeprop
- property definition (may be null
)
+JiBXException
- if configuration error+public void generateCode(boolean force) + throws JiBXException+
IMapping
+
force
- add marshaller/unmarshaller classes for abstract non-base
+ mappings flag (not passed on to children)
+JiBXException
- if error in transformation+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class LinkableBase
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class LinkableBase
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NamespaceDefinition ++
public class NamespaceDefinition
+Namespace definition from binding. +
+ +
+
+Field Summary | +|
---|---|
+(package private) static int |
+ALLDEFAULT_USAGE
+
++ |
+
+(package private) static int |
+ATTRIBUTES_USAGE
+
++ |
+
+(package private) static int |
+ELEMENTS_USAGE
+
++ |
+
+private boolean |
+m_attributeDefault
+
++ Use by default for nested attributes. |
+
+private boolean |
+m_elementDefault
+
++ Use by default for nested elements. |
+
+private int |
+m_index
+
++ Index in namespace table for binding. |
+
+private java.lang.String |
+m_prefix
+
++ Namespace prefix (may be null , but not ""). |
+
+private java.lang.String |
+m_uri
+
++ Namespace URI. |
+
+(package private) static int |
+NODEFAULT_USAGE
+
++ |
+
+Constructor Summary | +|
---|---|
NamespaceDefinition(java.lang.String uri,
+ java.lang.String prefix,
+ int usage)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+static NamespaceDefinition |
+buildNamespace(java.lang.String uri,
+ java.lang.String prefix)
+
++ Instance builder with supplied values. |
+
+ int |
+getIndex()
+
++ Get namespace index. |
+
+ java.lang.String |
+getPrefix()
+
++ Get prefix for namespace. |
+
+ java.lang.String |
+getUri()
+
++ Get namespace URI. |
+
+ boolean |
+isAttributeDefault()
+
++ Check if default namespace for attributes. |
+
+ boolean |
+isElementDefault()
+
++ Check if default namespace for elements. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setIndex(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 | +
---|
+static final int NODEFAULT_USAGE+
+static final int ELEMENTS_USAGE+
+static final int ATTRIBUTES_USAGE+
+static final int ALLDEFAULT_USAGE+
+private java.lang.String m_uri+
+
+private java.lang.String m_prefix+
null
, but not "").
++
+private int m_index+
+
+private boolean m_elementDefault+
+
+private boolean m_attributeDefault+
+
+Constructor Detail | +
---|
+public NamespaceDefinition(java.lang.String uri, + java.lang.String prefix, + int usage) + throws JiBXException+
+
uri
- namespace URIprefix
- namespace prefix (may be null
for default
+ namespace, but not "")usage
- code for default usage of namespace
+JiBXException
- if configuration error+Method Detail | +
---|
+public boolean isAttributeDefault()+
+
true
if default namespace for attributes,
+ false
if not+public boolean isElementDefault()+
+
true
if default namespace for elements,
+ false
if not+public java.lang.String getPrefix()+
+
null
, but not "")+public java.lang.String getUri()+
+
+public void setIndex(int index)+
+
index
- namespace index+public int getIndex()+
+
+public static NamespaceDefinition buildNamespace(java.lang.String uri, + java.lang.String prefix) + throws JiBXException+
+
uri
- namespace URIprefix
- namespace prefix
+JiBXException
- if configuration error+public void print(int depth)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NameDefinition ++
public class NameDefinition
+Named value definition from binding. This is a component of all items + in the mapping corresponding to elements or attributes in the document. +
+ +
+
+Field Summary | +|
---|---|
+private boolean |
+m_isAttribute
+
++ Flag for attribute name. |
+
+private java.lang.String |
+m_name
+
++ Element or attribute name. |
+
+private java.lang.String |
+m_namespace
+
++ Element or attribute namespace URI. |
+
+private int |
+m_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 | +|
---|---|
+ void |
+fixNamespace(DefinitionContext defc)
+
++ Finds the index for the namespace used with a name. |
+
+ void |
+genPushIndexPair(MethodBuilder mb)
+
++ Generate code to push namespace index followed by name. |
+
+ void |
+genPushName(MethodBuilder mb)
+
++ Generate code to push name. |
+
+ void |
+genPushUri(MethodBuilder mb)
+
++ Generate code to push namespace URI. |
+
+ void |
+genPushUriPair(MethodBuilder mb)
+
++ Generate code to push namespace URI followed by name. |
+
+ boolean |
+isNullUri()
+
++ Check if namespace URI is null. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+private final java.lang.String m_name+
+
+private java.lang.String m_namespace+
+
+private final boolean m_isAttribute+
+
+private int m_namespaceIndex+
+
+Constructor Detail | +
---|
+public NameDefinition(java.lang.String name, + java.lang.String ns, + boolean attr)+
+
attr
- flag for attribute name+Method Detail | +
---|
+public boolean isNullUri()+
+
true
if URI null, false
if not+public void genPushUri(MethodBuilder mb)+
+
mb
- method builder+public void genPushName(MethodBuilder mb)+
+
mb
- method builder+public void genPushUriPair(MethodBuilder mb)+
+
mb
- method builder+public void genPushIndexPair(MethodBuilder mb)+
+
mb
- method builder+public void fixNamespace(DefinitionContext defc) + throws JiBXException+
+
defc
- definition context for namespaces
+JiBXException
- if error in namespace handling+public java.lang.String toString()+
toString
in class java.lang.Object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder.ContainerBase + org.jibx.binding.def.NestedBase + org.jibx.binding.def.NestedCollection ++
public class NestedCollection
+Collection binding definition. This handles one or more child components, + which may be ordered or unordered. +
+ +
+
+Nested Class Summary | +|
---|---|
+(package private) static class |
+NestedCollection.AddStore
+
++ Collection item store strategy for collection with add method. |
+
+(package private) static class |
+NestedCollection.ArrayLoad
+
++ Collection item load strategy for array. |
+
+(package private) static class |
+NestedCollection.ArrayStore
+
++ Collection item store strategy for array. |
+
+(package private) static class |
+NestedCollection.CollectionLoad
+
++ Base class for collection item load strategy. |
+
+(package private) static class |
+NestedCollection.CollectionStore
+
++ Base class for collection item store strategy. |
+
+(package private) static class |
+NestedCollection.IndexedLoad
+
++ Collection item load strategy for collection with items accessed by + index number. |
+
+(package private) static class |
+NestedCollection.IndexedStore
+
++ Collection item store strategy for collection with items set by + index number. |
+
+(package private) static class |
+NestedCollection.IteratorLoad
+
++ Collection item load strategy for collection with items accessed by + iterator or enumeration. |
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+GROWARRAY_METHOD
+
++ |
+
+private static java.lang.String |
+GROWARRAY_SIGNATURE
+
++ |
+
+private java.lang.String |
+m_itemType
+
++ Fully qualified class name of values from collection. |
+
+private NestedCollection.CollectionLoad |
+m_loadStrategy
+
++ Strategy for generating code to load item from collection. |
+
+private NestedCollection.CollectionStore |
+m_storeStrategy
+
++ Strategy for generating code to store item to collection. |
+
+private static java.lang.String |
+RESIZEARRAY_METHOD
+
++ |
+
+private static java.lang.String |
+RESIZEARRAY_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 | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private static final java.lang.String GROWARRAY_METHOD+
+private static final java.lang.String GROWARRAY_SIGNATURE+
+private static final java.lang.String RESIZEARRAY_METHOD+
+private static final java.lang.String RESIZEARRAY_SIGNATURE+
+private final java.lang.String m_itemType+
+
+private final NestedCollection.CollectionLoad m_loadStrategy+
+
+private final NestedCollection.CollectionStore m_storeStrategy+
+
+Constructor Detail | +
---|
+public NestedCollection(IContainer parent, + IContextObj objc, + boolean ord, + java.lang.String type, + NestedCollection.CollectionLoad load, + NestedCollection.CollectionStore store)+
+
parent
- containing binding definition contextobjc
- current object contextord
- ordered content flagtype
- fully qualified class name of values from collection (may be
+ null
, if child content present)load
- collection load code generation strategystore
- collection store code generation strategy+Method Detail | +
---|
+public boolean hasAttribute()+
IComponent
+
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb)+
IComponent
+
mb
- method builder+public void genAttributeUnmarshal(ContextMethodBuilder mb)+
IComponent
+
mb
- method builder+public void genAttributeMarshal(ContextMethodBuilder mb)+
IComponent
+
mb
- method builder+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
hasContent
in class NestedBase
true
if one or more content values defined
+ for containing element, false
if not+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public boolean hasId()+
IComponent
+
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
mb
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
JiBXException
- if error in configuration+public void print(int depth)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.StringConversion + org.jibx.binding.def.PrimitiveStringConversion ++
public class PrimitiveStringConversion
+Primitive string conversion handling. Class for handling serialization
+ converting a primitive type to and from String
values.
+
+ +
+
+Field Summary | +|
---|---|
+private static int |
+DOUBLE_TYPE
+
++ |
+
+private static int |
+FLOAT_TYPE
+
++ |
+
+private static int |
+INT_TYPE
+
++ |
+
+private static int |
+LONG_TYPE
+
++ |
+
+private boolean |
+m_isMarshalText
+
++ Marshalling requires conversion to text flag. |
+
+private boolean |
+m_isUnmarshalText
+
++ Unmarshalling requires conversion to text flag. |
+
+private java.lang.String |
+m_stackType
+
++ Name of value type on stack. |
+
+private ClassItem |
+m_unmarshalOptAttribute
+
++ Unmarshalling context method for optional attribute. |
+
+private ClassItem |
+m_unmarshalOptElement
+
++ Unmarshalling context method for optional element. |
+
+private ClassItem |
+m_unmarshalReqAttribute
+
++ Unmarshalling context method for required attribute. |
+
+private ClassItem |
+m_unmarshalReqElement
+
++ Unmarshalling context method for required element. |
+
+private int |
+m_valueType
+
++ Comparison and marshal type of value (INT_TYPE, LONG_TYPE, FLOAT_TYPE, + or DOUBLE_TYPE) |
+
+private static ClassFile |
+s_unmarshalClass
+
++ |
+
+private static java.lang.Class[] |
+SINGLE_STRING_ARGS
+
++ Constant argument type array for finding conversion methods. |
+
+private static java.lang.String |
+UNMARSHAL_SIG_LEAD
+
++ Unmarshal method signature leading portion. |
+
+private static java.lang.String |
+UTILITY_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.Object |
+convertDefault(java.lang.String text)
+
++ Convert text representation into default value object. |
+
+ StringConversion |
+derive(java.lang.String type,
+ java.lang.String ser,
+ java.lang.String dser,
+ java.lang.String dflt)
+
++ Derive from existing formatting information. |
+
+ void |
+genFromText(ContextMethodBuilder mb)
+
++ Generate code to convert String representation. |
+
+ void |
+genParseOptional(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert optional attribute or element. |
+
+ void |
+genParseRequired(boolean attr,
+ ContextMethodBuilder mb)
+
++ Generate code to parse and convert required attribute or element. |
+
+protected BranchWrapper |
+genToOptionalText(java.lang.String type,
+ ContextMethodBuilder mb,
+ int extra)
+
++ Generate code to check if an optional value is not equal to the default. |
+
+ boolean |
+isPrimitive()
+
++ Check if the type handled by this conversion is of a primitive type. |
+
+protected void |
+pushDefault(ContextMethodBuilder mb)
+
++ Push default value on stack. |
+
+protected void |
+setDeserializer(java.lang.String deser)
+
++ Set deserializer for conversion. |
+
+protected void |
+setSerializer(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 | +
---|
+private static ClassFile s_unmarshalClass+
+private static final int INT_TYPE+
+private static final int LONG_TYPE+
+private static final int FLOAT_TYPE+
+private static final int DOUBLE_TYPE+
+private static final java.lang.String UTILITY_CLASS_NAME+
+
+private static final java.lang.String UNMARSHAL_SIG_LEAD+
+
+private static final java.lang.Class[] SINGLE_STRING_ARGS+
+
+private boolean m_isMarshalText+
+
+private boolean m_isUnmarshalText+
+
+private ClassItem m_unmarshalOptAttribute+
+
+private ClassItem m_unmarshalOptElement+
+
+private ClassItem m_unmarshalReqAttribute+
+
+private ClassItem m_unmarshalReqElement+
+
+private int m_valueType+
+
+private java.lang.String m_stackType+
+
+Constructor Detail | +
---|
+protected PrimitiveStringConversion(java.lang.String type, + PrimitiveStringConversion inherit)+
+
type
- name of primitive type handled by conversioninherit
- conversion information inherited by this conversion+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)+
+
cls
- class of primitive type handled by conversiondflt
- 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 valueuattr
- unmarshalling context method name for attribute valueuelem
- unmarshalling context method name for element value+Method Detail | +
---|
+public void genFromText(ContextMethodBuilder mb)+
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.
++
genFromText
in class StringConversion
mb
- method builder+protected void pushDefault(ContextMethodBuilder mb)+
+
mb
- method builder+public void genParseOptional(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
genParseOptional
in class StringConversion
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+public void genParseRequired(boolean attr, + ContextMethodBuilder mb) + throws JiBXException+
+
genParseRequired
in class StringConversion
attr
- item is an attribute (vs element) flagmb
- method builder
+JiBXException
- if error in configuration+protected BranchWrapper genToOptionalText(java.lang.String type, + ContextMethodBuilder mb, + int extra) + throws JiBXException+
+
genToOptionalText
in class StringConversion
type
- fully qualified class name for value on stackmb
- method builderextra
- count of extra values to be popped from stack if missing
+JiBXException
- if error in configuration+protected java.lang.Object convertDefault(java.lang.String text) + throws JiBXException+
String
value directly.
++
convertDefault
in class StringConversion
text
- value representation to be converted
+JiBXException
- on conversion error+public boolean isPrimitive()+
+
isPrimitive
in class StringConversion
true
to indicate primitive type+protected void setSerializer(java.lang.String ser) + throws JiBXException+
+
setSerializer
in class StringConversion
ser
- fully qualified class and method name of serializer
+JiBXException
- if serializer not found or not usable+protected void setDeserializer(java.lang.String deser) + throws JiBXException+
+
setDeserializer
in class StringConversion
deser
- fully qualified class and method name of deserializer
+JiBXException
- if deserializer not found or not usable+public StringConversion derive(java.lang.String type, + java.lang.String ser, + java.lang.String dser, + java.lang.String dflt) + throws JiBXException+
+
derive
in class StringConversion
type
- fully qualified name of class handled by conversionser
- 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)
+JiBXException
- if error in configuration information
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder.ContainerBase + org.jibx.binding.def.NestedBase ++
public abstract class NestedBase
+Base class for structure and collection binding definitions. This handles one + or more child components, which may be ordered or unordered. +
+ +
+
+Field Summary | +|
---|---|
+protected java.util.ArrayList |
+m_attributes
+
++ Included attribute definitions (lazy create, only if needed). |
+
+protected java.util.ArrayList |
+m_contents
+
++ Nested content definitions (initially used for all child components). |
+
+private IContextObj |
+m_contextObject
+
++ Context object for this definition. |
+
+private DefinitionContext |
+m_defContext
+
++ Definition context for container (may be same as parent). |
+
+private boolean |
+m_hasContext
+
++ Flag for context defined at level. |
+
+protected boolean |
+m_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 | +|
---|---|
+ void |
+addComponent(IComponent comp)
+
++ Add child component to nested structure. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ java.util.ArrayList |
+getAttributes()
+
++ Get the attribute children of this mapping. |
+
+ BindingDefinition |
+getBindingRoot()
+
++ Get root of binding definition. |
+
+ java.util.ArrayList |
+getContents()
+
++ Get the content children of this mapping. |
+
+ DefinitionContext |
+getDefinitionContext()
+
++ Get definition context for binding element. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasNamespaces()
+
++ |
+
+ boolean |
+isContentOrdered()
+
++ Check if content children are ordered. |
+
+ boolean |
+isOptional()
+
++ 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 | +
---|
+private final IContextObj m_contextObject+
+
+private final boolean m_hasContext+
+
+protected final boolean m_isOrdered+
+
+private final DefinitionContext m_defContext+
+
+protected java.util.ArrayList m_attributes+
+
+protected java.util.ArrayList m_contents+
+
+Constructor Detail | +
---|
+public NestedBase(IContainer contain, + IContextObj objc, + boolean ord, + boolean defc)+
+
contain
- containing binding definition contextobjc
- current object contextord
- ordered content flagdefc
- define context for structure flag+Method Detail | +
---|
+public java.util.ArrayList getAttributes()+
+
null
if none; should not
+ be modified)+public java.util.ArrayList getContents()+
+
+public void addComponent(IComponent comp)+
IComponent.setLinkages()
is called the
+ components are checked to determine whether they actually supply
+ attribute(s), content, or both.
++
comp
- child component to be added to structure+public boolean isContentOrdered()+
IContainer
+
isContentOrdered
in interface IContainer
true
if ordered, false
if not+public boolean hasNamespaces()+
+public BindingDefinition getBindingRoot()+
IContainer
+
getBindingRoot
in interface IContainer
+public DefinitionContext getDefinitionContext()+
IContainer
+
getDefinitionContext
in interface IContainer
+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genNewInstance(ContextMethodBuilder mb)+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder ++
public abstract class BindingBuilder
+Binding definition constants. This gives the definitions for names and + namespaces used by the binding definition file. +
+ +
+
+Nested Class Summary | +|
---|---|
+(package private) static class |
+BindingBuilder.ContainerBase
+
++ Base class for containers. |
+
+Field Summary | +|
---|---|
+(package private) static int |
+ACC_PACKAGE
+
++ |
+
+(package private) static int |
+ACC_PRIVATE
+
++ |
+
+(package private) static int |
+ACC_PROTECTED
+
++ |
+
+(package private) static int |
+ACC_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.String |
+BINDING_DIRECTION
+
++ |
+
+private static java.lang.String |
+BINDING_ELEMENT
+
++ Definitions for "binding" element use "BINDING" prefix. |
+
+private static java.lang.String |
+BINDING_FORCE
+
++ |
+
+private static java.lang.String |
+BINDING_FORWARDS
+
++ |
+
+private static java.lang.String |
+BINDING_GLOBALID
+
++ |
+
+private static java.lang.String |
+BINDING_NAME
+
++ |
+
+private static java.lang.String |
+BINDING_PACKAGE
+
++ |
+
+private static java.lang.String |
+BINDING_TRACKING
+
++ |
+
+private static java.lang.String[] |
+BINDINGDIR_NAMES
+
++ |
+
+private static int[] |
+BINDINGDIR_NUMS
+
++ |
+
+private static java.lang.String |
+COLLECTION_ADDMETHOD
+
++ |
+
+private static java.lang.String |
+COLLECTION_ELEMENT
+
++ Definitions for "collection" element use "COLLECTION" prefix. |
+
+private static java.lang.String |
+COLLECTION_ITEMTYPE
+
++ |
+
+private static java.lang.String |
+COLLECTION_ITERMETHOD
+
++ |
+
+private static java.lang.String |
+COLLECTION_LOADMETHOD
+
++ |
+
+private static java.lang.String |
+COLLECTION_SIZEMETHOD
+
++ |
+
+private static java.lang.String |
+COLLECTION_STOREMETHOD
+
++ |
+
+private static java.lang.String |
+COMMON_ACCESSLEVEL
+
++ |
+
+private static java.lang.String |
+COMMON_AUTOLINK
+
++ |
+
+private static java.lang.String |
+COMMON_CHOICE
+
++ |
+
+private static java.lang.String |
+COMMON_DEFAULT
+
++ |
+
+private static java.lang.String |
+COMMON_DESERIALIZER
+
++ |
+
+private static java.lang.String |
+COMMON_FACTORY
+
++ |
+
+private static java.lang.String |
+COMMON_FIELD
+
++ |
+
+private static java.lang.String |
+COMMON_GETMETHOD
+
++ |
+
+private static java.lang.String |
+COMMON_LABEL
+
++ |
+
+private static java.lang.String |
+COMMON_MARSHALLER
+
++ |
+
+private static java.lang.String |
+COMMON_NAME
+
++ |
+
+private static java.lang.String |
+COMMON_NAMESPACE
+
++ |
+
+private static java.lang.String |
+COMMON_NAMESTYLE
+
++ |
+
+private static java.lang.String |
+COMMON_ORDERED
+
++ |
+
+private static java.lang.String |
+COMMON_POSTSET
+
++ |
+
+private static java.lang.String |
+COMMON_PREGET
+
++ |
+
+private static java.lang.String |
+COMMON_PRESET
+
++ |
+
+private static java.lang.String |
+COMMON_SERIALIZER
+
++ |
+
+private static java.lang.String |
+COMMON_SETMETHOD
+
++ |
+
+private static java.lang.String |
+COMMON_STRIPPREFIX
+
++ |
+
+private static java.lang.String |
+COMMON_STRIPSUFFIX
+
++ |
+
+private static java.lang.String |
+COMMON_STYLE
+
++ |
+
+private static java.lang.String |
+COMMON_TESTMETHOD
+
++ |
+
+private static java.lang.String |
+COMMON_TYPE
+
++ |
+
+private static java.lang.String |
+COMMON_UNMARSHALLER
+
++ |
+
+private static java.lang.String |
+COMMON_USAGE
+
++ |
+
+private static java.lang.String |
+COMMON_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 int |
+DIRECTION_BOTH
+
++ |
+
+private static int |
+DIRECTION_INPUT
+
++ |
+
+private static int |
+DIRECTION_OUTPUT
+
++ |
+
+private static java.lang.String |
+FORMAT_ELEMENT
+
++ Definitions for "format" element use "FORMAT" prefix. |
+
+private static java.lang.String |
+FORMAT_NAME
+
++ |
+
+private static java.lang.String |
+FORMAT_TYPE
+
++ |
+
+private static java.lang.String[] |
+IDENTTYPE_NAMES
+
++ |
+
+private static int[] |
+IDENTTYPE_NUMS
+
++ |
+
+private static java.lang.String |
+INCLUDE_ELEMENT
+
++ Definitions for "include" element use "INCLUDE" prefix. |
+
+private static java.lang.String |
+INCLUDE_PATH
+
++ |
+
+(package private) static int |
+LINK_FIELDS
+
++ |
+
+(package private) static int |
+LINK_METHODS
+
++ |
+
+(package private) static int |
+LINK_NONE
+
++ |
+
+private static java.lang.String |
+MAPPING_ABSTRACT
+
++ |
+
+private static java.lang.String |
+MAPPING_CLASS
+
++ |
+
+private static java.lang.String |
+MAPPING_ELEMENT
+
++ Definitions for "mapping" element use "MAPPING" prefix. |
+
+private static java.lang.String |
+MAPPING_EXTENDS
+
++ |
+
+private static java.lang.String |
+MAPPING_TYPENAME
+
++ |
+
+private static java.lang.String |
+MARSHALLER_INTERFACE
+
++ |
+
+private static java.lang.String |
+MARSHALLER_INTERFACETYPE
+
++ |
+
+private static java.lang.String[] |
+NAME_GENERATE_NAMES
+
++ |
+
+private static int[] |
+NAME_GENERATE_NUMS
+
++ |
+
+(package private) static int |
+NAME_HYPHENS
+
++ |
+
+(package private) static int |
+NAME_MIXED
+
++ |
+
+private static java.lang.String |
+NAMESPACE_DEFAULT
+
++ |
+
+private static java.lang.String |
+NAMESPACE_ELEMENT
+
++ Definitions for "namespace" element use "NAMESPACE" prefix. |
+
+private static java.lang.String |
+NAMESPACE_PREFIX
+
++ |
+
+private static java.lang.String |
+NAMESPACE_URI
+
++ |
+
+private static java.lang.String[] |
+NAMESPACEACCESS_NAMES
+
++ |
+
+private static int[] |
+NAMESPACEACCESS_NUMS
+
++ |
+
+private static java.lang.String |
+STRUCTURE_ELEMENT
+
++ Definitions for "structure" element use "STRUCTURE" prefix. |
+
+private static java.lang.String |
+STRUCTURE_MAPAS
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_INTERFACE
+
++ |
+
+private static java.lang.String |
+UNMARSHALLER_INTERFACETYPE
+
++ |
+
+private static java.lang.String |
+URI_ATTRIBUTES
+
++ Attribute namespace used for binding definition file. |
+
+private static java.lang.String |
+URI_ELEMENTS
+
++ Element namespace used for binding definition file. |
+
+private static java.lang.String |
+USAGE_OPTIONAL
+
++ |
+
+private static java.lang.String |
+USAGE_REQUIRED
+
++ |
+
+private static java.lang.String |
+VALUE_CONSTANT
+
++ |
+
+private static java.lang.String |
+VALUE_ELEMENT
+
++ Definitions for "value" element use "VALUE" prefix. |
+
+private static java.lang.String |
+VALUE_FORMAT
+
++ |
+
+private static java.lang.String |
+VALUE_IDENT
+
++ |
+
+private static java.lang.String |
+VALUE_STYLE
+
++ |
+
+private static java.lang.String[] |
+VALUE_STYLE_NAMES
+
++ |
+
+private static int[] |
+VALUE_STYLE_NUMS
+
++ |
+
+Constructor Summary | +|
---|---|
BindingBuilder()
+
++ |
+
+Method Summary | +|
---|---|
+private static boolean |
+isDirectObject(UnmarshallingContext ctx)
+
++ Check if attributes define a direct object reference. |
+
+private static boolean |
+isMappingRef(UnmarshallingContext ctx)
+
++ Check if attributes define a mapping reference. |
+
+private static boolean |
+isNamePresent(UnmarshallingContext ctx)
+
++ Check if attributes supply a name definition. |
+
+private static boolean |
+isObjectBinding(UnmarshallingContext ctx)
+
++ Check for component object present. |
+
+private static boolean |
+isOptionalProperty(UnmarshallingContext ctx)
+
++ Check for optional property. |
+
+private static boolean |
+isPropertyPresent(UnmarshallingContext ctx)
+
++ Check for property definition present. |
+
+static BindingDefinition |
+unmarshalBindingDefinition(UnmarshallingContext ctx,
+ java.lang.String name,
+ java.net.URL root)
+
++ Unmarshal binding definition. |
+
+private static DirectObject |
+unmarshalDirectObj(UnmarshallingContext ctx,
+ java.lang.String type,
+ IContainer parent,
+ DefinitionContext defc,
+ int slot,
+ NameDefinition name)
+
++ Unmarshal direct object component. |
+
+private static void |
+unmarshalFormats(UnmarshallingContext ctx,
+ DefinitionContext defc)
+
++ Unmarshal format definitions. |
+
+static void |
+unmarshalInclude(UnmarshallingContext ctx,
+ BindingDefinition bdef,
+ java.net.URL root,
+ java.util.ArrayList nss,
+ java.util.HashSet paths)
+
++ Unmarshal included binding. |
+
+static IMapping |
+unmarshalMapping(UnmarshallingContext ctx,
+ IContainer parent,
+ java.util.ArrayList nss,
+ boolean uord)
+
++ Unmarshal mapping definition. |
+
+private static IComponent |
+unmarshalMappingRef(UnmarshallingContext ctx,
+ IContainer parent,
+ IContextObj objc,
+ PropertyDefinition prop,
+ NameDefinition name)
+
++ Unmarshal mapping reference component. |
+
+private static void |
+unmarshalMappings(UnmarshallingContext ctx,
+ IContainer parent,
+ java.util.ArrayList nss,
+ boolean uord)
+
++ Unmarshal mapping definitions. |
+
+private static NameDefinition |
+unmarshalName(UnmarshallingContext ctx,
+ boolean attr)
+
++ Unmarshal name definition. |
+
+private static NamespaceDefinition |
+unmarshalNamespace(UnmarshallingContext ctx)
+
++ Unmarshal namespace definition. |
+
+private static void |
+unmarshalNamespaces(UnmarshallingContext ctx,
+ DefinitionContext defc)
+
++ Unmarshal namespace definitions. |
+
+private static ObjectBinding |
+unmarshalObjectBinding(UnmarshallingContext ctx,
+ IContextObj objc,
+ IContainer parent,
+ java.lang.String type)
+
++ Unmarshal object binding component. |
+
+private static PropertyDefinition |
+unmarshalProperty(UnmarshallingContext ctx,
+ IContainer parent,
+ IContextObj cobj,
+ boolean opt)
+
++ Unmarshal property definition. |
+
+private static StringConversion |
+unmarshalStringConversion(UnmarshallingContext ctx,
+ StringConversion base,
+ java.lang.String type)
+
++ Unmarshal string conversion. |
+
+static IComponent |
+unmarshalStructure(UnmarshallingContext ctx,
+ IContainer contain,
+ IContextObj cobj,
+ boolean coll,
+ boolean uord,
+ boolean implic)
+
++ Unmarshal subclass instance for structure definition. |
+
+private static void |
+unmarshalStructureChildren(UnmarshallingContext ctx,
+ NestedBase nest,
+ IContextObj objc,
+ boolean impl,
+ java.lang.String itype)
+
++ Unmarshal child bindings for a nested structure definition. |
+
+private static IComponent |
+unmarshalStructureRef(UnmarshallingContext ctx,
+ IContainer contain,
+ NameDefinition name,
+ PropertyDefinition prop,
+ IContextObj cobj)
+
++ Unmarshal structure reference component. |
+
+private static ValueChild |
+unmarshalValue(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 | +
---|
+private static final java.lang.String URI_ELEMENTS+
+
+private static final java.lang.String URI_ATTRIBUTES+
+
+private static final java.lang.String COMMON_STYLE+
+private static final java.lang.String COMMON_AUTOLINK+
+private static final java.lang.String COMMON_ACCESSLEVEL+
+private static final java.lang.String COMMON_STRIPPREFIX+
+private static final java.lang.String COMMON_STRIPSUFFIX+
+private static final java.lang.String COMMON_NAMESTYLE+
+private static final java.lang.String COMMON_NAME+
+private static final java.lang.String COMMON_NAMESPACE+
+private static final java.lang.String COMMON_FACTORY+
+private static final java.lang.String COMMON_PRESET+
+private static final java.lang.String COMMON_POSTSET+
+private static final java.lang.String COMMON_PREGET+
+private static final java.lang.String COMMON_MARSHALLER+
+private static final java.lang.String COMMON_UNMARSHALLER+
+private static final java.lang.String COMMON_FIELD+
+private static final java.lang.String COMMON_TYPE+
+private static final java.lang.String COMMON_USAGE+
+private static final java.lang.String COMMON_TESTMETHOD+
+private static final java.lang.String COMMON_GETMETHOD+
+private static final java.lang.String COMMON_SETMETHOD+
+private static final java.lang.String COMMON_DEFAULT+
+private static final java.lang.String COMMON_SERIALIZER+
+private static final java.lang.String COMMON_DESERIALIZER+
+private static final java.lang.String COMMON_LABEL+
+private static final java.lang.String COMMON_USING+
+private static final java.lang.String COMMON_ORDERED+
+private static final java.lang.String COMMON_CHOICE+
+private static final java.lang.String BINDING_ELEMENT+
+
+private static final java.lang.String BINDING_NAME+
+private static final java.lang.String BINDING_DIRECTION+
+private static final java.lang.String BINDING_GLOBALID+
+private static final java.lang.String BINDING_FORWARDS+
+private static final java.lang.String BINDING_PACKAGE+
+private static final java.lang.String BINDING_TRACKING+
+private static final java.lang.String BINDING_FORCE+
+private static final java.lang.String NAMESPACE_ELEMENT+
+
+private static final java.lang.String NAMESPACE_URI+
+private static final java.lang.String NAMESPACE_PREFIX+
+private static final java.lang.String NAMESPACE_DEFAULT+
+private static final java.lang.String FORMAT_ELEMENT+
+
+private static final java.lang.String FORMAT_NAME+
+private static final java.lang.String FORMAT_TYPE+
+private static final java.lang.String MAPPING_ELEMENT+
+
+private static final java.lang.String MAPPING_CLASS+
+private static final java.lang.String MAPPING_ABSTRACT+
+private static final java.lang.String MAPPING_EXTENDS+
+private static final java.lang.String MAPPING_TYPENAME+
+private static final java.lang.String VALUE_ELEMENT+
+
+private static final java.lang.String VALUE_STYLE+
+private static final java.lang.String VALUE_FORMAT+
+private static final java.lang.String VALUE_CONSTANT+
+private static final java.lang.String VALUE_IDENT+
+private static final java.lang.String STRUCTURE_ELEMENT+
+
+private static final java.lang.String STRUCTURE_MAPAS+
+private static final java.lang.String COLLECTION_ELEMENT+
+
+private static final java.lang.String COLLECTION_LOADMETHOD+
+private static final java.lang.String COLLECTION_SIZEMETHOD+
+private static final java.lang.String COLLECTION_STOREMETHOD+
+private static final java.lang.String COLLECTION_ADDMETHOD+
+private static final java.lang.String COLLECTION_ITERMETHOD+
+private static final java.lang.String COLLECTION_ITEMTYPE+
+private static final java.lang.String INCLUDE_ELEMENT+
+
+private static final java.lang.String INCLUDE_PATH+
+private static final java.lang.String[] VALUE_STYLE_NAMES+
+private static final int[] VALUE_STYLE_NUMS+
+private static final java.lang.String[] CONTAINING_STYLE_NAMES+
+private static final int[] CONTAINING_STYLE_NUMS+
+static final int LINK_NONE+
+static final int LINK_FIELDS+
+static final int LINK_METHODS+
+private static final java.lang.String[] AUTO_LINK_NAMES+
+private static final int[] AUTO_LINK_NUMS+
+static final int ACC_PRIVATE+
+static final int ACC_PACKAGE+
+static final int ACC_PROTECTED+
+static final int ACC_PUBLIC+
+private static final java.lang.String[] ACCESS_LEVEL_NAMES+
+private static final int[] ACCESS_LEVEL_NUMS+
+static final int NAME_HYPHENS+
+static final int NAME_MIXED+
+private static final java.lang.String[] NAME_GENERATE_NAMES+
+private static final int[] NAME_GENERATE_NUMS+
+private static final java.lang.String[] COMPONENT_OBJECT_NAMESPACES+
+private static final java.lang.String[] COMPONENT_OBJECT_NAMES+
+private static final java.lang.String[] NAMESPACEACCESS_NAMES+
+private static final int[] NAMESPACEACCESS_NUMS+
+private static final java.lang.String[] IDENTTYPE_NAMES+
+private static final int[] IDENTTYPE_NUMS+
+private static final int DIRECTION_INPUT+
+private static final int DIRECTION_OUTPUT+
+private static final int DIRECTION_BOTH+
+private static final java.lang.String[] BINDINGDIR_NAMES+
+private static final int[] BINDINGDIR_NUMS+
+private static final java.lang.String USAGE_OPTIONAL+
+private static final java.lang.String USAGE_REQUIRED+
+private static final java.lang.String UNMARSHALLER_INTERFACE+
+private static final java.lang.String MARSHALLER_INTERFACE+
+private static final java.lang.String UNMARSHALLER_INTERFACETYPE+
+private static final java.lang.String MARSHALLER_INTERFACETYPE+
+Constructor Detail | +
---|
+public BindingBuilder()+
+Method Detail | +
---|
+private static boolean isNamePresent(UnmarshallingContext ctx)+
+
ctx
- unmarshalling context information
+true
if attributes define a name,
+ false
if not+private static boolean isPropertyPresent(UnmarshallingContext ctx)+
+
ctx
- unmarshalling context information+private static boolean isDirectObject(UnmarshallingContext ctx)+
+
ctx
- unmarshalling context information+private static boolean isMappingRef(UnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context information
+true
if attributes define a mapping reference,
+ false
if not
+JiBXException
- if error in unmarshalling+private static boolean isObjectBinding(UnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context information
+JiBXException
- if error in unmarshalling+private static NameDefinition unmarshalName(UnmarshallingContext ctx, + boolean attr) + throws JiBXException+
+
ctx
- unmarshalling context informationattr
- flag for attribute name definition
+JiBXException
- if error in unmarshalling+private static NamespaceDefinition unmarshalNamespace(UnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context information
+JiBXException
- if error in unmarshalling+private static StringConversion unmarshalStringConversion(UnmarshallingContext ctx, + StringConversion base, + java.lang.String type) + throws JiBXException+
+
ctx
- unmarshalling context informationbase
- conversion used as base for this conversiontype
- fully qualified class name of type handled by conversion
+JiBXException
- if error in unmarshalling+private static boolean isOptionalProperty(UnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context information
+true
if attribute present with value "true",
+ false
otherwise
+JiBXException
- if error in unmarshalling+private static PropertyDefinition unmarshalProperty(UnmarshallingContext ctx, + IContainer parent, + IContextObj cobj, + boolean opt) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structurecobj
- context object informationopt
- force optional value flag
+JiBXException
- if error in unmarshalling+private static ValueChild unmarshalValue(UnmarshallingContext ctx, + IContainer parent, + IContextObj cobj, + boolean uord, + boolean impl, + java.lang.String itype) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structurecobj
- context object informationuord
- unordered collection member flagimpl
- implicit value from collection flagitype
- base type for value
+JiBXException
- if error in unmarshalling+private static DirectObject unmarshalDirectObj(UnmarshallingContext ctx, + java.lang.String type, + IContainer parent, + DefinitionContext defc, + int slot, + NameDefinition name) + throws JiBXException+
+
ctx
- unmarshalling context informationtype
- fully qualified class name of object type handledparent
- containing binding definition structuredefc
- definition context to be used (if separate from parent,
+ otherwise null
)slot
- marshaller/unmarshaller slot numbername
- element name information (null
if no element
+ name)
+JiBXException
- if error in unmarshalling+private static IComponent unmarshalMappingRef(UnmarshallingContext ctx, + IContainer parent, + IContextObj objc, + PropertyDefinition prop, + NameDefinition name) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structureobjc
- current object contextprop
- property definitionname
- reference name definition (only allowed with abstract
+ mappings)
+JiBXException
- if error in unmarshalling+private static IComponent unmarshalStructureRef(UnmarshallingContext ctx, + IContainer contain, + NameDefinition name, + PropertyDefinition prop, + IContextObj cobj) + throws JiBXException+
+
ctx
- unmarshalling context informationcontain
- containing binding componentname
- element name information (null
if no element
+ name)prop
- property definition (null
if no separate
+ property)cobj
- context object
+JiBXException
- if error in unmarshalling+private static void unmarshalStructureChildren(UnmarshallingContext ctx, + NestedBase nest, + IContextObj objc, + boolean impl, + java.lang.String itype) + throws JiBXException+
+
ctx
- unmarshalling context informationnest
- nested structure definitionobjc
- context object definitionimpl
- property value implicit flagitype
- item type for child components
+JiBXException
- if error in unmarshalling+private static ObjectBinding unmarshalObjectBinding(UnmarshallingContext ctx, + IContextObj objc, + IContainer parent, + java.lang.String type) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structureobjc
- current object contexttype
- fully qualified name of object class
+JiBXException
- if error in unmarshalling+private static void unmarshalNamespaces(UnmarshallingContext ctx, + DefinitionContext defc) + throws JiBXException+
+
ctx
- unmarshalling context informationdefc
- definition context for defined namespaces
+JiBXException
- if error in unmarshalling+private static void unmarshalFormats(UnmarshallingContext ctx, + DefinitionContext defc) + throws JiBXException+
+
ctx
- unmarshalling context informationdefc
- definition context for defined formats
+JiBXException
- if error in unmarshalling+private static void unmarshalMappings(UnmarshallingContext ctx, + IContainer parent, + java.util.ArrayList nss, + boolean uord) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structurenss
- extra namespaces to be included in this mapping definition
+ (may be null
)uord
- container is unordered structure flag
+JiBXException
- if error in unmarshalling+public static IComponent unmarshalStructure(UnmarshallingContext ctx, + IContainer contain, + IContextObj cobj, + boolean coll, + boolean uord, + boolean implic) + throws JiBXException+
+
ctx
- unmarshalling context informationcontain
- containing binding definition structurecobj
- context object informationcoll
- collection structure flaguord
- container is unordered structure flagimplic
- property value implicit flag
+JiBXException
- if error in unmarshalling+public static IMapping unmarshalMapping(UnmarshallingContext ctx, + IContainer parent, + java.util.ArrayList nss, + boolean uord) + throws JiBXException+
+
ctx
- unmarshalling context informationparent
- containing binding definition structurenss
- extra namespaces to be included in this mapping definition
+ (may be null
)uord
- container is unordered structure flag
+JiBXException
- if error in unmarshalling+public static void unmarshalInclude(UnmarshallingContext ctx, + BindingDefinition bdef, + java.net.URL root, + java.util.ArrayList nss, + java.util.HashSet paths) + throws JiBXException+
+
ctx
- unmarshalling context informationbdef
- binding defintion at root of includesroot
- base URL for binding, or null
if unknownnss
- list of namespaces definedpaths
- set of binding paths processed
+JiBXException
- if error in unmarshalling+public static BindingDefinition unmarshalBindingDefinition(UnmarshallingContext ctx, + java.lang.String name, + java.net.URL root) + throws JiBXException+
+
ctx
- unmarshalling context informationname
- default name for bindingroot
- base URL for binding, or null
if unknown
+JiBXException
- if error in unmarshalling
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PropertyDefinition ++
public class PropertyDefinition
+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. +
+ +
+
+Field Summary | +|
---|---|
+private ClassItem |
+m_fieldItem
+
++ Information for field (if given, may be null ). |
+
+private ClassItem |
+m_getMethod
+
++ Information for get method (if given, may be null ). |
+
+private java.lang.String |
+m_getValueType
+
++ Fully qualified name of declared type of value loaded. |
+
+private boolean |
+m_isImplicit
+
++ Reference to implicit value from collection. |
+
+private boolean |
+m_isOptional
+
++ Optional item flag. |
+
+private boolean |
+m_isThis
+
++ Reference to "this" property of object flag. |
+
+private IContextObj |
+m_objContext
+
++ Containing object context. |
+
+private ClassItem |
+m_setMethod
+
++ Information for set method (if given, may be null ). |
+
+private java.lang.String |
+m_setValueType
+
++ Fully qualified name of declared type of value stored. |
+
+private ClassItem |
+m_testMethod
+
++ Information for test method (if given, may be null ). |
+
+private java.lang.String |
+m_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 | +|
---|---|
+ void |
+genLoad(MethodBuilder mb)
+
++ Generate code to load property value to stack. |
+
+ void |
+genStore(MethodBuilder mb)
+
++ Generate code to store property value from stack. |
+
+ BranchWrapper |
+genTest(ContextMethodBuilder mb)
+
++ Generate code to test if property is present. |
+
+ java.lang.String |
+getGetValueType()
+
++ Get value type as fully qualified name for loaded property value. |
+
+ java.lang.String |
+getName()
+
++ Get property name. |
+
+ java.lang.String |
+getSetValueType()
+
++ Get value type as fully qualified name for stored property value. |
+
+ java.lang.String |
+getTypeName()
+
++ Get declared type fully qualified name. |
+
+ boolean |
+hasTest()
+
++ Check if property has presence test. |
+
+ boolean |
+isImplicit()
+
++ Check if property is implicit value from collection. |
+
+ boolean |
+isOptional()
+
++ Check if property is optional. |
+
+ boolean |
+isThis()
+
++ Check if property is "this" reference for object. |
+
+ void |
+setOptional(boolean opt)
+
++ Set flag for an optional property. |
+
+ java.lang.String |
+toString()
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
+
+Field Detail | +
---|
+private final boolean m_isThis+
+
+private final boolean m_isImplicit+
+
+private boolean m_isOptional+
+
+private final IContextObj m_objContext+
+
+private final java.lang.String m_typeName+
+
+private final java.lang.String m_getValueType+
+
+private final java.lang.String m_setValueType+
+
+private final ClassItem m_fieldItem+
null
).
++
+private final ClassItem m_testMethod+
null
).
++
+private final ClassItem m_getMethod+
null
).
++
+private final ClassItem m_setMethod+
null
).
++
+Constructor Detail | +
---|
+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+
+
parent
- containing binding definition structureobj
- containing object contexttype
- fully qualified name of typeisthis
- "this" object reference flagopt
- optional property flagfname
- 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
)
+JiBXException
- if configuration error+public PropertyDefinition(IContextObj obj, + boolean opt)+
+
obj
- containing object contextopt
- optional property flag+public PropertyDefinition(java.lang.String type, + IContextObj obj, + boolean opt)+
+
type
- object type suppliedobj
- containing object contextopt
- optional property flag+Method Detail | +
---|
+public boolean isThis()+
+
true
if reference to "this", false
if
+ not+public boolean isImplicit()+
+
true
if implicit, false
if not+public boolean isOptional()+
+
true
if optional, false
if required+public void setOptional(boolean opt)+
+
opt
- true
if optional property, false
if
+ not+public java.lang.String getName()+
+
+public java.lang.String getTypeName()+
+
+public java.lang.String getGetValueType()+
+
+public java.lang.String getSetValueType()+
+
+public boolean hasTest()+
+
true
if presence test needed, false
if
+ not+public BranchWrapper genTest(ContextMethodBuilder mb)+
+
mb
- method builder
++public void genLoad(MethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if configuration error+public void genStore(MethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if configuration error+public java.lang.String toString()+
toString
in class java.lang.Object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.ObjectBinding ++
public class ObjectBinding
+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. +
+ +
+
+Field Summary | +|
---|---|
+private static org.apache.bcel.generic.Type[] |
+EMPTY_ARGS
+
++ |
+
+private static java.lang.String[] |
+FACTORY_HOOK_SIGNATURES
+
++ |
+
+private static java.lang.String |
+GETSTACKTOP_SIGNATURE
+
++ |
+
+private BoundClass |
+m_class
+
++ Class linked to mapping. |
+
+private IContainer |
+m_container
+
++ Containing binding definition structure. |
+
+private ClassItem |
+m_factoryMethod
+
++ Object factory method. |
+
+private IComponent |
+m_idChild
+
++ Child supplying instance identifier value. |
+
+private boolean |
+m_isStaticMarshal
+
++ Flag for static marshal methods. |
+
+private boolean |
+m_isStaticUnmarshal
+
++ Flag for static unmarshal methods. |
+
+private boolean |
+m_isThisBinding
+
++ Flag for "this" reference, meaning that there's no separate object + instance created. |
+
+private boolean |
+m_lockAttributeMarshal
+
++ Flag for recursion while generating attribute marshal. |
+
+private boolean |
+m_lockAttributeUnmarshal
+
++ Flag for recursion while generating attribute unmarshal. |
+
+private boolean |
+m_lockContentMarshal
+
++ Flag for recursion while generating attribute marshal. |
+
+private boolean |
+m_lockContentUnmarshal
+
++ Flag for recursion while generating attribute unmarshal. |
+
+private ClassItem |
+m_marshalAttributeMethod
+
++ Generated marshal attribute method. |
+
+private java.lang.String |
+m_marshalAttributeName
+
++ Name for marshal attribute method ( null unless
+ generation started). |
+
+private ClassItem |
+m_marshalContentMethod
+
++ Generated marshal content method. |
+
+private java.lang.String |
+m_marshalContentName
+
++ Name for marshal content method ( null unless
+ generation istarted). |
+
+private java.lang.String |
+m_marshalSignature
+
++ Signature used for marshal methods. |
+
+private ClassItem |
+m_newInstanceMethod
+
++ Generated new instance method. |
+
+private ClassItem |
+m_postSetMethod
+
++ Postset method for object. |
+
+private ClassItem |
+m_preGetMethod
+
++ Preget method for object. |
+
+private ClassItem |
+m_preSetMethod
+
++ Preset method for object. |
+
+private ClassItem |
+m_unmarshalAttributeMethod
+
++ Generated unmarshal attribute method. |
+
+private java.lang.String |
+m_unmarshalAttributeName
+
++ Name for unmarshal attribute method ( null unless
+ generation started). |
+
+private ClassItem |
+m_unmarshalContentMethod
+
++ Generated unmarshal content method. |
+
+private java.lang.String |
+m_unmarshalContentName
+
++ Name for unmarshal content method ( null unless
+ generation started). |
+
+private java.lang.String |
+m_unmarshalSignature
+
++ Signature used for unmarshal methods. |
+
+private static java.lang.String |
+MARSHAL_ATTR_SUFFIX
+
++ |
+
+private static java.lang.String |
+MARSHAL_GETSTACKTOPMETHOD
+
++ |
+
+private static java.lang.String[] |
+MARSHAL_HOOK_SIGNATURES
+
++ |
+
+private static java.lang.String |
+MARSHAL_POPOBJECTMETHOD
+
++ |
+
+private static java.lang.String |
+MARSHAL_PUSHOBJECTMETHOD
+
++ |
+
+private static java.lang.String |
+MARSHAL_SUFFIX
+
++ |
+
+private static java.lang.String |
+MARSHALLING_CONTEXT
+
++ |
+
+private static java.lang.String |
+NEWINSTANCE_SUFFIX
+
++ |
+
+private static java.lang.String |
+POPOBJECT_SIGNATURE
+
++ |
+
+private static java.lang.String |
+PUSHOBJECT_SIGNATURE
+
++ |
+
+private static org.apache.bcel.generic.Type[] |
+SETSOURCE_ARGS
+
++ |
+
+private static java.lang.String |
+SETSOURCE_METHODNAME
+
++ |
+
+private static java.lang.String |
+SOURCE_TRACKING_INTERFACE
+
++ |
+
+private static java.lang.String |
+SOURCECOLUMN_FIELDNAME
+
++ |
+
+private static java.lang.String |
+SOURCECOLUMN_METHODNAME
+
++ |
+
+private static java.lang.String |
+SOURCEDOCUMENT_FIELDNAME
+
++ |
+
+private static java.lang.String |
+SOURCELINE_FIELDNAME
+
++ |
+
+private static java.lang.String |
+SOURCELINE_METHODNAME
+
++ |
+
+private static java.lang.String |
+SOURCENAME_METHODNAME
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_ATTR_SUFFIX
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_GETSTACKTOPMETHOD
+
++ |
+
+private static java.lang.String[] |
+UNMARSHAL_HOOK_SIGNATURES
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PARAMETER_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_POPOBJECTMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PUSHOBJECTMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_PUSHTRACKEDOBJECTMETHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHAL_SUFFIX
+
++ |
+
+private static java.lang.String |
+UNMARSHALLING_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.String |
+fullMethodName(ClassItem item)
+
++ Construct fully-qualified class and method name for constructed method. |
+
+private java.lang.String |
+fullMethodName(ContextMethodBuilder mb)
+
++ Construct fullly-qualified class and method name for method under + construction. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+private void |
+genMarshalAttributeCall(ContextMethodBuilder mb)
+
++ Generate call to attribute marshal method for object. |
+
+private void |
+genMarshalCall(java.lang.String name,
+ ContextMethodBuilder mb)
+
++ Generate call to a constructed marshal method. |
+
+private void |
+genMarshalContentCall(ContextMethodBuilder mb)
+
++ Generate call to content marshal method for object. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+private void |
+genNewInstanceCall(ContextMethodBuilder mb)
+
++ Generate call to new instance creation method for object. |
+
+private void |
+genNewInstanceCode(ContextMethodBuilder mb)
+
++ Generate code to create an instance of the object for this mapping. |
+
+private void |
+genTrackSourceCode()
+
++ Generate code to handle unmarshal source location tracking. |
+
+private void |
+genUnmarshalAttributeCall(ContextMethodBuilder mb)
+
++ Generate call to attribute unmarshal method for object. |
+
+private void |
+genUnmarshalCall(java.lang.String name,
+ ContextMethodBuilder mb)
+
++ Generate call to a constructed unmarshal method. |
+
+private void |
+genUnmarshalContentCall(ContextMethodBuilder mb)
+
++ Generate call to content unmarshal method for object. |
+
+private void |
+genUserMethodCall(boolean in,
+ ClassItem method,
+ ContextMethodBuilder mb)
+
++ Generate code for calling a user supplied method. |
+
+ BoundClass |
+getBoundClass()
+
++ Get class linked to binding element. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ boolean |
+setIdChild(IComponent child)
+
++ Set ID property. |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private static final java.lang.String[] MARSHAL_HOOK_SIGNATURES+
+private static final java.lang.String[] FACTORY_HOOK_SIGNATURES+
+private static final java.lang.String[] UNMARSHAL_HOOK_SIGNATURES+
+private static final java.lang.String UNMARSHAL_GETSTACKTOPMETHOD+
+private static final java.lang.String MARSHAL_GETSTACKTOPMETHOD+
+private static final java.lang.String GETSTACKTOP_SIGNATURE+
+private static final java.lang.String MARSHALLING_CONTEXT+
+private static final java.lang.String UNMARSHALLING_CONTEXT+
+private static final java.lang.String UNMARSHAL_PARAMETER_SIGNATURE+
+private static final java.lang.String UNMARSHAL_PUSHOBJECTMETHOD+
+private static final java.lang.String UNMARSHAL_PUSHTRACKEDOBJECTMETHOD+
+private static final java.lang.String MARSHAL_PUSHOBJECTMETHOD+
+private static final java.lang.String PUSHOBJECT_SIGNATURE+
+private static final java.lang.String UNMARSHAL_POPOBJECTMETHOD+
+private static final java.lang.String MARSHAL_POPOBJECTMETHOD+
+private static final java.lang.String POPOBJECT_SIGNATURE+
+private static final java.lang.String NEWINSTANCE_SUFFIX+
+private static final java.lang.String UNMARSHAL_ATTR_SUFFIX+
+private static final java.lang.String MARSHAL_ATTR_SUFFIX+
+private static final java.lang.String UNMARSHAL_SUFFIX+
+private static final java.lang.String MARSHAL_SUFFIX+
+private static final java.lang.String SOURCE_TRACKING_INTERFACE+
+private static final java.lang.String SETSOURCE_METHODNAME+
+private static final org.apache.bcel.generic.Type[] SETSOURCE_ARGS+
+private static final java.lang.String SOURCEDOCUMENT_FIELDNAME+
+private static final java.lang.String SOURCELINE_FIELDNAME+
+private static final java.lang.String SOURCECOLUMN_FIELDNAME+
+private static final java.lang.String SOURCENAME_METHODNAME+
+private static final java.lang.String SOURCELINE_METHODNAME+
+private static final java.lang.String SOURCECOLUMN_METHODNAME+
+private static final org.apache.bcel.generic.Type[] EMPTY_ARGS+
+private final IContainer m_container+
+
+private BoundClass m_class+
+
+private final ClassItem m_factoryMethod+
+
+private final ClassItem m_preSetMethod+
+
+private final ClassItem m_postSetMethod+
+
+private final ClassItem m_preGetMethod+
+
+private ClassItem m_newInstanceMethod+
+
+private boolean m_lockAttributeUnmarshal+
+
+private boolean m_lockAttributeMarshal+
+
+private boolean m_lockContentUnmarshal+
+
+private boolean m_lockContentMarshal+
+
+private java.lang.String m_unmarshalSignature+
+
+private java.lang.String m_unmarshalAttributeName+
null
unless
+ generation started).
++
+private java.lang.String m_unmarshalContentName+
null
unless
+ generation started).
++
+private boolean m_isStaticUnmarshal+
+
+private boolean m_isStaticMarshal+
+
+private java.lang.String m_marshalSignature+
+
+private java.lang.String m_marshalAttributeName+
null
unless
+ generation started).
++
+private java.lang.String m_marshalContentName+
null
unless
+ generation istarted).
++
+private ClassItem m_unmarshalAttributeMethod+
+
+private ClassItem m_unmarshalContentMethod+
+
+private ClassItem m_marshalAttributeMethod+
+
+private ClassItem m_marshalContentMethod+
+
+private IComponent m_idChild+
+
+private boolean m_isThisBinding+
+
+Constructor Detail | +
---|
+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+
+
contain
- containing binding definition componentobjc
- current object contexttype
- fully qualified class name for bound objectfact
- user new instance factory methodpres
- user preset method for unmarshallingposts
- user postset method for unmarshallingpget
- user preget method for marshalling
+JiBXException
- if method not found+public ObjectBinding(ObjectBinding base)+
+
base
- original object binding+public ObjectBinding(IContainer contain, + ObjectBinding base)+
+
contain
- binding definition component containing copy+Method Detail | +
---|
+private void genUserMethodCall(boolean in, + ClassItem method, + ContextMethodBuilder mb)+
+
in
- flag for unmarshalling methodmethod
- information for method being calledmb
- method builder for generated code+private void genNewInstanceCode(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in generating code+private void genNewInstanceCall(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+private void genTrackSourceCode() + throws JiBXException+
+
JiBXException
- if error in generating code+private java.lang.String fullMethodName(ContextMethodBuilder mb)+
+
mb
- method to be named
++private java.lang.String fullMethodName(ClassItem item)+
+
item
- method to be named
++private void genUnmarshalCall(java.lang.String name, + ContextMethodBuilder mb)+
+
mb
- +private void genMarshalCall(java.lang.String name, + ContextMethodBuilder mb)+
+
mb
- +private void genUnmarshalAttributeCall(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+private void genMarshalAttributeCall(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+private void genUnmarshalContentCall(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+private void genMarshalContentCall(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
- if error in configuration+public BoundClass getBoundClass()+
IContextObj
+
getBoundClass
in interface IContextObj
+public boolean setIdChild(IComponent child)+
IContextObj
+
setIdChild
in interface IContextObj
child
- child defining the ID property
+true
if successful, false
if ID
+ already defined+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
isOptional
in class PassThroughComponent
true
if optional, false
if required+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeUnmarshal
in interface IComponent
genAttributeUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
genContentUnmarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genNewInstance
in interface IComponent
genNewInstance
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
getType
in class PassThroughComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
hasId
in class PassThroughComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
genLoadId
in interface IComponent
genLoadId
in class PassThroughComponent
mb
- method builder
+JiBXException
- if configuration error+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class PassThroughComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionLoad + org.jibx.binding.def.NestedCollection.IteratorLoad ++
static class NestedCollection.IteratorLoad
+Collection item load strategy for collection with items accessed by + iterator or enumeration. +
+ +
+
+Field Summary | +|
---|---|
+private ClassItem |
+m_iterMethod
+
++ Method used to get iterator for collection. |
+
+private java.lang.String |
+m_moreName
+
++ Fully qualified method name to test if more in iteration. |
+
+private java.lang.String |
+m_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 void |
+genLoadDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after loading items from collection. |
+
+protected void |
+genLoadInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for loading items. |
+
+protected BranchWrapper |
+genLoadItem(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 | +
---|
+private final ClassItem m_iterMethod+
+
+private final java.lang.String m_moreName+
+
+private final java.lang.String m_nextName+
+
+Constructor Detail | +
---|
+NestedCollection.IteratorLoad(ClassItem iter, + java.lang.String more, + java.lang.String next)+
+
iter
- method to get iterator or enumerator from collectionmore
- fully qualified method name to test if more in iterationnext
- fully qualified method name to get next item in iteration+Method Detail | +
---|
+protected void genLoadInit(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
+ method. The base class implementation does nothing.
++
genLoadInit
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected BranchWrapper genLoadItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
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.
++
genLoadItem
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration+protected void genLoadDone(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionLoad
NestedCollection.CollectionLoad.genLoadItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
genLoadDone
in class NestedCollection.CollectionLoad
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +IComponent + +IContainer + +IContextObj + +IMapping |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Interface Summary | +|
---|---|
IComponent | +Child component (attribute or content) interface definition. | +
IContainer | +Containing binding definitions structure interface. | +
IContextObj | +Containing object context interface. | +
IMapping | +Interface for mapping definitions. | +
+ +
+Class Summary | +|
---|---|
BaseMappingWrapper | +Component decorator for abstract base mapping from extension mapping. | +
BindingBuilder | +Binding definition constants. | +
BindingBuilder.ContainerBase | +Base class for containers. | +
BindingDefinition | +Binding definition. | +
ComponentProperty | +Property reference with binding defined by component. | +
DefinitionContext | +Nesting level for definitions in binding. | +
DirectGeneric | +Linkage to generic object with defined marshaller and/or unmarshaller. | +
DirectObject | +Linkage to object with supplied marshaller and unmarshaller. | +
DirectProperty | +Property reference with marshaller and unmarshaller. | +
ElementWrapper | +Component decorator for element definition. | +
LinkableBase | +Base class for components that can be linked from multiple locations within + the binding definition structure. | +
MappingBase | +Base class for mapping definitions. | +
MappingDefinition | +Normal mapping with defined binding. | +
MappingDirect | +Direct mapping using supplied marshaller and unmarshaller. | +
MappingReference | +Reference to a mapping definition. | +
NameDefinition | +Named value definition from binding. | +
NamespaceDefinition | +Namespace definition from binding. | +
NestedBase | +Base class for structure and collection binding definitions. | +
NestedCollection | +Collection binding definition. | +
NestedCollection.AddStore | +Collection item store strategy for collection with add method. | +
NestedCollection.ArrayLoad | +Collection item load strategy for array. | +
NestedCollection.ArrayStore | +Collection item store strategy for array. | +
NestedCollection.CollectionLoad | +Base class for collection item load strategy. | +
NestedCollection.CollectionStore | +Base class for collection item store strategy. | +
NestedCollection.IndexedLoad | +Collection item load strategy for collection with items accessed by + index number. | +
NestedCollection.IndexedStore | +Collection item store strategy for collection with items set by + index number. | +
NestedCollection.IteratorLoad | +Collection item load strategy for collection with items accessed by + iterator or enumeration. | +
NestedStructure | +Structure binding definition. | +
ObjectBinding | +Binding modifiers that apply to a class reference. | +
ObjectStringConversion | +Object string conversion handling. | +
OptionalStructureWrapper | +Component decorator for optional structure with associated property. | +
PassThroughComponent | +Default component decorator. | +
PrimitiveStringConversion | +Primitive string conversion handling. | +
PropertyDefinition | +Property definition from binding. | +
StringConversion | +String conversion handling. | +
StructureReference | +Reference to a structure definition. | +
ValueChild | +Attribute or simple content value definition from binding. | +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.LinkableBase ++
public abstract class LinkableBase
+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. +
+ +
+
+Field Summary | +|
---|---|
+private boolean |
+m_isLinked
+
++ Flag for linkage complete. |
+
+private boolean |
+m_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 void |
+handleRecursion()
+
++ Handler for recursion. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private boolean m_isLinking+
+
+private boolean m_isLinked+
+
+Constructor Detail | +
---|
+protected LinkableBase()+
PassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent)
method.
++
+public LinkableBase(IComponent wrap)+
+
wrap
- wrapped binding component+Method Detail | +
---|
+protected void handleRecursion()+
+
+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class PassThroughComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.LinkableBase + org.jibx.binding.def.MappingBase ++
public abstract class MappingBase
+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.String |
+ABSTRACTMARSHALLER_INTERFACE
+
++ |
+
+protected static java.lang.String |
+CHECKEXTENDS_METHODNAME
+
++ |
+
+protected static java.lang.String |
+CHECKEXTENDS_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+GETINDEX_METHODNAME
+
++ |
+
+protected static java.lang.String |
+GETINDEX_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+GETMARSHALLER_METHOD
+
++ |
+
+protected static java.lang.String |
+GETMARSHALLER_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+GETUNMARSHALLER_METHOD
+
++ |
+
+protected static java.lang.String |
+GETUNMARSHALLER_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+IMARSHALLABLE_INTERFACE
+
++ |
+
+protected static java.lang.String |
+IUNMARSHALLABLE_INTERFACE
+
++ |
+
+private int |
+m_indexNumber
+
++ Index number for this particular binding definition. |
+
+protected static java.lang.String |
+MARSHALLABLE_METHODNAME
+
++ |
+
+protected static java.lang.String |
+MARSHALLABLE_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+MARSHALLER_INTERFACE
+
++ |
+
+protected static java.lang.String |
+MARSHALLERMARSHAL_METHOD
+
++ |
+
+protected static java.lang.String |
+MARSHALLERMARSHAL_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLABLE_METHODNAME
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLABLE_SIGNATURE
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLER_INTERFACE
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLERUNMARSHAL_METHOD
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLERUNMARSHAL_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 void |
+addIMarshallableMethod()
+
++ Generate marshallable interface methods for this mapping. |
+
+protected void |
+addIUnmarshallableMethod()
+
++ Generate unmarshallable interface method for this mapping. |
+
+abstract BoundClass |
+getBoundClass()
+
++ Get the mapped class information. |
+
+ int |
+getIndex()
+
++ 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 | +
---|
+protected static final java.lang.String IMARSHALLABLE_INTERFACE+
+protected static final java.lang.String MARSHALLABLE_METHODNAME+
+protected static final java.lang.String MARSHALLABLE_SIGNATURE+
+protected static final java.lang.String GETINDEX_METHODNAME+
+protected static final java.lang.String GETINDEX_SIGNATURE+
+protected static final java.lang.String CHECKEXTENDS_METHODNAME+
+protected static final java.lang.String CHECKEXTENDS_SIGNATURE+
+protected static final java.lang.String IUNMARSHALLABLE_INTERFACE+
+protected static final java.lang.String UNMARSHALLABLE_METHODNAME+
+protected static final java.lang.String UNMARSHALLABLE_SIGNATURE+
+protected static final java.lang.String UNMARSHALLER_INTERFACE+
+protected static final java.lang.String UNMARSHALLERUNMARSHAL_METHOD+
+protected static final java.lang.String UNMARSHALLERUNMARSHAL_SIGNATURE+
+protected static final java.lang.String MARSHALLER_INTERFACE+
+protected static final java.lang.String ABSTRACTMARSHALLER_INTERFACE+
+protected static final java.lang.String MARSHALLERMARSHAL_METHOD+
+protected static final java.lang.String MARSHALLERMARSHAL_SIGNATURE+
+protected static final java.lang.String GETMARSHALLER_METHOD+
+protected static final java.lang.String GETMARSHALLER_SIGNATURE+
+protected static final java.lang.String GETUNMARSHALLER_METHOD+
+protected static final java.lang.String GETUNMARSHALLER_SIGNATURE+
+private final int m_indexNumber+
+
+Constructor Detail | +
---|
+public MappingBase(IContainer contain, + java.lang.String type)+
PassThroughComponent.setWrappedComponent(org.jibx.binding.def.IComponent)
method.
++
contain
- containing binding definition structuretype
- bound class name+public MappingBase(IContainer contain, + java.lang.String type, + IComponent wrap)+
+
contain
- containing binding definition structuretype
- bound class namewrap
- wrapped binding component+Method Detail | +
---|
+public abstract BoundClass getBoundClass()+
+
+protected void addIMarshallableMethod() + throws JiBXException+
+
JiBXException
- if error in generating code+protected void addIUnmarshallableMethod() + throws JiBXException+
+
JiBXException
- if error in generating code+public int getIndex()+
IMapping
+
getIndex
in interface IMapping
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.MappingReference ++
public class MappingReference
+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. +
+ +
+
+Field Summary | +|
---|---|
+private IContainer |
+m_container
+
++ Containing binding definition structure. |
+
+private IContextObj |
+m_contextObject
+
++ Context object. |
+
+private boolean |
+m_isSynthetic
+
++ Synthetic reference added to empty collection flag |
+
+private NameDefinition |
+m_name
+
++ Name from reference (only allowed with abstract mappings) |
+
+private PropertyDefinition |
+m_property
+
++ Property definition. |
+
+private java.lang.String |
+m_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.String |
+getType()
+
++ Get type expected by component. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private final IContainer m_container+
+
+private final PropertyDefinition m_property+
+
+private java.lang.String m_type+
+
+private final IContextObj m_contextObject+
+
+private final NameDefinition m_name+
+
+private final boolean m_isSynthetic+
+
+Constructor Detail | +
---|
+public MappingReference(IContainer contain, + PropertyDefinition prop, + java.lang.String type, + IContextObj objc, + NameDefinition name, + boolean synth)+
+
contain
- containing binding definition structureprop
- property definitiontype
- fully qualified name of mapped type (may also be type name
+ for abstract mapping)objc
- current object contextname
- reference name definition (only allowed with abstract
+ mappings)synth
- sythentic reference added to empty collection flag+Method Detail | +
---|
+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
getType
in class PassThroughComponent
+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class PassThroughComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.PassThroughComponent + org.jibx.binding.def.StructureReference ++
public class StructureReference
+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. +
+ +
+
+Field Summary | +|
---|---|
+private IContainer |
+m_container
+
++ Containing binding component. |
+
+private IContextObj |
+m_contextObject
+
++ Containing binding definition structure. |
+
+private java.lang.String |
+m_label
+
++ Identifier for referenced structure definition. |
+
+private boolean |
+m_needLoad
+
++ Object load needed for marshalling flag (used with object binding). |
+
+private PropertyDefinition |
+m_property
+
++ Property definition (may be null ). |
+
+private boolean |
+m_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 | +|
---|---|
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private final IContainer m_container+
+
+private final IContextObj m_contextObject+
+
+private final PropertyDefinition m_property+
null
).
++
+private final java.lang.String m_label+
+
+private boolean m_skipMarshal+
+
+private boolean m_needLoad+
+
+Constructor Detail | +
---|
+public StructureReference(IContainer contain, + java.lang.String label, + PropertyDefinition prop, + boolean hasname, + IContextObj cobj)+
+
contain
- containing binding componentlabel
- reference structure identifierprop
- property definition (may be null
)hasname
- element name used with reference flagcobj
- context object+Method Detail | +
---|
+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genAttributeMarshal
in interface IComponent
genAttributeMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
genContentMarshal
in class PassThroughComponent
mb
- method builder
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
setLinkages
in interface IComponent
setLinkages
in class PassThroughComponent
JiBXException
- if error in configuration+public void print(int depth)+
print
in interface IComponent
print
in class PassThroughComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.DirectGeneric ++
public class DirectGeneric
+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. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+ISEND_METHOD
+
++ |
+
+private static java.lang.String |
+ISEND_SIGNATURE
+
++ |
+
+private PropertyDefinition |
+m_property
+
++ Optional property definition. |
+
+private java.lang.String |
+m_type
+
++ Type handled by this binding. |
+
+private static java.lang.String |
+MARSHALLABLE_INTERFACE
+
++ |
+
+private static java.lang.String |
+MARSHALLABLE_METHOD
+
++ |
+
+private static java.lang.String |
+MARSHALLABLE_SIGNATURE
+
++ |
+
+private static java.lang.String |
+UNMARSHALELEMENT_METHOD
+
++ |
+
+private static java.lang.String |
+UNMARSHALELEMENT_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 | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for content present. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ void |
+genMarshal(ContextMethodBuilder mb)
+
++ Generate marshalling code for this mapping. |
+
+ void |
+genNewInstance(ContextMethodBuilder mb)
+
++ Generate code to create new instance of object. |
+
+ void |
+genTestPresent(ContextMethodBuilder mb)
+
++ Generate presence test code for this mapping. |
+
+ void |
+genUnmarshal(ContextMethodBuilder mb)
+
++ Generate unmarshalling code for this mapping. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ boolean |
+isOptional()
+
++ Check if component is an optional item. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private static final java.lang.String ISEND_METHOD+
+private static final java.lang.String ISEND_SIGNATURE+
+private static final java.lang.String UNMARSHALELEMENT_METHOD+
+private static final java.lang.String UNMARSHALELEMENT_SIGNATURE+
+private static final java.lang.String MARSHALLABLE_INTERFACE+
+private static final java.lang.String MARSHALLABLE_METHOD+
+private static final java.lang.String MARSHALLABLE_SIGNATURE+
+private final java.lang.String m_type+
+
+private final PropertyDefinition m_property+
+
+Constructor Detail | +
---|
+public DirectGeneric(IContainer parent, + java.lang.String type)+
+
parent
- containing binding definition structuretype
- fully qualified class name of object type handled by this
+ binding (null
if unspecified)+public DirectGeneric(IContainer parent, + java.lang.String type, + PropertyDefinition prop)+
+
parent
- containing binding definition structuretype
- fully qualified class name of object type handled by this
+ binding (null
if unspecified)prop
- associated property information+Method Detail | +
---|
+public void genTestPresent(ContextMethodBuilder mb)+
+
mb
- method builder+public void genUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
+public void genMarshal(ContextMethodBuilder mb) + throws JiBXException+
+
mb
- method builder
+JiBXException
+public boolean isOptional()+
IComponent
+
isOptional
in interface IComponent
true
if optional, false
if required+public boolean hasAttribute()+
IComponent
+
hasAttribute
in interface IComponent
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb)+
IComponent
+
genAttrPresentTest
in interface IComponent
mb
- method builder+public void genAttributeUnmarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeUnmarshal
in interface IComponent
mb
- method builder+public void genAttributeMarshal(ContextMethodBuilder mb)+
IComponent
+
genAttributeMarshal
in interface IComponent
mb
- method builder+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
true
if one or more content values defined
+ for containing element, false
if not+public void genContentPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentPresentTest
in interface IComponent
mb
- method builder
+JiBXException
- if configuration error+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentUnmarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
genContentMarshal
in interface IComponent
mb
- method builder
+JiBXException
- if error in configuration+public void genNewInstance(ContextMethodBuilder mb)+
IComponent
+
genNewInstance
in interface IComponent
mb
- method builder+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
+public boolean hasId()+
IComponent
+
hasId
in interface IComponent
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb)+
IComponent
String
).
++
genLoadId
in interface IComponent
mb
- method builder+public boolean checkContentSequence(boolean text)+
IComponent
+
checkContentSequence
in interface IComponent
text
- allow text value flag from last component
++public void setLinkages()+
IComponent
+
setLinkages
in interface IComponent
+public void print(int depth)+
print
in interface IComponent
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionStore + org.jibx.binding.def.NestedCollection.AddStore ++
static class NestedCollection.AddStore
+Collection item store strategy for collection with add method. +
+ +
+
+Field Summary | +|
---|---|
+private ClassItem |
+m_addMethod
+
++ Method used to add item to collection. |
+
+private boolean |
+m_isReturned
+
++ Flag for method returns result. |
+
+Constructor Summary | +|
---|---|
NestedCollection.AddStore(ClassItem add,
+ boolean ret)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected void |
+genStoreItem(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 | +
---|
+private final ClassItem m_addMethod+
+
+private final boolean m_isReturned+
+
+Constructor Detail | +
---|
+NestedCollection.AddStore(ClassItem add, + boolean ret)+
+
add
- method used to add item to collectionret
- value returned by add flag+Method Detail | +
---|
+protected void genStoreItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
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.
++
genStoreItem
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionStore ++
abstract static class NestedCollection.CollectionStore
+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 void |
+genStoreDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after storing items to collection. |
+
+protected void |
+genStoreInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for storing items. |
+
+protected abstract void |
+genStoreItem(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()+
+Method Detail | +
---|
+protected void genStoreInit(ContextMethodBuilder mb) + throws JiBXException+
genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
method.
+ The base class implementation does nothing.
++
mb
- method builder
+JiBXException
- if error in configuration+protected abstract void genStoreItem(ContextMethodBuilder mb) + throws JiBXException+
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.
++
mb
- method builder
+JiBXException
- if error in configuration+protected void genStoreDone(ContextMethodBuilder mb) + throws JiBXException+
genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IContextObj
+Containing object context interface. This interface is implemented by binding + definition components that link to objects and can contain nested components. +
+ +
+
+Method Summary | +|
---|---|
+ BoundClass |
+getBoundClass()
+
++ Get class linked to binding element. |
+
+ boolean |
+setIdChild(IComponent child)
+
++ Set ID property. |
+
+Method Detail | +
---|
+BoundClass getBoundClass()+
+
+boolean setIdChild(IComponent child)+
+
child
- child defining the ID property
+true
if successful, false
if ID
+ already defined
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionStore + org.jibx.binding.def.NestedCollection.ArrayStore ++
static class NestedCollection.ArrayStore
+Collection item store strategy for array. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String |
+m_itemType
+
++ Array item type. |
+
+Constructor Summary | +|
---|---|
NestedCollection.ArrayStore(java.lang.String itype)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected void |
+genStoreDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after storing items to collection. |
+
+protected void |
+genStoreInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for storing items. |
+
+protected void |
+genStoreItem(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 | +
---|
+private final java.lang.String m_itemType+
+
+Constructor Detail | +
---|
+NestedCollection.ArrayStore(java.lang.String itype)+
+
itype
- array item type+Method Detail | +
---|
+protected void genStoreInit(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
method.
+ The base class implementation does nothing.
++
genStoreInit
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration+protected void genStoreItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
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.
++
genStoreItem
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration+protected void genStoreDone(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
genStoreDone
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.BindingBuilder.ContainerBase + org.jibx.binding.def.NestedBase + org.jibx.binding.def.NestedStructure ++
public class NestedStructure
+Structure binding definition. This handles one or more child components, + which may be ordered or unordered. +
+ +
+
+Field Summary | +|
---|---|
+private boolean |
+m_hasObject
+
++ Flag for structure has associated object. |
+
+private IComponent |
+m_idChild
+
++ Child supplying ID for bound class. |
+
+protected boolean |
+m_isChoice
+
++ Flag for choice of child content (used by subclasses). |
+
+private boolean |
+m_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 | +|
---|---|
+ boolean |
+checkContentSequence(boolean text)
+
++ Check sequence of content values. |
+
+ void |
+genAttributeMarshal(ContextMethodBuilder mb)
+
++ Generate attribute marshalling code. |
+
+ void |
+genAttributeUnmarshal(ContextMethodBuilder mb)
+
++ Generate attribute unmarshalling code. |
+
+ void |
+genAttrPresentTest(ContextMethodBuilder mb)
+
++ Generate code to test for attribute present. |
+
+ void |
+genContentMarshal(ContextMethodBuilder mb)
+
++ Generate element or text marshalling code. |
+
+ void |
+genContentUnmarshal(ContextMethodBuilder mb)
+
++ Generate element or text unmarshalling code. |
+
+ void |
+genLoadId(ContextMethodBuilder mb)
+
++ Generate code to load ID value of instance to stack. |
+
+ java.lang.String |
+getType()
+
++ Get type expected by component. |
+
+ boolean |
+hasAttribute()
+
++ Check if component defines one or more attribute values of the + containing element. |
+
+ boolean |
+hasContent()
+
++ Check if component defines one or more elements or text values as + children of the containing element. |
+
+ boolean |
+hasId()
+
++ Check if component defines an ID value for instances of context object. |
+
+ void |
+print(int depth)
+
++ |
+
+ void |
+setLinkages()
+
++ 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 | +
---|
+private IComponent m_idChild+
+
+protected final boolean m_isChoice+
+
+private final boolean m_hasObject+
+
+private boolean m_isLinked+
+
+Constructor Detail | +
---|
+public NestedStructure(IContainer parent, + IContextObj objc, + boolean ord, + boolean choice, + boolean ctx, + boolean hasobj)+
+
parent
- containing binding definition contextobjc
- current object contextord
- ordered content flagchoice
- choice content flagctx
- define context for structure flag+Method Detail | +
---|
+public boolean hasAttribute()+
IComponent
+
true
if one or more attribute values defined for
+ containing element, false
if not+public void genAttrPresentTest(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if configuration error+public void genAttributeUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public void genAttributeMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public boolean hasContent()+
IComponent
IComponent.setLinkages()
.
++
hasContent
in interface IComponent
hasContent
in class NestedBase
true
if one or more content values defined
+ for containing element, false
if not+public void genContentUnmarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public void genContentMarshal(ContextMethodBuilder mb) + throws JiBXException+
IComponent
+
mb
- method builder
+JiBXException
- if error in configuration+public java.lang.String getType()+
IComponent
+
getType
in interface IComponent
getType
in class NestedBase
+public boolean hasId()+
IComponent
+
true
if ID value defined for instances,
+ false
if not+public void genLoadId(ContextMethodBuilder mb) + throws JiBXException+
IComponent
String
).
++
mb
- method builder
+JiBXException
- if configuration error+public boolean checkContentSequence(boolean text) + throws JiBXException+
IComponent
+
text
- allow text value flag from last component
+JiBXException
- if error in configuration+public void setLinkages() + throws JiBXException+
IComponent
+
JiBXException
- if error in configuration+public void print(int depth)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.def.NestedCollection.CollectionStore + org.jibx.binding.def.NestedCollection.IndexedStore ++
static class NestedCollection.IndexedStore
+Collection item store strategy for collection with items set by + index number. +
+ +
+
+Field Summary | +|
---|---|
+private boolean |
+m_isReturned
+
++ Flag for method returns result. |
+
+private ClassItem |
+m_setMethod
+
++ Method used to set items by index in collection. |
+
+Constructor Summary | +|
---|---|
NestedCollection.IndexedStore(ClassItem set,
+ boolean ret)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+protected void |
+genStoreDone(ContextMethodBuilder mb)
+
++ Generate code to clean up after storing items to collection. |
+
+protected void |
+genStoreInit(ContextMethodBuilder mb)
+
++ Generate code to initialize collection for storing items. |
+
+protected void |
+genStoreItem(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 | +
---|
+private final ClassItem m_setMethod+
+
+private final boolean m_isReturned+
+
+Constructor Detail | +
---|
+NestedCollection.IndexedStore(ClassItem set, + boolean ret)+
+
set
- method used to store items by index in collectionret
- value returned by add flag+Method Detail | +
---|
+protected void genStoreInit(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
method.
+ The base class implementation does nothing.
++
genStoreInit
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration+protected void genStoreItem(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
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.
++
genStoreItem
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration+protected void genStoreDone(ContextMethodBuilder mb) + throws JiBXException+
NestedCollection.CollectionStore
NestedCollection.CollectionStore.genStoreItem(org.jibx.binding.classes.ContextMethodBuilder)
. The base class
+ implementation does nothing.
++
genStoreDone
in class NestedCollection.CollectionStore
mb
- method builder
+JiBXException
- if error in configuration
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod ++
public abstract class BindingMethod
+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. +
+ +
+
+Field Summary | +|
---|---|
+private ClassFile |
+m_classFile
+
++ Owning class file information. |
+
+Constructor Summary | +|
---|---|
+protected |
+BindingMethod(ClassFile cf)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+static int |
+computeMethodHash(org.apache.bcel.classfile.Method method)
+
++ Computes the hash code for a method. |
+
+ boolean |
+equals(java.lang.Object obj)
+
++ Check if objects are equal. |
+
+abstract int |
+getAccessFlags()
+
++ Get access flags. |
+
+ ClassFile |
+getClassFile()
+
++ Get class file containing method. |
+
+abstract ClassItem |
+getItem()
+
++ Get the method item. |
+
+abstract org.apache.bcel.classfile.Method |
+getMethod()
+
++ Get the actual method. |
+
+abstract java.lang.String |
+getName()
+
++ Get name of method. |
+
+abstract java.lang.String |
+getSignature()
+
++ Get signature. |
+
+abstract int |
+hashCode()
+
++ Get hash code. |
+
+ void |
+makeAccessible(ClassFile src)
+
++ Make accessible method. |
+
+abstract void |
+setAccessFlags(int flags)
+
++ Set access flags. |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+private ClassFile m_classFile+
+
+Constructor Detail | +
---|
+protected BindingMethod(ClassFile cf)+
+
cf
- owning class file information+Method Detail | +
---|
+public ClassFile getClassFile()+
+
+public abstract java.lang.String getName()+
+
+public abstract java.lang.String getSignature()+
+
+public abstract int getAccessFlags()+
+
+public abstract void setAccessFlags(int flags)+
+
flags
- access type to be set+public abstract org.apache.bcel.classfile.Method getMethod()+
+
+public abstract ClassItem getItem()+
+
+public void makeAccessible(ClassFile src)+
+
src
- class file for required access+public static int computeMethodHash(org.apache.bcel.classfile.Method method)+
+
+public abstract int hashCode()+
+
hashCode
in class java.lang.Object
+public boolean equals(java.lang.Object obj)+
+
equals
in class java.lang.Object
true
if equal objects, false
if not
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.ClassCache ++
public class ClassCache
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.util.HashMap |
+m_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 ClassCache |
+s_instance
+
++ Singleton instance of class (created when paths set) |
+
+Constructor Summary | +|
---|---|
+private |
+ClassCache(java.lang.String[] paths)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+(package private) static void |
+addClassFile(ClassFile cf)
+
++ Add created class information to cache. |
+
+static ClassFile |
+getClassFile(java.lang.String name)
+
++ Get class information. |
+
+private ClassFile |
+getClassFileImpl(java.lang.String name)
+
++ Get class information. |
+
+static void |
+setPaths(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 | +
---|
+private static ClassCache s_instance+
+
+private java.lang.String[] m_paths+
+
+private java.io.File[] m_roots+
+
+private java.util.HashMap m_classMap+
+
+Constructor Detail | +
---|
+private ClassCache(java.lang.String[] paths)+
+
paths
- ordered set of paths to be searched for class files+Method Detail | +
---|
+private ClassFile getClassFileImpl(java.lang.String name) + throws JiBXException+
+
name
- fully-qualified name of class to be found
+null
if class not found
+JiBXException
- on any error accessing class file+public static ClassFile getClassFile(java.lang.String name) + throws JiBXException+
+
name
- fully-qualified name of class to be found
+null
if class not found
+JiBXException
- on any error accessing class file+static void addClassFile(ClassFile cf)+
+
cf
- information for class to be added+public static void setPaths(java.lang.String[] paths)+
+
paths
- ordered set of paths to be searched for class files
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BoundClass ++
public class BoundClass
+Bound class handler. Each instance controls and organizes information for a + class included in one or more binding definitions. +
+ +
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+ACCESS_PREFIX
+
++ Prefix used for access methods. |
+
+private static org.apache.bcel.generic.Type[] |
+EMPTY_TYPE_ARGS
+
++ Empty argument type array. |
+
+private static java.lang.String |
+GENERIC_MUNGE_CLASS
+
++ Class used for code munging when no specific class available. |
+
+private ClassFile |
+m_boundClass
+
++ Bound class file information. |
+
+private java.util.HashMap |
+m_loadMap
+
++ Map from field or method to load access method (lazy create, + null if not used). |
+
+private MungedClass |
+m_mungedClass
+
++ Class receiving code generated for target class. |
+
+private java.util.HashMap |
+m_storeMap
+
++ Map from field or method to store access method (lazy create, + null if not used). |
+
+private static MungedClass |
+s_genericMunge
+
++ Class used for code generation proxy with unmodifiable classes. |
+
+private static java.lang.String |
+s_modifyPackage
+
++ Package of first modifiable class. |
+
+private static java.io.File |
+s_modifyRoot
+
++ Root for package of first modifiable class. |
+
+private static java.util.HashMap |
+s_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 | +|
---|---|
+ void |
+addFactory(java.lang.String fact)
+
++ Add binding factory to class. |
+
+private static BoundClass |
+createInstance(java.lang.String key,
+ ClassFile bound,
+ MungedClass munge)
+
++ Create binding information for class. |
+
+ java.lang.String |
+deriveClassName(java.lang.String prefix,
+ java.lang.String suffix)
+
++ Derive generated class name for bound class. |
+
+private static BoundClass |
+findOrCreateInstance(ClassFile bound,
+ MungedClass munge)
+
++ Find or create binding information for class. |
+
+ ClassFile |
+getClassFile()
+
++ Get bound class file information. |
+
+ java.lang.String |
+getClassName()
+
++ Get bound class file name. |
+
+static BoundClass |
+getInstance(ClassFile cf,
+ BoundClass context)
+
++ Get binding information for class. |
+
+static BoundClass |
+getInstance(java.lang.String name,
+ BoundClass context)
+
++ Get binding information for class. |
+
+ ClassItem |
+getLoadMethod(ClassItem item,
+ ClassFile from)
+
++ Get load access method for member of this class. |
+
+ ClassFile |
+getMungedFile()
+
++ Get munged class file information. |
+
+ ClassItem |
+getStoreMethod(ClassItem item,
+ ClassFile from)
+
++ Get store access method for member of this class. |
+
+ BindingMethod |
+getUniqueMethod(MethodBuilder builder)
+
++ Get unique method. |
+
+ BindingMethod |
+getUniqueNamed(MethodBuilder builder)
+
++ Get unique method. |
+
+ boolean |
+isDirectAccess()
+
++ Check if class being changed directly. |
+
+static void |
+reset()
+
++ Discard cached information and reset in preparation for a new binding + run. |
+
+ void |
+setFactoryList()
+
++ Generate factory list. |
+
+static void |
+setModify(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 | +
---|
+private static final java.lang.String GENERIC_MUNGE_CLASS+
+
+private static final java.lang.String ACCESS_PREFIX+
+
+private static final org.apache.bcel.generic.Type[] EMPTY_TYPE_ARGS+
+
+private static java.util.HashMap s_nameMap+
+
+private static java.lang.String s_modifyPackage+
+
+private static java.io.File s_modifyRoot+
+
+private static MungedClass s_genericMunge+
+
+private final ClassFile m_boundClass+
+
+private final MungedClass m_mungedClass+
+
+private java.util.HashMap m_loadMap+
null
if not used).
++
+private java.util.HashMap m_storeMap+
null
if not used).
++
+Constructor Detail | +
---|
+private BoundClass(ClassFile bound, + MungedClass munge)+
+
bound
- target class file informationmunge
- class file for class hosting generated code+Method Detail | +
---|
+public ClassFile getClassFile()+
+
+public java.lang.String getClassName()+
+
+public ClassFile getMungedFile()+
+
+public boolean isDirectAccess()+
+
true
if bound class is being modified,
+ false
if using a surrogate+public ClassItem getLoadMethod(ClassItem item, + ClassFile from) + throws JiBXException+
+
item
- field or method to be accessedfrom
- context class from which access is required
+JiBXException
- on configuration error+public ClassItem getStoreMethod(ClassItem item, + ClassFile from) + throws JiBXException+
+
item
- field or method to be accessedfrom
- context class from which access is required
+JiBXException
- on configuration error+public BindingMethod getUniqueMethod(MethodBuilder builder) + throws JiBXException+
+
builder
- method to be defined
+JiBXException
- on configuration error+public BindingMethod getUniqueNamed(MethodBuilder builder) + throws JiBXException+
+
builder
- method to be defined
+JiBXException
- on configuration error+public void addFactory(java.lang.String fact)+
+
fact
- binding factory name+public void setFactoryList() + throws JiBXException+
+
JiBXException
- on configuration error+private static BoundClass createInstance(java.lang.String key, + ClassFile bound, + MungedClass munge)+
+
key
- text identifier for this bound class and munged class
+ combinationbound
- class information for bound classmunge
- information for surrogate class receiving generated code, or
+ null
if no separate class
++private static BoundClass findOrCreateInstance(ClassFile bound, + MungedClass munge)+
+
bound
- class information for bound classmunge
- information for surrogate class receiving generated code
++public static BoundClass getInstance(ClassFile cf, + BoundClass context) + throws JiBXException+
+
cf
- bound class informationcontext
- context class for code generation, or null
+ if no context
+JiBXException
- on configuration error+public static BoundClass getInstance(java.lang.String name, + BoundClass context) + throws JiBXException+
+
name
- fully qualified name of bound classcontext
- context class for code generation, or null
+ if no context
+JiBXException
- on configuration error+public static void reset()+
+
+public static void setModify(java.io.File root, + java.lang.String pkg)+
+
+public java.lang.String deriveClassName(java.lang.String prefix, + java.lang.String suffix)+
+
prefix
- generated class name prefixsuffix
- generated class name suffix
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder + org.jibx.binding.classes.ExceptionMethodBuilder + org.jibx.binding.classes.ContextMethodBuilder + org.jibx.binding.classes.MarshalUnmarshalBuilder + org.jibx.binding.classes.MarshalBuilder ++
public class MarshalBuilder
+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. +
+ +
+
+Field Summary | +|
---|---|
+protected static java.lang.String |
+MARSHAL_EXCEPTION_TEXT
+
++ |
+
+protected static org.apache.bcel.generic.Type[] |
+MARSHAL_METHOD_ARGS
+
++ |
+
+private static java.lang.String |
+MARSHALCONTEXT_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.InstructionHandle |
+genExceptionHandler()
+
++ 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.BindingMethod | +
---|
computeMethodHash, equals, getClassFile, makeAccessible |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+private static final java.lang.String MARSHALCONTEXT_CLASS+
+protected static final java.lang.String MARSHAL_EXCEPTION_TEXT+
+protected static final org.apache.bcel.generic.Type[] MARSHAL_METHOD_ARGS+
+Constructor Detail | +
---|
+public MarshalBuilder(java.lang.String name, + ClassFile cf, + ClassFile mf) + throws JiBXException+
+
name
- method name to be builtcf
- owning class file informationmf
- method generation class file information
+JiBXException
- on error in initializing method construction+Method Detail | +
---|
+public org.apache.bcel.generic.InstructionHandle genExceptionHandler() + throws JiBXException+
+
genExceptionHandler
in class MarshalUnmarshalBuilder
JiBXException
- on error in creating exception handler
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.MungedClass ++
public class MungedClass
+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. +
+ +
+
+Nested Class Summary | +|
---|---|
+private static class |
+MungedClass.JiBXFilter
+
++ Filter for class files generated by JiBX. |
+
+Field Summary | +|
---|---|
+private static java.lang.String |
+BINDING_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 ClassFile |
+m_classFile
+
++ Munged class file information. |
+
+private ExistingMethod[] |
+m_existingMethods
+
++ Existing binding methods in class. |
+
+private java.lang.String |
+m_factoryList
+
++ List of factory names for this class. |
+
+private java.util.HashMap |
+m_methodMap
+
++ Map from method byte code and signature to method item. |
+
+private static java.util.ArrayList |
+s_classes
+
++ Munged class information. |
+
+private static java.util.HashMap |
+s_classMap
+
++ Map from generated class to binding information. |
+
+private static java.util.HashMap |
+s_directories
+
++ Map of directories already checked for JiBX classes. |
+
+private static java.util.HashMap |
+s_nameMap
+
++ Map from class name to binding information. |
+
+private static java.util.ArrayList |
+s_pendingClasses
+
++ Munged classes to be unique-added at end of binding. |
+
+Constructor Summary | +|
---|---|
+private |
+MungedClass(ClassFile cf)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+(package private) void |
+addFactory(java.lang.String fact)
+
++ Add binding factory to class. |
+
+(package private) static void |
+checkDirectory(java.io.File root,
+ java.lang.String pack)
+
++ Check directory for JiBX generated files. |
+
+static void |
+delayedAddUnique(ClassFile cf)
+
++ Add unique support class at end of binding process. |
+
+static ClassFile[][] |
+fixChanges(boolean write)
+
++ Finalize changes to modified class files. |
+
+(package private) ClassFile |
+getClassFile()
+
++ Get munged class file information. |
+
+(package private) static MungedClass |
+getInstance(ClassFile cf)
+
++ Get modification tracking information for class. |
+
+(package private) BindingMethod |
+getUniqueMethod(MethodBuilder builder,
+ boolean suffix)
+
++ Get unique method. |
+
+static ClassFile |
+getUniqueSupportClass(ClassFile cf)
+
++ Get unique generated support class. |
+
+private void |
+purgeUnusedMethods()
+
++ Delete pre-existing binding methods that are no longer needed. |
+
+static void |
+reset()
+
++ Discard cached information and reset in preparation for a new binding + run. |
+
+(package private) void |
+setFactoryList()
+
++ Generate factory list. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+private static final ClassFile[] EMPTY_CLASSFILE_ARRAY+
+
+private static final java.lang.String BINDING_LISTNAME+
+
+private static final java.lang.String[] EXTRA_METHODS_MATCHES+
+
+private static java.util.ArrayList s_classes+
+
+private static java.util.HashMap s_classMap+
+
+private static java.util.HashMap s_directories+
+
+private static java.util.HashMap s_nameMap+
+
+private static java.util.ArrayList s_pendingClasses+
+
+private ClassFile m_classFile+
+
+private java.util.HashMap m_methodMap+
+
+private ExistingMethod[] m_existingMethods+
+
+private java.lang.String m_factoryList+
+
+Constructor Detail | +
---|
+private MungedClass(ClassFile cf)+
+
cf
- owning class file information+Method Detail | +
---|
+ClassFile getClassFile()+
+
+private void purgeUnusedMethods() + throws JiBXException+
+
JiBXException
- on configuration error+BindingMethod getUniqueMethod(MethodBuilder builder, + boolean suffix) + throws JiBXException+
+
builder
- method to be definedsuffix
- append name suffix to assure uniqueness flag
+JiBXException
- on configuration error+public static ClassFile getUniqueSupportClass(ClassFile cf)+
+
cf
- generated class file
++static void checkDirectory(java.io.File root, + java.lang.String pack) + throws JiBXException+
+
root
- class path root for directorypack
- package relative to root directory
+JiBXException
- on configuration error+void addFactory(java.lang.String fact)+
+
fact
- binding factory name+void setFactoryList() + throws JiBXException+
+
JiBXException
- on configuration error+static MungedClass getInstance(ClassFile cf) + throws JiBXException+
+
cf
- information for class to be modified (must be writable)
+JiBXException
- on configuration error+public static void delayedAddUnique(ClassFile cf)+
fixChanges(boolean)
handling.
++
cf
- class file to be added as unique support class at end of
+ binding+public static ClassFile[][] fixChanges(boolean write) + throws JiBXException+
+
write
- replace original class files with modified versions
+JiBXException
- on write error+public static void reset()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder + org.jibx.binding.classes.ExceptionMethodBuilder + org.jibx.binding.classes.ContextMethodBuilder + org.jibx.binding.classes.MarshalUnmarshalBuilder + org.jibx.binding.classes.UnmarshalBuilder ++
public class UnmarshalBuilder
+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. +
+ +
+
+Field Summary | +|
---|---|
+protected static org.apache.bcel.generic.Type[] |
+SINGLE_STRING_ARGS
+
++ |
+
+protected static java.lang.String |
+UNMARSHAL_EXCEPTION_TEXT
+
++ |
+
+protected static org.apache.bcel.generic.Type[] |
+UNMARSHAL_METHOD_ARGS
+
++ |
+
+private static java.lang.String |
+UNMARSHALCONTEXT_CLASS
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLING_POSITION_METHOD
+
++ |
+
+protected static java.lang.String |
+UNMARSHALLING_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.InstructionHandle |
+genExceptionHandler()
+
++ 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.BindingMethod | +
---|
computeMethodHash, equals, getClassFile, makeAccessible |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+private static final java.lang.String UNMARSHALCONTEXT_CLASS+
+protected static final java.lang.String UNMARSHAL_EXCEPTION_TEXT+
+protected static final java.lang.String UNMARSHALLING_POSITION_METHOD+
+protected static final java.lang.String UNMARSHALLING_POSITION_SIGNATURE+
+protected static final org.apache.bcel.generic.Type[] UNMARSHAL_METHOD_ARGS+
+protected static final org.apache.bcel.generic.Type[] SINGLE_STRING_ARGS+
+Constructor Detail | +
---|
+public UnmarshalBuilder(java.lang.String name, + ClassFile cf, + ClassFile mf) + throws JiBXException+
+
name
- method name to be builtcf
- unmarshal class file informationmf
- method generation class file information
+JiBXException
- on error in initializing method construction+Method Detail | +
---|
+public org.apache.bcel.generic.InstructionHandle genExceptionHandler() + throws JiBXException+
+
genExceptionHandler
in class MarshalUnmarshalBuilder
JiBXException
- on error in creating exception handler
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.MungedClass.JiBXFilter ++
private static class MungedClass.JiBXFilter
+Filter for class files generated by JiBX. +
+ +
+
+Constructor Summary | +|
---|---|
+private |
+MungedClass.JiBXFilter()
+
++ |
+
+Method Summary | +|
---|---|
+ boolean |
+accept(java.io.File file)
+
++ |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+private MungedClass.JiBXFilter()+
+Method Detail | +
---|
+public boolean accept(java.io.File file)+
accept
in interface java.io.FileFilter
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder + org.jibx.binding.classes.ExceptionMethodBuilder + org.jibx.binding.classes.ContextMethodBuilder + org.jibx.binding.classes.MarshalUnmarshalBuilder ++
public abstract class MarshalUnmarshalBuilder
+Builder for marshal and unmarshal methods. Adds exception accumulation with + actual handling provided by the subclass. +
+ +
+
+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.InstructionHandle |
+genExceptionHandler()
+
++ Add exception handler code. |
+
+protected void |
+handleExceptions()
+
++ 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.BindingMethod | +
---|
computeMethodHash, equals, getClassFile, makeAccessible |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
+
+Constructor Detail | +
---|
+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+
+
name
- method name to be builtret
- method return typeargs
- types of argumentsmf
- method generation class file informationaccess
- flags for method accessobj
- variable slot for current objecttype
- marshalled or unmarshalled class namectx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in method
+JiBXException
- on error in initializing method construction+Method Detail | +
---|
+public abstract org.apache.bcel.generic.InstructionHandle genExceptionHandler() + throws JiBXException+
+
JiBXException
- on error in creating exception handler+protected void handleExceptions() + throws JiBXException+
genExceptionHandler()
method to build the
+ handler body.
++
handleExceptions
in class ExceptionMethodBuilder
JiBXException
- on error in exception handling
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BranchWrapper ++
public class BranchWrapper
+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. +
+ +
+
+Field Summary | +|
---|---|
+private org.apache.bcel.generic.BranchHandle |
+m_branchHandle
+
++ Actual wrapped instruction handle. |
+
+private java.lang.Object |
+m_sourceObject
+
++ Object that generated branch. |
+
+private java.lang.Throwable |
+m_sourceTrace
+
++ Code generation backtrace for source of branch. |
+
+private java.lang.String[] |
+m_stackTypes
+
++ Stack state for branch origin. |
+
+private static boolean |
+s_errorOverride
+
++ Continue on after code generation error flag. |
+
+private static boolean |
+s_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.String |
+buildReport(java.lang.String text,
+ java.lang.String[] types,
+ MethodBuilder mb)
+
++ Report branch target error. |
+
+private java.lang.String |
+describeStack(java.lang.String[] types)
+
++ Generate description of stack state. |
+
+(package private) java.lang.String[] |
+getStackState()
+
++ Get branch origin stack state information. |
+
+static void |
+setErrorOverride(boolean over)
+
++ Set target setting error override state. |
+
+ void |
+setTarget(BranchTarget target,
+ MethodBuilder mb)
+
++ Set target instruction for branch. |
+
+(package private) void |
+setTarget(org.apache.bcel.generic.InstructionHandle hand,
+ java.lang.String[] types,
+ MethodBuilder mb)
+
++ Set target instruction for branch. |
+
+static void |
+setTracking(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 | +
---|
+private static boolean s_trackSource+
+
+private static boolean s_errorOverride+
+
+private final org.apache.bcel.generic.BranchHandle m_branchHandle+
+
+private final java.lang.String[] m_stackTypes+
+
+private final java.lang.Object m_sourceObject+
+
+private final java.lang.Throwable m_sourceTrace+
+
+Constructor Detail | +
---|
+BranchWrapper(org.apache.bcel.generic.BranchHandle hand, + java.lang.String[] types, + java.lang.Object src)+
+
hand
- branch handletypes
- array of types of values on stacksrc
- object responsible for generating branch+Method Detail | +
---|
+java.lang.String[] getStackState()+
+
+private java.lang.String describeStack(java.lang.String[] types)+
+
types
- array of types on stack
++private java.lang.String buildReport(java.lang.String text, + java.lang.String[] types, + MethodBuilder mb)+
+
text
- basic error message texttypes
- stack state descriptionmb
- method builder using this code
++void setTarget(org.apache.bcel.generic.InstructionHandle hand, + java.lang.String[] types, + MethodBuilder mb)+
+
hand
- target branch instruction handletypes
- stack state descriptionmb
- method builder using this code+public void setTarget(BranchTarget target, + MethodBuilder mb)+
+
target
- branch target wrappermb
- method builder using this code+public static void setTracking(boolean track)+
+
track
- true
to enable branch code generation tracking,
+ false
to disable it+public static void setErrorOverride(boolean over)+
+
over
- true
to override exception on target error,
+ false
to allow it
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder + org.jibx.binding.classes.ExceptionMethodBuilder ++
public class ExceptionMethodBuilder
+Builder for simple methods that may just pass checked exceptions on to + caller. +
+ +
+
+Field Summary | +|
---|---|
+private java.util.HashMap |
+m_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 | +|
---|---|
+ void |
+defineSlot(java.lang.Object obj,
+ org.apache.bcel.generic.Type type)
+
++ Define local variable slot for object. |
+
+ void |
+freeSlot(java.lang.Object obj)
+
++ Free local variable slot for object. |
+
+ int |
+getSlot(java.lang.Object obj)
+
++ Check if local variable slot defined for object. |
+
+protected void |
+handleExceptions()
+
++ Process accumulated exceptions. |
+
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 | +
---|
+private java.util.HashMap m_slotMap+
+
+Constructor Detail | +
---|
+public ExceptionMethodBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile cf, + int access) + throws JiBXException+
+
name
- method name to be builtret
- method return typeargs
- types of argumentscf
- owning class file informationaccess
- flags for method access
+JiBXException
- on error in initializing method construction+public ExceptionMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf, + int access) + throws JiBXException+
+
name
- method name to be builtsig
- method signaturecf
- owning class file informationaccess
- flags for method access
+JiBXException
- on error in initializing method construction+public ExceptionMethodBuilder(java.lang.String name, + java.lang.String sig, + ClassFile cf) + throws JiBXException+
+
name
- method name to be builtsig
- method signaturecf
- owning class file information
+JiBXException
- on error in initializing method construction+Method Detail | +
---|
+public void defineSlot(java.lang.Object obj, + org.apache.bcel.generic.Type type)+
+
obj
- owning object of slot+public int getSlot(java.lang.Object obj)+
+
obj
- owning object of slot
+-1
if
+ none+public void freeSlot(java.lang.Object obj)+
+
obj
- owning object of slot+protected void handleExceptions() + throws JiBXException+
+
handleExceptions
in class MethodBuilder
JiBXException
- on error in exception handling
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder ++
public abstract class MethodBuilder
+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. +
+ +
+
+Field Summary | +|
---|---|
+protected static java.lang.String[] |
+EMPTY_STRING_ARRAY
+
++ Zero-length string array. |
+
+static java.lang.String |
+EXCEPTION_CONSTRUCTOR_SIGNATURE1
+
++ |
+
+static java.lang.String |
+EXCEPTION_CONSTRUCTOR_SIGNATURE2
+
++ |
+
+static java.lang.String |
+FRAMEWORK_EXCEPTION_CLASS
+
++ |
+
+protected java.util.ArrayList |
+m_exceptions
+
++ Exceptions needing to be handled in method (lazy create, + null if not used). |
+
+protected org.apache.bcel.generic.MethodGen |
+m_generator
+
++ Generator for constructing method. |
+
+protected int |
+m_hashCode
+
++ Accumulated hash code from adding instructions. |
+
+protected InstructionBuilder |
+m_instructionBuilder
+
++ Builder for class instructions. |
+
+private org.apache.bcel.generic.InstructionList |
+m_instructionList
+
++ List of instructions in method definition. |
+
+protected ClassItem |
+m_item
+
++ Method class item information. |
+
+private java.util.ArrayList |
+m_localTypes
+
++ Value types associated with local variable slots. |
+
+protected org.apache.bcel.classfile.Method |
+m_method
+
++ Actual generated method information. |
+
+private org.jibx.binding.util.StringStack |
+m_stackState
+
++ List of types currently on stack. |
+
+protected BranchWrapper[] |
+m_targetBranches
+
++ Branch to be aimed at next appended instruction. |
+
+protected java.util.HashMap |
+m_valueMap
+
++ Map for initialized properties (lazy create, null if not
+ used). |
+
+protected static java.util.ArrayList |
+s_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 | +|
---|---|
+ void |
+addException(java.lang.String name)
+
++ Add exception to those needing handling. |
+
+ int |
+addLocal(java.lang.String name,
+ org.apache.bcel.generic.Type type)
+
++ Add local variable to method. |
+
+ ClassItem |
+addMethod()
+
++ Add constructed method to class. |
+
+ void |
+addMethodExceptions(ClassItem method)
+
++ Add exceptions thrown by called method to those needing handling. |
+
+private void |
+append(org.apache.bcel.generic.CompoundInstruction ins)
+
++ Append compound instruction to method. |
+
+private void |
+append(org.apache.bcel.generic.Instruction ins)
+
++ Append instruction to method. |
+
+ void |
+appendAASTORE()
+
++ Append an AASTORE to the instruction list. |
+
+ void |
+appendACONST_NULL()
+
++ Append an ACONST_NULL to the instruction list. |
+
+ void |
+appendALOAD(java.lang.String type)
+
++ Append appropriate array load to the instruction list. |
+
+ void |
+appendARRAYLENGTH()
+
++ Append an ARRAYLENGTH to the instruction list. |
+
+ void |
+appendASTORE(java.lang.String type)
+
++ Append the appropriate array load to the instruction list. |
+
+ void |
+appendCall(ClassItem item)
+
++ Create invoke instruction for static, member, or interface method and + append to method. |
+
+ void |
+appendCallInit(java.lang.String name,
+ java.lang.String signature)
+
++ Create invoke initializer instruction from signature and append to + method. |
+
+ void |
+appendCallInterface(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke interface method instruction from signature and append to + method. |
+
+ void |
+appendCallStatic(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke static method instruction from signature and append to + method. |
+
+ void |
+appendCallVirtual(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke virtual method instruction from signature and append to + method. |
+
+ void |
+appendCreateArray(java.lang.String type)
+
++ Append instruction to create instance of array. |
+
+ void |
+appendCreateCast(java.lang.String to)
+
++ Append check cast instruction from object (if needed). |
+
+ void |
+appendCreateCast(java.lang.String from,
+ java.lang.String to)
+
++ Append check cast instruction (if needed). |
+
+ void |
+appendCreateNew(java.lang.String name)
+
++ Append instruction to create instance of class. |
+
+ void |
+appendDCMPG()
+
++ Append an DCMPG to the instruction list. |
+
+ void |
+appendDUP_X1()
+
++ Append a DUP_X1 to the instruction list. |
+
+ void |
+appendDUP()
+
++ Append a DUP to the instruction list. |
+
+ void |
+appendDUP2()
+
++ Append a DUP2 to the instruction list. |
+
+ void |
+appendFCMPG()
+
++ Append an FCMPG to the instruction list. |
+
+ void |
+appendGet(ClassItem item)
+
++ Create get instruction and append to method. |
+
+ void |
+appendGetField(ClassItem item)
+
++ Create getfield instruction and append to method. |
+
+ void |
+appendGetStatic(ClassItem item)
+
++ Create getstatic instruction and append to method. |
+
+ void |
+appendIASTORE()
+
++ Append an IASTORE to the instruction list. |
+
+ void |
+appendICONST_0()
+
++ Append an ICONST_0 to the instruction list. |
+
+ void |
+appendICONST_1()
+
++ Append an ICONST_1 to the instruction list. |
+
+ BranchWrapper |
+appendIF_ICMPNE(java.lang.Object src)
+
++ Append IF_ICMPNE branch instruction to method. |
+
+ BranchWrapper |
+appendIFEQ(java.lang.Object src)
+
++ Append IFEQ branch instruction to method. |
+
+ BranchWrapper |
+appendIFGE(java.lang.Object src)
+
++ Append IFGE branch instruction to method. |
+
+ BranchWrapper |
+appendIFLT(java.lang.Object src)
+
++ Append IFLT branch instruction to method. |
+
+ BranchWrapper |
+appendIFNE(java.lang.Object src)
+
++ Append IFNE branch instruction to method. |
+
+ BranchWrapper |
+appendIFNONNULL(java.lang.Object src)
+
++ Append IFNONNULL branch instruction to method. |
+
+ BranchWrapper |
+appendIFNULL(java.lang.Object src)
+
++ Append IFNULL branch instruction to method. |
+
+ void |
+appendIncrementLocal(int inc,
+ int slot)
+
++ Append instruction to increment local integer variable. |
+
+ void |
+appendInstanceOf(java.lang.String to)
+
++ Append instanceof check instruction. |
+
+ void |
+appendISUB()
+
++ Append an ISUB to the instruction list. |
+
+ void |
+appendIXOR()
+
++ Append an IXOR to the instruction list. |
+
+ void |
+appendLCMP()
+
++ Append an LCMP to the instruction list. |
+
+ void |
+appendLoadConstant(int value)
+
++ Create load constant instruction and append to method. |
+
+ void |
+appendLoadConstant(java.lang.Object value)
+
++ Create load constant instruction and append to method. |
+
+ void |
+appendLoadConstant(java.lang.String value)
+
++ Create load constant instruction and append to method. |
+
+ void |
+appendLoadLocal(int slot)
+
++ Append instruction to load local variable. |
+
+ void |
+appendPOP()
+
++ Append a POP to the instruction list. |
+
+ void |
+appendPOP2()
+
++ Append a POP2 to the instruction list. |
+
+ void |
+appendPut(ClassItem item)
+
++ Create put instruction and append to method. |
+
+ void |
+appendPutField(ClassItem item)
+
++ Create putfield instruction and append to method. |
+
+ void |
+appendPutStatic(ClassItem item)
+
++ Create putstatic instruction and append to method. |
+
+ void |
+appendReturn()
+
++ Append simple return. |
+
+ void |
+appendReturn(java.lang.String type)
+
++ Append typed return. |
+
+ void |
+appendReturn(org.apache.bcel.generic.Type type)
+
++ Append typed return. |
+
+ void |
+appendStoreLocal(int slot)
+
++ Append instruction to store local variable. |
+
+ void |
+appendSWAP()
+
++ Append a SWAP to the instruction list. |
+
+ BranchTarget |
+appendTargetACONST_NULL()
+
++ Append an ACONST_NULL to the instruction list as a branch target. |
+
+ BranchTarget |
+appendTargetCreateNew(java.lang.String name)
+
++ Append instruction to create instance of class as a branch target. |
+
+private BranchTarget |
+appendTargetInstruction(org.apache.bcel.generic.CompoundInstruction inst)
+
++ Append a compound instruction to the list as a branch target. |
+
+private BranchTarget |
+appendTargetInstruction(org.apache.bcel.generic.Instruction inst)
+
++ Append an instruction to the list as a branch target. |
+
+ BranchTarget |
+appendTargetLoadConstant(int value)
+
++ Append a load constant instruction as a branch target. |
+
+ BranchTarget |
+appendTargetLoadConstant(java.lang.String value)
+
++ Append a load constant instruction as a branch target. |
+
+ BranchTarget |
+appendTargetNOP()
+
++ Append a NOP to the instruction list as a branch target. |
+
+ void |
+appendThrow()
+
++ Append exception throw. |
+
+ BranchWrapper |
+appendUnconditionalBranch(java.lang.Object src)
+
++ Append unconditional branch instruction to method. |
+
+ void |
+codeComplete(boolean suffix)
+
++ Complete method construction. |
+
+protected org.apache.bcel.generic.LocalVariableGen |
+createLocal(java.lang.String name,
+ org.apache.bcel.generic.Type type)
+
++ Add local variable to method. |
+
+private java.lang.String |
+describeStack()
+
++ Generate description of current stack state. |
+
+ int |
+getAccessFlags()
+
++ Get access flags. |
+
+protected org.apache.bcel.generic.InstructionHandle |
+getFirstInstruction()
+
++ Get first instruction in method. |
+
+ ClassItem |
+getItem()
+
++ Get the method item. |
+
+ java.lang.Object |
+getKeyValue(java.lang.Object key)
+
++ Add local variable for created object. |
+
+protected org.apache.bcel.generic.InstructionHandle |
+getLastInstruction()
+
++ Get last instruction in method. |
+
+ org.apache.bcel.classfile.Method |
+getMethod()
+
++ Get the actual method. |
+
+ java.lang.String |
+getName()
+
++ Get name of method being constructed. |
+
+ java.lang.String |
+getSignature()
+
++ Get signature. |
+
+protected abstract void |
+handleExceptions()
+
++ Process accumulated exceptions. |
+
+ int |
+hashCode()
+
++ Get hash code. |
+
+ void |
+initStackState(BranchWrapper branch)
+
++ Initialize stack state to match branch source. |
+
+ void |
+initStackState(BranchWrapper branch,
+ int pop)
+
++ Initialize stack state to partially match branch source. |
+
+protected void |
+initStackState(java.lang.String[] types)
+
++ Initialize stack state to array of value types. |
+
+protected org.apache.bcel.generic.InstructionHandle |
+internalAppendCreateNew(java.lang.String name)
+
++ Internal append instruction to create instance of class. |
+
+ boolean |
+isStackTopLong()
+
++ Check if top item on stack is a long value. |
+
+ void |
+setAccessFlags(int flags)
+
++ Set access flags. |
+
+ java.lang.Object |
+setKeyValue(java.lang.Object key,
+ java.lang.Object value)
+
++ Add keyed value to method definition. |
+
+protected void |
+setTarget(org.apache.bcel.generic.InstructionHandle inst)
+
++ Target branches if pending. |
+
+ void |
+targetNext(BranchWrapper branch)
+
++ Set branch target as next instruction added to method. |
+
+ void |
+targetNext(BranchWrapper[] branches)
+
++ Set branch targets as next instruction added to method. |
+
+private java.lang.String |
+verifyArray()
+
++ Verify the top value in the stack state resulting from the current + instruction list is an array. |
+
+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. |
+
+private void |
+verifyCallStack(java.lang.String[] types)
+
++ Verify the top values in the stack state resulting from the current + instruction list. |
+
+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. |
+
+private void |
+verifyCompatible(java.lang.String type,
+ java.lang.String need)
+
++ Verify that a pair of value types represent compatible types. |
+
+private void |
+verifyStack(java.lang.String t1)
+
++ Verify the top value in the stack state resulting from the current + instruction list. |
+
+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. |
+
+private void |
+verifyStackDepth(int count)
+
++ Verify that at least the specified number of items are present on the + stack. |
+
+private void |
+verifyStackObject()
+
++ 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 | +
---|
+public static final java.lang.String FRAMEWORK_EXCEPTION_CLASS+
+public static final java.lang.String EXCEPTION_CONSTRUCTOR_SIGNATURE1+
+public static final java.lang.String EXCEPTION_CONSTRUCTOR_SIGNATURE2+
+protected static java.util.ArrayList s_argNameLists+
+
+protected static java.lang.String[] EMPTY_STRING_ARRAY+
+
+protected InstructionBuilder m_instructionBuilder+
+
+private org.apache.bcel.generic.InstructionList m_instructionList+
+
+private org.jibx.binding.util.StringStack m_stackState+
+
+protected org.apache.bcel.generic.MethodGen m_generator+
+
+protected org.apache.bcel.classfile.Method m_method+
+
+protected ClassItem m_item+
+
+private java.util.ArrayList m_localTypes+
+
+protected java.util.ArrayList m_exceptions+
null
if not used).
++
+protected int m_hashCode+
+
+protected BranchWrapper[] m_targetBranches+
+
+protected java.util.HashMap m_valueMap+
null
if not
+ used).
++
+Constructor Detail | +
---|
+protected MethodBuilder(java.lang.String name, + org.apache.bcel.generic.Type ret, + org.apache.bcel.generic.Type[] args, + ClassFile cf, + int access) + throws JiBXException+
+
name
- method name to be builtret
- method return typeargs
- types of argumentscf
- owning class file informationaccess
- flags for method access
+JiBXException
- on error in constructing method+Method Detail | +
---|
+public java.lang.String getName()+
+
getName
in class BindingMethod
+public java.lang.String getSignature()+
+
getSignature
in class BindingMethod
+public int getAccessFlags()+
+
getAccessFlags
in class BindingMethod
+public void setAccessFlags(int flags)+
+
setAccessFlags
in class BindingMethod
flags
- access type to be set+public org.apache.bcel.classfile.Method getMethod()+
codeComplete(boolean)
method is called).
++
getMethod
in class BindingMethod
+public java.lang.Object setKeyValue(java.lang.Object key, + java.lang.Object value)+
+
key
- retrieval keyvalue
- keyed value+public java.lang.Object getKeyValue(java.lang.Object key)+
+
+public void addException(java.lang.String name)+
+
name
- fully qualified name of exception class+public void addMethodExceptions(ClassItem method)+
+
method
- information for method to be handled+protected org.apache.bcel.generic.InstructionHandle getFirstInstruction()+
+
+protected org.apache.bcel.generic.InstructionHandle getLastInstruction()+
+
+protected final void setTarget(org.apache.bcel.generic.InstructionHandle inst)+
targetNext(org.jibx.binding.classes.BranchWrapper)
method.
++
inst
- handle for appended instruction+private java.lang.String describeStack()+
+
+private void verifyCompatible(java.lang.String type, + java.lang.String need)+
+
type
- actual known type of valueneed
- type needed+private void verifyStackDepth(int count)+
+
count
- minimum number of items required+private void verifyStack(java.lang.String t1)+
+
t1
- expected type for top item on stack+private java.lang.String verifyArray()+
+
+private void verifyArray(java.lang.String type)+
+
type
- array item type+private void verifyStack(java.lang.String t1, + java.lang.String t2)+
+
t1
- expected type for first item on stackt2
- expected type for second item on stack+private void verifyCallStack(java.lang.String[] types)+
+
types
- expected parameter types on stack+private void verifyCallStack(java.lang.String clas, + java.lang.String[] types)+
+
clas
- name of method classtypes
- expected parameter types on stack+private void verifyStackObject()+
+
+public BranchWrapper appendIFEQ(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIFGE(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIFLT(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIFNE(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIFNONNULL(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIFNULL(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendIF_ICMPNE(java.lang.Object src)+
+
src
- object responsible for generating branch
++public BranchWrapper appendUnconditionalBranch(java.lang.Object src)+
+
src
- object responsible for generating branch
++private void append(org.apache.bcel.generic.CompoundInstruction ins)+
+
ins
- instruction to be appended+private void append(org.apache.bcel.generic.Instruction ins)+
+
ins
- instruction to be appended+public void appendLoadConstant(int value)+
+
value
- constant value to be loaded+public void appendLoadConstant(java.lang.String value)+
String
reference from the constant pool.
++
value
- constant value to be loaded+public void appendLoadConstant(java.lang.Object value)+
+
value
- constant value to be loaded+public void appendGetField(ClassItem item)+
+
item
- information for field to be gotton+public void appendGetStatic(ClassItem item)+
+
item
- information for field to be set+public void appendGet(ClassItem item)+
+
item
- information for field to be gotten+public void appendPutField(ClassItem item)+
+
item
- information for field to be set+public void appendPutStatic(ClassItem item)+
+
item
- information for field to be set+public void appendPut(ClassItem item)+
+
item
- information for field to be gotten+public void appendCall(ClassItem item)+
+
item
- information for method to be called+public void appendCallStatic(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified class and method namesignature
- method signature in standard form+public void appendCallVirtual(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified class and method namesignature
- method signature in standard form+public void appendCallInterface(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified interface and method namesignature
- method signature in standard form+public void appendCreateNew(java.lang.String name)+
+
name
- fully qualified class name+public void appendCallInit(java.lang.String name, + java.lang.String signature)+
+
name
- fully qualified class namesignature
- method signature in standard form+public void appendCreateArray(java.lang.String type)+
+
type
- fully qualified type name of array elements+public void appendCreateCast(java.lang.String from, + java.lang.String to)+
+
from
- fully qualified name of current typeto
- fully qualified name of desired type+public void appendCreateCast(java.lang.String to)+
+
to
- fully qualified name of desired type+public void appendInstanceOf(java.lang.String to)+
+
to
- fully qualified name of type to check+protected org.apache.bcel.generic.LocalVariableGen createLocal(java.lang.String name, + org.apache.bcel.generic.Type type)+
+
name
- local variable name (may be null
to use default)type
- variable type+public int addLocal(java.lang.String name, + org.apache.bcel.generic.Type type)+
+
name
- local variable nametype
- variable type
++public void appendLoadLocal(int slot)+
+
slot
- local variable slot to load+public void appendStoreLocal(int slot)+
+
slot
- local variable slot to store+public void appendIncrementLocal(int inc, + int slot)+
+
inc
- amount of incrmentslot
- local variable slot to load+public void appendReturn()+
+
+public void appendReturn(org.apache.bcel.generic.Type type)+
+
type
- returned type (may be Type.VOID
)+public void appendReturn(java.lang.String type)+
+
type
- returned type (may be void
)+public void appendThrow()+
+
+public void appendALOAD(java.lang.String type)+
+
type
- array item type expected+public void appendAASTORE()+
+
+public void appendASTORE(java.lang.String type)+
+
type
- array item type expected+public void appendACONST_NULL()+
+
+public void appendARRAYLENGTH()+
+
+public void appendDCMPG()+
+
+public void appendDUP()+
+
+public void appendDUP2()+
+
+public void appendDUP_X1()+
+
+public void appendFCMPG()+
+
+public void appendIASTORE()+
+
+public void appendICONST_0()+
+
+public void appendICONST_1()+
+
+public void appendISUB()+
+
+public void appendIXOR()+
+
+public void appendLCMP()+
+
+public void appendPOP()+
+
+public void appendPOP2()+
+
+public void appendSWAP()+
+
+private BranchTarget appendTargetInstruction(org.apache.bcel.generic.CompoundInstruction inst)+
+
inst
- compound instruction to be appended as branch target
++private BranchTarget appendTargetInstruction(org.apache.bcel.generic.Instruction inst)+
+
inst
- instruction to be appended as branch target
++public BranchTarget appendTargetNOP()+
+
+public BranchTarget appendTargetACONST_NULL()+
+
+public BranchTarget appendTargetLoadConstant(int value)+
+
value
- constant value to be loaded
++public BranchTarget appendTargetLoadConstant(java.lang.String value)+
String
reference from the constant pool.
++
value
- constant value to be loaded
++public BranchTarget appendTargetCreateNew(java.lang.String name)+
+
name
- fully qualified class name
++protected org.apache.bcel.generic.InstructionHandle internalAppendCreateNew(java.lang.String name)+
+
name
- fully qualified class name+public boolean isStackTopLong()+
+
true
if long value, false
if not+public void initStackState(BranchWrapper branch)+
+
branch
- wrapper for branch to be for stack initialization+public void initStackState(BranchWrapper branch, + int pop)+
+
branch
- wrapper for branch to be for stack initializationpop
- number of items to be removed from branch source stack state+protected void initStackState(java.lang.String[] types)+
+
types
- array of type names on stack+public void targetNext(BranchWrapper branch)+
+
branch
- wrapper for branch to be aimed at next instruction (may be
+ null
, in which case nothing is done)+public void targetNext(BranchWrapper[] branches)+
+
branches
- wrappers for branches to be aimed at next instruction
+ (may be null
, in which case nothing is done)+protected abstract void handleExceptions() + throws JiBXException+
+
JiBXException
- on error in exception handling+public void codeComplete(boolean suffix) + throws JiBXException+
+
suffix
- add suffix to make method name unique
+JiBXException
- on error in finishing method construction+public ClassItem getItem()+
+
getItem
in class BindingMethod
+public int hashCode()+
codeComplete(boolean)
method is called.
++
hashCode
in class BindingMethod
+public ClassItem addMethod() + throws JiBXException+
+
JiBXException
- on error in finishing method construction
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Classes
+
+ +BindingMethod + +BoundClass + +BranchTarget + +BranchWrapper + +ClassCache + +ClassFile + +ClassItem + +ContextMethodBuilder + +ExceptionMethodBuilder + +ExistingMethod + +InstructionBuilder + +MarshalBuilder + +MarshalUnmarshalBuilder + +MethodBuilder + +MungedClass + +MungedClass.JiBXFilter + +UnmarshalBuilder |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+Class Summary | +|
---|---|
BindingMethod | +Binding method information. | +
BoundClass | +Bound class handler. | +
BranchTarget | +Wrapper for branch target information. | +
BranchWrapper | +Wrapper for branch handle. | +
ClassCache | +Cache for class files being modified. | +
ClassFile | +Class file information. | +
ClassItem | +Wrapper for field or method information. | +
ContextMethodBuilder | +Builder for binding methods with a context and current object. | +
ExceptionMethodBuilder | +Builder for simple methods that may just pass checked exceptions on to + caller. | +
ExistingMethod | +Information for an existing binding method. | +
InstructionBuilder | +Instruction builder. | +
MarshalBuilder | +Marshalling method builder. | +
MarshalUnmarshalBuilder | +Builder for marshal and unmarshal methods. | +
MethodBuilder | +Method builder. | +
MungedClass | +Modifiable class handler. | +
MungedClass.JiBXFilter | +Filter for class files generated by JiBX. | +
UnmarshalBuilder | +Unmarshalling method builder. | +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BranchTarget ++
public class BranchTarget
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String[] |
+m_stackTypes
+
++ Stack state for branch target. |
+
+private org.apache.bcel.generic.InstructionHandle |
+m_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.InstructionHandle |
+getInstruction()
+
++ Get actual target instruction. |
+
+(package private) java.lang.String[] |
+getStack()
+
++ Get stack state information. |
+
+(package private) boolean |
+matchStacks(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 | +
---|
+private final org.apache.bcel.generic.InstructionHandle m_targetHandle+
+
+private final java.lang.String[] m_stackTypes+
+
+Constructor Detail | +
---|
+BranchTarget(org.apache.bcel.generic.InstructionHandle hand, + java.lang.String[] types)+
+
hand
- instruction handletypes
- array of types of values on stack+Method Detail | +
---|
+org.apache.bcel.generic.InstructionHandle getInstruction()+
+
+java.lang.String[] getStack()+
+
+boolean matchStacks(java.lang.String[] types)+
+
types
- array of types of values on stack
+true
if stack states match, false
if
+ not
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.ExistingMethod ++
public class ExistingMethod
+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. +
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_hashCode
+
++ Accumulated hash code from adding instructions. |
+
+private ClassItem |
+m_item
+
++ Class item information. |
+
+private org.apache.bcel.classfile.Method |
+m_method
+
++ Actual method information. |
+
+private boolean |
+m_used
+
++ Flag for method used in code. |
+
+Constructor Summary | +|
---|---|
ExistingMethod(org.apache.bcel.classfile.Method method,
+ ClassItem item,
+ ClassFile file)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+delete()
+
++ Delete method from class. |
+
+ int |
+getAccessFlags()
+
++ Get access flags. |
+
+ ClassItem |
+getItem()
+
++ Get the method item. |
+
+ org.apache.bcel.classfile.Method |
+getMethod()
+
++ Get the actual method. |
+
+ java.lang.String |
+getName()
+
++ Get name of method. |
+
+ java.lang.String |
+getSignature()
+
++ Get signature. |
+
+ int |
+hashCode()
+
++ Get hash code. |
+
+ boolean |
+isUsed()
+
++ Check method used status. |
+
+ void |
+setAccessFlags(int flags)
+
++ Set access flags. |
+
+ void |
+setUsed()
+
++ 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 | +
---|
+private ClassItem m_item+
+
+private org.apache.bcel.classfile.Method m_method+
+
+private int m_hashCode+
+
+private boolean m_used+
+
+Constructor Detail | +
---|
+public ExistingMethod(org.apache.bcel.classfile.Method method, + ClassItem item, + ClassFile file)+
+
method
- actual method informationitem
- class item information for methodfile
- class file information+Method Detail | +
---|
+public java.lang.String getName()+
+
getName
in class BindingMethod
+public java.lang.String getSignature()+
+
getSignature
in class BindingMethod
+public int getAccessFlags()+
+
getAccessFlags
in class BindingMethod
+public void setAccessFlags(int flags)+
+
setAccessFlags
in class BindingMethod
flags
- access type to be set+public boolean isUsed()+
+
+public void setUsed()+
+
+public org.apache.bcel.classfile.Method getMethod()+
+
getMethod
in class BindingMethod
+public ClassItem getItem()+
+
getItem
in class BindingMethod
+public void delete() + throws JiBXException+
+
JiBXException
- if unable to delete method+public int hashCode()+
+
hashCode
in class BindingMethod
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.ClassItem ++
public class ClassItem
+Wrapper for field or method information. Provides the information needed + for access to either existing or added methods in existing classes. +
+ +
+
+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 ClassFile |
+m_classFile
+
++ Owning class information. |
+
+private org.apache.bcel.classfile.FieldOrMethod |
+m_item
+
++ Wrapped existing item. |
+
+private java.lang.String |
+m_name
+
++ Item name. |
+
+private java.lang.String |
+m_signature
+
++ Encoded signature. |
+
+private java.lang.String |
+m_typeName
+
++ Fully qualified class name of item type. |
+
+private static java.util.HashMap |
+s_primitiveMap
+
++ Map for primitive type signature variants. |
+
+private static java.util.HashMap |
+s_signatureParamsMap
+
++ Map from method signature to array of argument types. |
+
+private static java.util.HashMap |
+s_signatureTypeMap
+
++ Map from method signature to return type. |
+
+private static java.util.HashMap |
+s_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 ClassItem |
+findStaticMethod(java.lang.String name,
+ java.lang.String[] sigs)
+
++ Get static method by fully qualified name. |
+
+static ClassItem |
+findVirtualMethod(java.lang.String name,
+ java.lang.String[] sigs)
+
++ Get virtual method by fully qualified name. |
+
+ int |
+getAccessFlags()
+
++ Get access flags. |
+
+ int |
+getArgumentCount()
+
++ Get number of arguments for method. |
+
+ java.lang.String |
+getArgumentType(int index)
+
++ Get argument type as fully qualified class name. |
+
+ java.lang.String[] |
+getArgumentTypes()
+
++ Get argument types as array of fully qualified class names. |
+
+ ClassFile |
+getClassFile()
+
++ Get owning class information. |
+
+ java.lang.String[] |
+getExceptions()
+
++ Get names of exceptions thrown by method. |
+
+ java.lang.String |
+getName()
+
++ Get item name. |
+
+static java.lang.String[] |
+getParametersFromSignature(java.lang.String sig)
+
++ Get parameter type names from method signature. |
+
+static java.lang.String |
+getPrimitiveSignature(java.lang.String type)
+
++ Get the signature for a primitive. |
+
+ java.lang.String |
+getSignature()
+
++ 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.String |
+getTypeFromSignature(java.lang.String sig)
+
++ Get return type names from method signature. |
+
+ java.lang.String |
+getTypeName()
+
++ Get item type as fully qualified class name. |
+
+static boolean |
+isAssignable(java.lang.String from,
+ java.lang.String to)
+
++ Check if a value of one type can be directly assigned to another type. |
+
+ boolean |
+isInitializer()
+
++ Check if item is an initializer. |
+
+ boolean |
+isMethod()
+
++ Check if item is a method. |
+
+static boolean |
+isPrimitive(java.lang.String type)
+
++ Check if type name is a primitive. |
+
+ boolean |
+isStatic()
+
++ Check if item is a static. |
+
+ void |
+makeAccessible(ClassFile src)
+
++ Make accessible item. |
+
+ void |
+setAccessFlags(int flags)
+
++ Set access flags. |
+
+static org.apache.bcel.generic.Type |
+typeFromName(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 | +
---|
+private static final java.lang.String[] EMPTY_STRING_ARRAY+
+
+private static java.util.HashMap s_primitiveMap+
+
+private static java.util.HashMap s_typeMap+
+
+private static java.util.HashMap s_signatureParamsMap+
+
+private static java.util.HashMap s_signatureTypeMap+
+
+private ClassFile m_classFile+
+
+private java.lang.String m_name+
+
+private java.lang.String m_signature+
+
+private java.lang.String m_typeName+
+
+private java.lang.String[] m_argTypes+
+
+private org.apache.bcel.classfile.FieldOrMethod m_item+
+
+Constructor Detail | +
---|
+public ClassItem(java.lang.String name, + ClassFile cf, + org.apache.bcel.classfile.FieldOrMethod item)+
+
name
- field or method namecf
- owning class informationitem
- field or method information+Method Detail | +
---|
+public ClassFile getClassFile()+
+
+public java.lang.String getName()+
+
+public java.lang.String getTypeName()+
+
+public int getArgumentCount()+
+
+public java.lang.String getArgumentType(int index)+
+
index
- argument number
++public java.lang.String[] getArgumentTypes()+
+
+public int getAccessFlags()+
+
+public void setAccessFlags(int flags)+
+
flags
- access flags for field or method+public void makeAccessible(ClassFile src) + throws JiBXException+
+
src
- class file for required access
+JiBXException
- if cannot be accessed+public boolean isStatic()+
+
true
if a static, false
if member+public java.lang.String getSignature()+
+
+public boolean isMethod()+
+
true
if a method, false
if a field+public boolean isInitializer()+
+
true
if an initializer, false
if a
+ field or normal method+public java.lang.String[] getExceptions()+
+
null
if
+ a field+public static boolean isPrimitive(java.lang.String type)+
+
true
if a primitive, false
if not+public static java.lang.String getPrimitiveSignature(java.lang.String type)+
+
+public static java.lang.String[] getParametersFromSignature(java.lang.String sig)+
+
sig
- method signature to be decoded
++public static java.lang.String getTypeFromSignature(java.lang.String sig)+
+
sig
- method signature to be decoded
++public static org.apache.bcel.generic.Type typeFromName(java.lang.String name)+
+
name
- fully qualified type name
++public static ClassItem findVirtualMethod(java.lang.String name, + java.lang.String[] sigs) + throws JiBXException+
+
name
- fully qualified class and method namesigs
- possible method signatures
+null
if not found
+JiBXException
- if configuration error+public static ClassItem findStaticMethod(java.lang.String name, + java.lang.String[] sigs) + throws JiBXException+
+
name
- fully qualified class and method namesigs
- possible method signatures
+null
if not found
+JiBXException
- if configuration error+public static java.lang.String[] getSignatureVariants(java.lang.String name) + throws JiBXException+
+
name
- fully qualified class name
+JiBXException
- if configuration error+public static boolean isAssignable(java.lang.String from, + java.lang.String to) + throws JiBXException+
+
from
- fully qualified class name of initial typeto
- fully qualified class name of assignment type
+true
if assignable, false
if not
+JiBXException
- if configuration error
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.ClassFile ++
public class ClassFile
+Class file information. Wraps the actual class file data as well as + associated management information. +
+ +
+
+Field Summary | +|
---|---|
+protected static ExistingMethod[] |
+EMPTY_METHOD_ARRAY
+
++ |
+
+private org.apache.bcel.classfile.JavaClass |
+m_curClass
+
++ Base class information as loaded by BCEL. |
+
+private java.io.File |
+m_file
+
++ Actual class file information. |
+
+private org.apache.bcel.generic.ClassGen |
+m_genClass
+
++ Modified class generator (lazy create, only if needed). |
+
+private org.apache.bcel.generic.ConstantPoolGen |
+m_genPool
+
++ Constant pool generator for modified class (lazy create, only if + needed). |
+
+private int |
+m_hashCode
+
++ Cached hash code value for class. |
+
+private int |
+m_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 InstructionBuilder |
+m_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 boolean |
+m_isHashCurrent
+
++ Hash code computation for class is current flag. |
+
+private boolean |
+m_isModified
+
++ Flag for class modified. |
+
+private boolean |
+m_isSamePackage
+
++ Class in same package as superclass flag. |
+
+private boolean |
+m_isWritable
+
++ File is writable flag. |
+
+private java.util.HashMap |
+m_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.String |
+m_name
+
++ Fully qualified class name. |
+
+private java.io.File |
+m_root
+
++ Directory root for class. |
+
+private java.lang.String |
+m_signature
+
++ Signature for class as type. |
+
+private java.util.HashMap |
+m_suffixMap
+
++ Map for method names with possibly generated suffixes (lazy create, only + if needed). |
+
+protected ClassFile |
+m_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.Type |
+m_type
+
++ Class as type. |
+
+private int |
+m_uniqueIndex
+
++ Suffix number for making method names unique (lazy computation). |
+
+private int |
+m_useCount
+
++ Usage count for this class. |
+
+static int |
+PACKAGE_ACCESS
+
++ |
+
+static int |
+PRIVATE_ACCESS
+
++ |
+
+protected static int |
+PRIVATEFIELD_ACCESS
+
++ |
+
+static int |
+PROTECTED_ACCESS
+
++ |
+
+static int |
+PUBLIC_ACCESS
+
++ |
+
+private static java.lang.ClassLoader |
+s_directLoader
+
++ Direct class loader. |
+
+private static org.apache.bcel.util.ClassPath |
+s_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 void |
+accumulateInterfaces(java.lang.String[] intfs,
+ java.util.HashMap map,
+ java.util.ArrayList accs)
+
++ Accumulate interface signatures recursively. |
+
+ ClassItem |
+addDefaultConstructor()
+
++ Add default constructor to a class. |
+
+ ClassItem |
+addField(java.lang.String type,
+ java.lang.String name,
+ int access)
+
++ Add field to class without initialization. |
+
+ ClassItem |
+addField(java.lang.String type,
+ java.lang.String name,
+ int access,
+ java.lang.String init)
+
++ Add field to class with initial String value. |
+
+ boolean |
+addInterface(java.lang.String intf)
+
++ Add interface to class. |
+
+ ClassItem |
+addMethod(org.apache.bcel.classfile.Method method)
+
++ Add method to class. |
+
+ ClassItem |
+addPrivateField(java.lang.String type,
+ java.lang.String name)
+
++ Add private field to class without initialization. |
+
+ void |
+codeComplete()
+
++ Finalize current modified state of class. |
+
+protected int |
+computeHashCode()
+
++ Computes a hash code based on characteristics of the class. |
+
+ void |
+delete()
+
++ Delete class file information. |
+
+ boolean |
+deleteField(java.lang.String name)
+
++ Delete field from class. |
+
+ java.lang.String |
+deriveClassName(java.lang.String prefix,
+ java.lang.String suffix)
+
++ Derive generated class name. |
+
+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. |
+
+static boolean |
+equalMethods(org.apache.bcel.classfile.Method a,
+ org.apache.bcel.classfile.Method b)
+
++ Compare two methods to see if they're equal. |
+
+ boolean |
+equals(java.lang.Object obj)
+
++ Check if objects are equal. |
+
+protected org.apache.bcel.classfile.Field |
+getAccessibleField(java.lang.String name)
+
++ Get internal information for field. |
+
+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. |
+
+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. |
+
+ ClassItem |
+getBestMethod(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.ClassGen |
+getClassGen()
+
++ Get generator for modifying class. |
+
+ org.apache.bcel.generic.ConstantPoolGen |
+getConstPoolGen()
+
++ Get constant pool generator for modifying class. |
+
+protected org.apache.bcel.classfile.Field |
+getDefinedField(java.lang.String name)
+
++ Get internal information for field. |
+
+ ClassItem |
+getDirectField(java.lang.String name)
+
++ Get information for field. |
+
+ ClassItem |
+getField(java.lang.String name)
+
++ Get information for field. |
+
+ java.io.File |
+getFile()
+
++ Get actual file for class. |
+
+ ClassItem |
+getInitializerMethod(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. |
+
+ InstructionBuilder |
+getInstructionBuilder()
+
++ Get instruction builder for modifying class. |
+
+ java.lang.String[] |
+getInterfaces()
+
++ Get names of all interfaces implemented by class. |
+
+ ClassItem |
+getMethod(java.lang.String name,
+ java.lang.String sig)
+
++ Get information for method without respect to potential trailing + arguments or return value. |
+
+ ClassItem |
+getMethod(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.String |
+getName()
+
++ Get fully qualified class name. |
+
+ java.lang.String |
+getPackage()
+
++ Get package name. |
+
+ org.apache.bcel.classfile.JavaClass |
+getRawClass()
+
++ Get raw current class information. |
+
+ java.io.File |
+getRoot()
+
++ Get root directory for load path. |
+
+ java.lang.String |
+getSignature()
+
++ Get signature for class as type. |
+
+ ClassItem |
+getStaticMethod(java.lang.String name,
+ java.lang.String sig)
+
++ Get information for static method without respect to return value. |
+
+ ClassFile |
+getSuperFile()
+
++ Get superclass information. |
+
+ java.lang.String |
+getSuperName()
+
++ Get superclass name. |
+
+ org.apache.bcel.generic.Type |
+getType()
+
++ Get class as type. |
+
+ int |
+getUseCount()
+
++ Get use count for class. |
+
+ int |
+hashCode()
+
++ Get hash code. |
+
+ int |
+incrementUseCount()
+
++ Increment use count for class. |
+
+private void |
+init(java.lang.String name,
+ java.lang.String path,
+ java.io.InputStream ins)
+
++ Internal initialization method. |
+
+private void |
+initInterface()
+
++ Retrieve superinterfaces for an interface class. |
+
+ boolean |
+isAbstract()
+
++ Check if class is abstract. |
+
+ boolean |
+isAccessible(ClassItem item)
+
++ Check accessible method. |
+
+ boolean |
+isArray()
+
++ Check if class is an array. |
+
+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. |
+
+ boolean |
+isComplete()
+
++ Check if class is in complete state. |
+
+ boolean |
+isImplements(java.lang.String sig)
+
++ Check if class implements an interface. |
+
+ boolean |
+isInterface()
+
++ Check if class is an interface. |
+
+ boolean |
+isModifiable()
+
++ Check if class is modifiable. |
+
+ boolean |
+isModified()
+
++ Check if class has been modified. |
+
+private static boolean |
+isSuffixName(java.lang.String name)
+
++ Check if a method name matches the pattern for a generated unique suffix. |
+
+ boolean |
+isSuperclass(java.lang.String name)
+
++ Check if another class is a superclass of this one. |
+
+static java.lang.Class |
+loadClass(java.lang.String name)
+
++ Try loading class from classpath. |
+
+ java.lang.String |
+makeUniqueMethodName(java.lang.String name)
+
++ Make method name unique with generated suffix. |
+
+private static boolean |
+matchAccess(org.apache.bcel.classfile.FieldOrMethod item,
+ int access)
+
++ Check for match to specified access level. |
+
+ void |
+removeMethod(org.apache.bcel.classfile.Method method)
+
++ Remove method from class. |
+
+ void |
+setModified()
+
++ Set class modified flag. |
+
+static void |
+setPaths(java.lang.String[] paths)
+
++ Set class paths to be searched. |
+
+ void |
+setSuperFile(ClassFile sclas)
+
++ Set superclass information. |
+
+ ClassItem |
+updateField(java.lang.String type,
+ java.lang.String name,
+ int access,
+ java.lang.String init)
+
++ Update class field with initial String value. |
+
+ void |
+writeFile()
+
++ Write out modified class information. |
+
+ void |
+writeFile(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 | +
---|
+public static final int PRIVATE_ACCESS+
+public static final int PACKAGE_ACCESS+
+public static final int PROTECTED_ACCESS+
+public static final int PUBLIC_ACCESS+
+protected static final int PRIVATEFIELD_ACCESS+
+protected static final ExistingMethod[] EMPTY_METHOD_ARRAY+
+private static org.apache.bcel.util.ClassPath s_loader+
+
+private static java.lang.ClassLoader s_directLoader+
+
+private java.lang.String m_name+
+
+private java.lang.String m_signature+
+
+private org.apache.bcel.generic.Type m_type+
+
+private java.io.File m_root+
+
+private java.io.File m_file+
+
+private boolean m_isSamePackage+
+
+private boolean m_isWritable+
+
+protected ClassFile m_superClass+
+
+protected java.lang.String[] m_interfaceNames+
+
+private ClassFile[] m_superInterfaces+
+
+private java.lang.String[] m_instanceOfs+
+
+private org.apache.bcel.classfile.Method[] m_methods+
+
+private org.apache.bcel.classfile.JavaClass m_curClass+
+
+private org.apache.bcel.generic.ClassGen m_genClass+
+
+private org.apache.bcel.generic.ConstantPoolGen m_genPool+
+
+protected InstructionBuilder m_instBuilder+
+
+private java.util.HashMap m_suffixMap+
+
+private java.util.HashMap m_itemMap+
+
+private boolean m_isModified+
+
+private int m_useCount+
+
+private boolean m_isHashCurrent+
+
+private int m_hashCode+
+
+private int m_inheritDepth+
+
+private int m_uniqueIndex+
+
+Constructor Detail | +
---|
+public ClassFile(java.lang.String name, + java.lang.String path, + java.io.InputStream ins) + throws JiBXException+
+
name
- fully qualified class namepath
- class file pathins
- input stream for class file data
+JiBXException
- if unable to load class file+public ClassFile(java.lang.String name, + java.io.File root, + java.io.File file) + throws java.io.IOException, + JiBXException+
+
name
- fully qualified class nameroot
- directory root from class loading path listfile
- actual class file
+java.io.IOException
- if unable to open file
+JiBXException
- if error in reading class file+public ClassFile(java.lang.String name) + throws java.io.IOException, + JiBXException+
+
name
- fully qualified class name
+java.io.IOException
- if unable to open file
+JiBXException
- if error in reading class file+public ClassFile(java.lang.String name, + java.lang.String sig)+
+
name
- fully qualified class namesig
- corresponding class signature+public ClassFile(java.lang.String name, + java.io.File root, + ClassFile sclas, + int access, + java.lang.String[] impls) + throws JiBXException+
+
name
- fully qualified class nameroot
- directory root from class loading path listsclas
- superclass of new classaccess
- access flags for classimpls
- array of interfaces implemented by new class
+JiBXException
- on error loading interface information+Method Detail | +
---|
+private void init(java.lang.String name, + java.lang.String path, + java.io.InputStream ins) + throws JiBXException+
+
name
- fully qualified class namepath
- class file pathins
- input stream for class file data
+JiBXException
- if unable to load class file+private void initInterface() + throws JiBXException+
+
JiBXException
- on error loading interface information+public boolean isInterface()+
+
true
if an interface, false
if not+public boolean isAbstract()+
+
true
if an abstract class, false
if not+public boolean isArray()+
+
true
if an array class, false
if not+public boolean isModifiable()+
+
true
if class is modifiable, false
if
+ not+public java.lang.String getName()+
+
+public java.lang.String getSignature()+
+
+public org.apache.bcel.generic.Type getType()+
+
+public java.lang.String getPackage()+
+
+public java.io.File getRoot()+
+
+public java.io.File getFile()+
+
+public org.apache.bcel.classfile.JavaClass getRawClass()+
+
+public java.lang.String getSuperName()+
+
+public void setSuperFile(ClassFile sclas)+
+
sclas
- superclass information+public ClassFile getSuperFile()+
+
null
if no
+ superclass - java.lang.Object, interface, or primitive)+public java.lang.String[] getInterfaces()+
+
+public boolean addInterface(java.lang.String intf) + throws JiBXException+
+
intf
- fully qualified interface name
+true
if added, false
if already present
+JiBXException
- on configuration error+protected void accumulateInterfaces(java.lang.String[] intfs, + java.util.HashMap map, + java.util.ArrayList accs) + throws JiBXException+
+
intfs
- names of interfaces implementedmap
- map for interfaces already accumulatedaccs
- accumulated interface names
+JiBXException
- if configuration error+public java.lang.String[] getInstanceSigs() + throws JiBXException+
+
JiBXException
- if configuration error+public boolean isImplements(java.lang.String sig) + throws JiBXException+
+
sig
- signature of interface to be checked
+true
if interface is implemented by class,
+ false
if not
+JiBXException
- if configuration error+public boolean isSuperclass(java.lang.String name)+
+
name
- of superclass to be checked
+true
if named class is a superclass of this one,
+ false
if not+protected org.apache.bcel.classfile.Field getDefinedField(java.lang.String name)+
+
name
- field name
+null
if field not found+protected org.apache.bcel.classfile.Field getAccessibleField(java.lang.String name)+
+
name
- field name
+null
if field not found+public ClassItem getDirectField(java.lang.String name)+
+
name
- field name
+null
if field not found+public ClassItem getField(java.lang.String name) + throws JiBXException+
+
name
- field name
+JiBXException
- if field not found+private org.apache.bcel.classfile.Method[] getMethods()+
+
+protected org.apache.bcel.classfile.Method getAccessibleMethod(java.lang.String name, + java.lang.String sig)+
+
name
- method namesig
- partial method signature to be matched
+null
if method not found+public ClassItem getMethod(java.lang.String name, + java.lang.String sig)+
+
name
- method namesig
- partial method signature to be matched
+null
if method not found+public ClassItem getMethod(java.lang.String name, + java.lang.String[] sigs)+
+
name
- method namesigs
- possible signatures for method (including return type)
+null
if method not found+private static boolean matchAccess(org.apache.bcel.classfile.FieldOrMethod item, + int access)+
+
item
- information for field or method to be checkedaccess
- required access level for match
+true
if access level match, false
if
+ not+private static boolean isAssignmentCompatible(org.apache.bcel.generic.Type have, + org.apache.bcel.generic.Type need)+
+
have
- type being checkedneed
- type needed
+true
if compatible, false
if not+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)+
+
name
- method nameaccess
- access level required for matching methodsret
- return value type (null
if indeterminant)args
- argument value types
+null
if method not found+public ClassItem getBestMethod(java.lang.String name, + java.lang.String ret, + java.lang.String[] args)+
+
name
- method nameret
- return value type (null
if indeterminant)args
- argument value types
+null
if method not found+public ClassItem getInitializerMethod(java.lang.String sig)+
+
sig
- encoded argument list signature
+null
if method not found+public ClassItem getStaticMethod(java.lang.String name, + java.lang.String sig)+
+
name
- method namesig
- encoded argument list signature
+null
if method not found+public ExistingMethod[] getBindingMethods(java.lang.String prefix, + java.lang.String[] matches)+
+
prefix
- identifying prefix for binding methodsmatches
- pairs of method name and signature to be matched as
+ exceptions to the prefix matching
++public boolean isAccessible(ClassItem item)+
+
item
- field or method information
+true
if accessible, false
if not+private org.apache.bcel.generic.ClassGen getClassGen() + throws JiBXException+
+
JiBXException
- if class not modifiable+public org.apache.bcel.generic.ConstantPoolGen getConstPoolGen() + throws JiBXException+
+
JiBXException
- if class not modifiable+public InstructionBuilder getInstructionBuilder() + throws JiBXException+
+
JiBXException
- if class not modifiable+public ClassItem addMethod(org.apache.bcel.classfile.Method method) + throws JiBXException+
+
method
- method to be added
+JiBXException
- on error in adding method+public void removeMethod(org.apache.bcel.classfile.Method method) + throws JiBXException+
+
method
- method to be removed
+JiBXException
- on error in removing method+public ClassItem addField(java.lang.String type, + java.lang.String name, + int access, + java.lang.String init) + throws JiBXException+
String
value. If a field
+ with the same name already exists, it is overwritten.
++
type
- fully qualified class name of field typename
- field nameaccess
- access flags for fieldinit
- initial value for field
+JiBXException
- if unable to add field+public ClassItem updateField(java.lang.String type, + java.lang.String name, + int access, + java.lang.String init) + throws JiBXException+
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.
++
type
- fully qualified class name of field typename
- field nameaccess
- access flags for fieldinit
- initial value for field
+JiBXException
- if unable to add field+public ClassItem addField(java.lang.String type, + java.lang.String name, + int access) + throws JiBXException+
+
type
- fully qualified class name of field typename
- field nameaccess
- access flags for field
+JiBXException
- if unable to add field+public ClassItem addPrivateField(java.lang.String type, + java.lang.String name) + throws JiBXException+
+
type
- fully qualified class name of field typename
- field name
+JiBXException
- if unable to add field+public ClassItem addDefaultConstructor() + throws JiBXException+
+
JiBXException
- if unable to add constructor+private static boolean isSuffixName(java.lang.String name)+
+
name
- method name to be checked
+true
if name matches suffix pattern,
+ false
if not+public java.lang.String makeUniqueMethodName(java.lang.String name)+
+
name
- base name before suffix is appended
++public boolean deleteField(java.lang.String name) + throws JiBXException+
+
name
- field name
+true
if field was present, false
if not
+JiBXException
- if unable to delete field+public int getUseCount()+
+
+public int incrementUseCount()+
+
+public boolean isModified()+
+
true
if class is modified, false
if not+public void setModified()+
+
+public boolean isComplete()+
+
true
if class is complete, false
if not+protected int computeHashCode()+
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.
++
+public void codeComplete()+
+
+public int hashCode()+
codeComplete()
method is called.
++
hashCode
in class java.lang.Object
+public static boolean equalFieldOrMethods(org.apache.bcel.classfile.FieldOrMethod a, + org.apache.bcel.classfile.FieldOrMethod b)+
+
a
- first field or method itemb
- second field or method item
+true
if the equal, false
if not+public static boolean equalMethods(org.apache.bcel.classfile.Method a, + org.apache.bcel.classfile.Method b)+
+
a
- first methodb
- second method
+true
if the equal, false
if not+public boolean equals(java.lang.Object obj)+
codeComplete()
method is called.
++
equals
in class java.lang.Object
true
if equal objects, false
if not+public void delete()+
+
+public void writeFile(java.io.OutputStream os) + throws java.io.IOException+
+
os
- output stream for writing modified class
+java.io.IOException
- if error writing to file+public void writeFile() + throws java.io.IOException+
+
java.io.IOException
- if error writing to file+public java.lang.String deriveClassName(java.lang.String prefix, + java.lang.String suffix)+
+
prefix
- generated class name prefixsuffix
- generated class name suffix
++public static void setPaths(java.lang.String[] paths)+
+
paths
- ordered set of paths to be searched for class files+public static java.lang.Class loadClass(java.lang.String name)+
+
name
- fully qualified name of class to be loaded
+null
if not found
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.apache.bcel.generic.InstructionFactory + org.jibx.binding.classes.InstructionBuilder ++
public class InstructionBuilder
+Instruction builder. Extends the basic instruction construction tools in + BCEL with some convenience methods. +
+ +
+
+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.InvokeInstruction |
+createCallInit(java.lang.String name,
+ java.lang.String signature)
+
++ Create invoke initializer instruction from signature. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallInterface(ClassItem item)
+
++ Create invoke instruction for interface method. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallInterface(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke interface method instruction from signature. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallStatic(ClassItem item)
+
++ Create invoke instruction for static method. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallStatic(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke static method instruction from signature. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallVirtual(ClassItem item)
+
++ Create invoke instruction for virtual method. |
+
+ org.apache.bcel.generic.InvokeInstruction |
+createCallVirtual(java.lang.String method,
+ java.lang.String signature)
+
++ Create invoke virtual method instruction from signature. |
+
+ org.apache.bcel.generic.FieldInstruction |
+createGetField(ClassItem item)
+
++ Create getfield instruction. |
+
+ org.apache.bcel.generic.FieldInstruction |
+createGetStatic(ClassItem item)
+
++ Create getstatic instruction. |
+
+ org.apache.bcel.generic.CompoundInstruction |
+createLoadConstant(int value)
+
++ Create load constant instruction. |
+
+ org.apache.bcel.generic.CompoundInstruction |
+createLoadConstant(java.lang.Object value)
+
++ Create load constant instruction. |
+
+ org.apache.bcel.generic.CompoundInstruction |
+createLoadConstant(java.lang.String value)
+
++ Create load constant instruction. |
+
+ org.apache.bcel.generic.FieldInstruction |
+createPutField(ClassItem item)
+
++ Create putfield instruction. |
+
+ org.apache.bcel.generic.FieldInstruction |
+createPutStatic(ClassItem item)
+
++ Create putstatic instruction. |
+
+ org.apache.bcel.generic.ConstantPoolGen |
+getConstantPoolGen()
+
++ 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 | +
---|
+public InstructionBuilder(org.apache.bcel.generic.ClassGen cg, + org.apache.bcel.generic.ConstantPoolGen cp)+
+
cg
- class generation informationcp
- constant pool generator+Method Detail | +
---|
+public org.apache.bcel.generic.ConstantPoolGen getConstantPoolGen()+
+
+public org.apache.bcel.generic.CompoundInstruction createLoadConstant(int value)+
+
value
- constant value to be loaded
++public org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.String value)+
String
reference
+ from the constant pool.
++
value
- constant value to be loaded
++public org.apache.bcel.generic.CompoundInstruction createLoadConstant(java.lang.Object value)+
+
value
- constant value to be loaded
++public org.apache.bcel.generic.FieldInstruction createGetField(ClassItem item)+
+
item
- information for field to be set
++public org.apache.bcel.generic.FieldInstruction createPutField(ClassItem item)+
+
item
- information for field to be set
++public org.apache.bcel.generic.FieldInstruction createGetStatic(ClassItem item)+
+
item
- information for field to be set
++public org.apache.bcel.generic.FieldInstruction createPutStatic(ClassItem item)+
+
item
- information for field to be set
++public org.apache.bcel.generic.InvokeInstruction createCallStatic(ClassItem item)+
+
item
- information for method to be called
++public org.apache.bcel.generic.InvokeInstruction createCallVirtual(ClassItem item)+
+
item
- information for method to be called
++public org.apache.bcel.generic.InvokeInstruction createCallInterface(ClassItem item)+
+
item
- information for method to be called
++public org.apache.bcel.generic.InvokeInstruction createCallStatic(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified class and method namesignature
- method signature in standard form
++public org.apache.bcel.generic.InvokeInstruction createCallVirtual(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified class and method namesignature
- method signature in standard form
++public org.apache.bcel.generic.InvokeInstruction createCallInterface(java.lang.String method, + java.lang.String signature)+
+
method
- fully qualified interface and method namesignature
- method signature in standard form
++public org.apache.bcel.generic.InvokeInstruction createCallInit(java.lang.String name, + java.lang.String signature)+
+
name
- fully qualified class namesignature
- method signature in standard form
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.binding.classes.BindingMethod + org.jibx.binding.classes.MethodBuilder + org.jibx.binding.classes.ExceptionMethodBuilder + org.jibx.binding.classes.ContextMethodBuilder ++
public class ContextMethodBuilder
+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. +
+ +
+
+Field Summary | +|
---|---|
+private int |
+m_contextSlot
+
++ Variable slot for context reference. |
+
+private java.lang.String |
+m_contextType
+
++ Context type as accessed by method. |
+
+private boolean |
+m_isStatic
+
++ Context type as accessed by method. |
+
+private int |
+m_objectSlot
+
++ Variable slot for current object reference. |
+
+private java.lang.String |
+m_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 | +|
---|---|
+ boolean |
+isStaticMethod()
+
++ Check if method is static. |
+
+ void |
+loadContext()
+
++ Append instruction to load context to stack. |
+
+ void |
+loadContext(java.lang.String type)
+
++ Append instruction(s) to load context to stack as specified type. |
+
+ void |
+loadObject()
+
++ Append instruction to load object to stack. |
+
+ void |
+loadObject(java.lang.String type)
+
++ Append instruction(s) to load object to stack as specified type. |
+
+ void |
+setObjectSlot(int slot)
+
++ Set current object slot. |
+
+ void |
+storeObject()
+
++ 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.BindingMethod | +
---|
computeMethodHash, equals, getClassFile, makeAccessible |
+
Methods inherited from class java.lang.Object | +
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+private int m_objectSlot+
+
+private java.lang.String m_objectType+
+
+private int m_contextSlot+
+
+private java.lang.String m_contextType+
+
+private final boolean m_isStatic+
+
+Constructor Detail | +
---|
+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+
+
name
- method name to be builtret
- method return typeargs
- types of argumentscf
- owning class file informationaccess
- flags for method accessobj
- variable slot for current object (negative value if to be
+ defined later)type
- current object type as defined in methodctx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in method
+JiBXException
- on error in initializing method construction+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+
+
name
- method name to be builtsig
- method signaturecf
- owning class file informationaccess
- flags for method accessobj
- variable slot for current object (negative value if to be
+ defined later)type
- current object typectx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in method
+JiBXException
- on error in initializing method construction+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+
+
name
- method name to be builtsig
- method signaturecf
- owning class file informationobj
- variable slot for current object (negative value if to be
+ defined later)type
- current object typectx
- variable slot for marshalling/unmarshalling contextctype
- context type as defined in method
+JiBXException
- on error in initializing method construction+Method Detail | +
---|
+public void setObjectSlot(int slot)+
+
slot
- local variable slot for current object+public void loadObject()+
+
+public void storeObject()+
+
+public void loadObject(java.lang.String type)+
+
type
- loaded type expected on stack+public void loadContext()+
+
+public void loadContext(java.lang.String type)+
+
type
- loaded type expected on stack+public boolean isStaticMethod()+
+
true
if static, false
if not
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+addAttribute(int index,
+ java.lang.String name,
+ java.lang.String value)
+
++ Add attribute to current open start tag. |
+
+ void |
+close()
+
++ Close document output. |
+
+ void |
+closeEmptyTag()
+
++ Close the current open start tag as an empty element. |
+
+ void |
+closeStartTag()
+
++ Close the current open start tag. |
+
+ void |
+endTag(int index,
+ java.lang.String name)
+
++ Generate end tag. |
+
+ void |
+flush()
+
++ Flush document output. |
+
+ java.lang.String[][] |
+getExtensionNamespaces()
+
++ Get extension namespace URIs added to those in mapping. |
+
+ int |
+getNamespaceCount()
+
++ Get the number of namespaces currently defined. |
+
+ java.lang.String |
+getNamespacePrefix(int index)
+
++ Get current prefix defined for namespace. |
+
+ java.lang.String[] |
+getNamespaces()
+
++ Get namespace URIs for mapping. |
+
+ java.lang.String |
+getNamespaceUri(int index)
+
++ Get URI for namespace. |
+
+ int |
+getNestingDepth()
+
++ Get the current element nesting depth. |
+
+ int |
+getPrefixIndex(java.lang.String prefix)
+
++ Get index of namespace mapped to prefix. |
+
+ void |
+indent()
+
++ Request output indent. |
+
+ int[] |
+openNamespaces(int[] nums,
+ java.lang.String[] prefs)
+
++ Open the specified namespaces for use. |
+
+ void |
+popExtensionNamespaces()
+
++ Remove extension namespace URIs. |
+
+ void |
+pushExtensionNamespaces(java.lang.String[] uris)
+
++ Append extension namespace URIs to those in mapping. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+setIndentSpaces(int count,
+ java.lang.String newline,
+ char indent)
+
++ Set nesting indentation. |
+
+ void |
+startTagClosed(int index,
+ java.lang.String name)
+
++ Generate closed start tag. |
+
+ void |
+startTagNamespaces(int index,
+ java.lang.String name,
+ int[] nums,
+ java.lang.String[] prefs)
+
++ Generate start tag for element with namespaces. |
+
+ void |
+startTagOpen(int index,
+ java.lang.String name)
+
++ Generate open start tag. |
+
+ void |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+ void |
+writeComment(java.lang.String text)
+
++ Write comment to document. |
+
+ void |
+writeDocType(java.lang.String name,
+ java.lang.String sys,
+ java.lang.String pub,
+ java.lang.String subset)
+
++ Write DOCTYPE declaration to document. |
+
+ void |
+writeEntityRef(java.lang.String name)
+
++ Write entity reference to document. |
+
+ void |
+writePI(java.lang.String target,
+ java.lang.String data)
+
++ Write processing instruction to document. |
+
+ void |
+writeTextContent(java.lang.String text)
+
++ Write ordinary character data text content to document. |
+
+ void |
+writeXMLDecl(java.lang.String version,
+ java.lang.String encoding,
+ java.lang.String standalone)
+
++ Write XML declaration to document. |
+
+Method Detail | +
---|
+int getNestingDepth()+
+
+int getNamespaceCount()+
+
+void setIndentSpaces(int count, + java.lang.String newline, + char indent)+
+
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+void writeXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + throws java.io.IOException+
+
version
- XML version textencoding
- text for encoding attribute (unspecified if
+ null
)standalone
- text for standalone attribute (unspecified if
+ null
)
+java.io.IOException
- on error writing to document+void startTagOpen(int index, + java.lang.String name) + throws java.io.IOException+
closeStartTag()
call.
++
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+void startTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + throws java.io.IOException+
+
index
- namespace URI index numbername
- element namenums
- 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)
+java.io.IOException
- on error writing to document+void addAttribute(int index, + java.lang.String name, + java.lang.String value) + throws java.io.IOException+
startTagOpen(int, java.lang.String)
and before the corresponding call to closeStartTag()
.
++
index
- namespace URI index numbername
- unqualified attribute namevalue
- text value for attribute
+java.io.IOException
- on error writing to document+void closeStartTag() + throws java.io.IOException+
startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+void closeEmptyTag() + throws java.io.IOException+
startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+void startTagClosed(int index, + java.lang.String name) + throws java.io.IOException+
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+void endTag(int index, + java.lang.String name) + throws java.io.IOException+
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+void writeTextContent(java.lang.String text) + throws java.io.IOException+
+
text
- content value text (must not be null
)
+java.io.IOException
- on error writing to document+void writeCData(java.lang.String text) + throws java.io.IOException+
+
text
- content value text (must not be null
)
+java.io.IOException
- on error writing to document+void writeComment(java.lang.String text) + throws java.io.IOException+
+
text
- comment text (must not be null
)
+java.io.IOException
- on error writing to document+void writeEntityRef(java.lang.String name) + throws java.io.IOException+
+
name
- entity name (must not be null
)
+java.io.IOException
- on error writing to document+void writeDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + throws java.io.IOException+
+
name
- root element namesys
- 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)
+java.io.IOException
- on error writing to document+void writePI(java.lang.String target, + java.lang.String data) + throws java.io.IOException+
+
target
- processing instruction target name (must not be
+ null
)data
- processing instruction data (must not be null
)
+java.io.IOException
- on error writing to document+void indent() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+void flush() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+void close() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+void reset()+
+
+java.lang.String[] getNamespaces()+
+
+java.lang.String getNamespaceUri(int index)+
+
index
- namespace URI index number
+null
if the namespace index
+ is invalid+java.lang.String getNamespacePrefix(int index)+
+
index
- namespace URI index number
+null
if the namespace is not
+ currently mapped+int getPrefixIndex(java.lang.String prefix)+
+
prefix
- text to match (non-null
, use "" for default
+ prefix)
++void pushExtensionNamespaces(java.lang.String[] uris)+
+
uris
- namespace URIs to extend those in mapping+void popExtensionNamespaces()+
pushExtensionNamespaces(java.lang.String[])
.
++
+java.lang.String[][] getExtensionNamespaces()+
+
null
if
+ none)+int[] openNamespaces(int[] nums, + java.lang.String[] prefs) + throws java.io.IOException+
+
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)
+java.io.IOException
- on error writing to document
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface IAbstractMarshaller
+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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+baseMarshal(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 | +
---|
+void baseMarshal(java.lang.Object obj, + IMarshallingContext ctx) + throws JiBXException+
+
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
+JiBXException
- on error in marshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ int |
+JiBX_getIndex()
+
++ Get class index. |
+
+ void |
+marshal(IMarshallingContext ctx)
+
++ Marshal self. |
+
+Method Detail | +
---|
+int JiBX_getIndex()+
+
+void marshal(IMarshallingContext ctx) + throws JiBXException+
+
ctx
- marshalling context
+JiBXException
- on error in marshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.Throwable + java.lang.Exception + org.jibx.runtime.JiBXException + org.jibx.runtime.RecoverableException ++
public class RecoverableException
+Recoverable exception class. This is used for non-fatal errors in marshalling + and unmarshalling. +
+ +
+
+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 | +
---|
+public RecoverableException(java.lang.String msg)+
+
msg
- message describing the exception condition+public RecoverableException(java.lang.String msg, + java.lang.Throwable root)+
+
msg
- message describing the exception conditionroot
- exception which caused this exception
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ java.lang.String |
+getDocumentName()
+
++ Return the supplied document name. |
+
+ int |
+getStackDepth()
+
++ Get current unmarshalling object stack depth. |
+
+ java.lang.Object |
+getStackObject(int depth)
+
++ Get object from unmarshalling stack. |
+
+ java.lang.Object |
+getStackTop()
+
++ Get top object on unmarshalling stack. |
+
+ IUnmarshaller |
+getUnmarshaller(int index)
+
++ Find the unmarshaller for a particular class index in the current + context. |
+
+ boolean |
+isAt(java.lang.String ns,
+ java.lang.String name)
+
++ Check if next tag is start of element. |
+
+ boolean |
+isEnd()
+
++ Check if next tag is an end tag. |
+
+ void |
+popObject()
+
++ Pop unmarshalled object from stack. |
+
+ void |
+pushObject(java.lang.Object obj)
+
++ Push created object to unmarshalling stack. |
+
+ void |
+reset()
+
++ Reset unmarshalling information. |
+
+ void |
+setDocument(java.io.InputStream ins,
+ java.lang.String enc)
+
++ Set document to be parsed from stream. |
+
+ void |
+setDocument(java.io.InputStream ins,
+ java.lang.String name,
+ java.lang.String enc)
+
++ Set named document to be parsed from stream. |
+
+ void |
+setDocument(java.io.Reader rdr)
+
++ Set document to be parsed from reader. |
+
+ void |
+setDocument(java.io.Reader rdr,
+ java.lang.String name)
+
++ Set named document to be parsed from reader. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.InputStream ins,
+ java.lang.String enc)
+
++ Unmarshal document from stream to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.InputStream ins,
+ java.lang.String name,
+ java.lang.String enc)
+
++ Unmarshal named document from stream to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.Reader rdr)
+
++ Unmarshal document from reader to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.Reader rdr,
+ java.lang.String name)
+
++ Unmarshal named document from reader to object. |
+
+ java.lang.Object |
+unmarshalElement()
+
++ Unmarshal the current element. |
+
+Method Detail | +
---|
+void setDocument(java.io.InputStream ins, + java.lang.String enc) + throws JiBXException+
+
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+void setDocument(java.io.Reader rdr) + throws JiBXException+
+
rdr
- reader supplying document data
+JiBXException
- if error creating parser+void setDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + throws JiBXException+
+
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+void setDocument(java.io.Reader rdr, + java.lang.String name) + throws JiBXException+
+
rdr
- reader supplying document dataname
- document name
+JiBXException
- if error creating parser+void reset()+
+
+java.lang.Object unmarshalElement() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+java.lang.Object unmarshalDocument(java.io.InputStream ins, + java.lang.String enc) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
++
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+java.lang.Object unmarshalDocument(java.io.Reader rdr) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
++
rdr
- reader supplying document data
+JiBXException
- if error creating parser+java.lang.Object unmarshalDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
++
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+java.lang.Object unmarshalDocument(java.io.Reader rdr, + java.lang.String name) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String)
were called, followed by unmarshalElement()
++
rdr
- reader supplying document dataname
- document name
+JiBXException
- if error creating parser+java.lang.String getDocumentName()+
+
null
if none)+boolean isAt(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+true
if at start of element with supplied name,
+ false
if not
+JiBXException
- on any error (possibly wrapping other exception)+boolean isEnd() + throws JiBXException+
+
true
if at end of element, false
if
+ at start
+JiBXException
- on any error (possibly wrapping other exception)+IUnmarshaller getUnmarshaller(int index) + throws JiBXException+
+
index
- class index for unmarshalling definition
+JiBXException
- if unable to create unmarshaller+void pushObject(java.lang.Object obj)+
+
obj
- object being unmarshalled+void popObject() + throws JiBXException+
+
JiBXException
- if stack empty+int getStackDepth()+
+
+java.lang.Object getStackObject(int depth)+
+
depth
- object depth in stack to be retrieved (must be in the range
+ of zero to the current depth minus one).
++java.lang.Object getStackTop()+
+
null
if none
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.Utility ++
public abstract class Utility
+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. +
+ +
+
+Field Summary | +|
---|---|
+private static java.util.Date |
+BEGINNING_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 long |
+LMSPERDAY
+
++ Number of milliseconds in a day as a long. |
+
+static int |
+MINIMUM_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 long |
+MSPERAVGYEAR
+
++ Average number of milliseconds in a year within century. |
+
+private static long |
+MSPERCENTURY
+
++ Number of milliseconds in a normal century. |
+
+private static int |
+MSPERDAY
+
++ Number of milliseconds in a day. |
+
+private static int |
+MSPERHOUR
+
++ Number of milliseconds in an hour. |
+
+private static int |
+MSPERMINUTE
+
++ Number of milliseconds in a minute. |
+
+private static long |
+MSPERYEAR
+
++ Number of milliseconds in a (non-leap) year. |
+
+private static char |
+PAD_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 long |
+TIME_BASE
+
++ Millisecond value of base time for internal representation. |
+
+Constructor Summary | +|
---|---|
Utility()
+
++ |
+
+Method Summary | +|
---|---|
+static java.util.List |
+arrayListFactory()
+
++ Factory method to create a java.util.ArrayList as the
+ implementation of a java.util.List . |
+
+private static int |
+decodeChunk(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 char |
+deserializeCharString(java.lang.String text)
+
++ Deserialize char value from text as character value. |
+
+static java.util.Date |
+deserializeDate(java.lang.String text)
+
++ Deserialize date from text. |
+
+static java.util.Date |
+deserializeDateTime(java.lang.String text)
+
++ Deserialize date from general dateTime text. |
+
+static java.sql.Date |
+deserializeSqlDate(java.lang.String text)
+
++ Deserialize SQL date from text. |
+
+static java.sql.Time |
+deserializeSqlTime(java.lang.String text)
+
++ Deserialize time from text. |
+
+static java.sql.Timestamp |
+deserializeTimestamp(java.lang.String text)
+
++ Deserialize timestamp from general dateTime text. |
+
+static void |
+encodeChunk(int base,
+ byte[] byts,
+ java.lang.StringBuffer buff)
+
++ Encode a chunk of data to base64 encoding. |
+
+static int |
+enumValue(java.lang.String target,
+ java.lang.String[] enums,
+ int[] vals)
+
++ Find text value in enumeration. |
+
+protected static void |
+formatTwoDigits(int value,
+ java.lang.StringBuffer buff)
+
++ Format a positive number as two digits. |
+
+protected static void |
+formatYear(long value,
+ java.lang.StringBuffer buff)
+
++ Format time in milliseconds to year number. |
+
+protected static long |
+formatYearMonth(long value,
+ java.lang.StringBuffer buff)
+
++ Format time in milliseconds to year number and month number. |
+
+protected static int |
+formatYearMonthDay(long value,
+ java.lang.StringBuffer buff)
+
++ Format time in milliseconds to year number, month number, and day + number. |
+
+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. |
+
+static java.lang.Object |
+growArray(java.lang.Object base)
+
++ Grow array of arbitrary type. |
+
+static boolean |
+isEqual(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 boolean |
+parseBoolean(java.lang.String text)
+
++ Parse boolean value from text. |
+
+static byte |
+parseByte(java.lang.String text)
+
++ Parse byte value from text. |
+
+static char |
+parseChar(java.lang.String text)
+
++ Parse char value from text as unsigned 16-bit integer. |
+
+static char |
+parseCharString(java.lang.String text)
+
++ Parse char value from text as character value. |
+
+static long |
+parseDate(java.lang.String text)
+
++ Convert date text to Java date. |
+
+static long |
+parseDateTime(java.lang.String text)
+
++ Parse general dateTime value from text. |
+
+private static int |
+parseDigits(java.lang.String text,
+ int offset,
+ int length)
+
++ Parse digits in text as integer value. |
+
+static double |
+parseDouble(java.lang.String text)
+
++ Parse double value from text. |
+
+static float |
+parseFloat(java.lang.String text)
+
++ Parse float value from text. |
+
+static int |
+parseInt(java.lang.String text)
+
++ Parse integer value from text. |
+
+static long |
+parseLong(java.lang.String text)
+
++ Parse long value from text. |
+
+static short |
+parseShort(java.lang.String text)
+
++ Parse short value from text. |
+
+static long |
+parseTime(java.lang.String text,
+ int start,
+ int length)
+
++ Parse general time value from text. |
+
+static long |
+parseYear(java.lang.String text)
+
++ Convert gYear text to Java date. |
+
+static long |
+parseYearMonth(java.lang.String text)
+
++ Convert gYearMonth text to Java date. |
+
+static java.lang.Object |
+resizeArray(int size,
+ java.lang.Object base)
+
++ Resize array of arbitrary type. |
+
+static java.lang.String |
+serializeBase64(byte[] byts)
+
++ Serialize byte array to base64 text. |
+
+static java.lang.String |
+serializeBoolean(boolean value)
+
++ Serialize boolean value to text. |
+
+static java.lang.String |
+serializeByte(byte value)
+
++ Serialize byte value to text. |
+
+static java.lang.String |
+serializeChar(char value)
+
++ Serialize char value to text as unsigned 16-bit integer. |
+
+static java.lang.String |
+serializeCharString(char value)
+
++ Serialize char value to text as string of length one. |
+
+static java.lang.String |
+serializeDate(java.util.Date date)
+
++ Serialize date to general date text. |
+
+static java.lang.String |
+serializeDate(long time)
+
++ Serialize time to general date text. |
+
+static java.lang.String |
+serializeDateTime(java.util.Date date)
+
++ Serialize date to general dateTime text. |
+
+static java.lang.String |
+serializeDateTime(long time)
+
++ Serialize time to general dateTime text. |
+
+static java.lang.String |
+serializeDateTime(long time,
+ boolean zone)
+
++ Serialize time to general dateTime text. |
+
+static java.lang.String |
+serializeDouble(double value)
+
++ Serialize double value to text. |
+
+static java.lang.String |
+serializeFloat(float value)
+
++ Serialize float value to text. |
+
+static java.lang.String |
+serializeInt(int value)
+
++ Serialize int value to text. |
+
+static java.lang.String |
+serializeLong(long value)
+
++ Serialize long value to text. |
+
+static java.lang.String |
+serializeShort(short value)
+
++ Serialize short value to text. |
+
+static java.lang.String |
+serializeSqlDate(java.sql.Date date)
+
++ Serialize SQL date to general date text. |
+
+static java.lang.String |
+serializeSqlTime(java.sql.Time time)
+
++ Serialize time to standard text. |
+
+static void |
+serializeTime(int time,
+ java.lang.StringBuffer buff)
+
++ Serialize time to general time text in buffer. |
+
+static java.lang.String |
+serializeTimestamp(java.sql.Timestamp stamp)
+
++ Serialize timestamp to general dateTime text. |
+
+static java.lang.String |
+serializeYear(java.util.Date date)
+
++ Serialize date to general gYear text. |
+
+static java.lang.String |
+serializeYear(long time)
+
++ Serialize time to general gYear text. |
+
+static java.lang.String |
+serializeYearMonth(java.util.Date date)
+
++ Serialize date to general gYearMonth text. |
+
+static java.lang.String |
+serializeYearMonth(long time)
+
++ Serialize time to general gYearMonth text. |
+
+private static int |
+validateDate(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 | +
---|
+public static final int MINIMUM_GROWN_ARRAY_SIZE+
growArray(java.lang.Object)
.
++
+private static final int MSPERMINUTE+
+
+private static final int MSPERHOUR+
+
+private static final int MSPERDAY+
+
+private static final long LMSPERDAY+
+
+private static final long MSPERYEAR+
+
+private static final long MSPERAVGYEAR+
+
+private static final long MSPERCENTURY+
+
+private static final long TIME_BASE+
+
+private static final int[] MONTHS_NONLEAP+
+
+private static final int[] MONTHS_LEAP+
+
+private static final long[] BIAS_MONTHMS+
+
+private static java.util.Date BEGINNING_OF_TIME+
+
+private static final char PAD_CHAR+
+
+private static final char[] s_base64Chars+
+
+private static final byte[] s_base64Values+
+
+Constructor Detail | +
---|
+public Utility()+
+Method Detail | +
---|
+private static int parseDigits(java.lang.String text, + int offset, + int length) + throws JiBXException+
+
text
- text to be parsedoffset
- starting offset in textlength
- number of digits to be parsed
+JiBXException
- on parse error+public static int parseInt(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeInt(int value)+
+
value
- int value to be serialized
++public static long parseLong(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeLong(long value)+
+
value
- long value to be serialized
++public static long parseYear(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static short parseShort(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeShort(short value)+
+
value
- short value to be serialized
++public static byte parseByte(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeByte(byte value)+
+
value
- byte value to be serialized
++public static boolean parseBoolean(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeBoolean(boolean value)+
+
value
- boolean value to be serialized
++public static char parseChar(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeChar(char value)+
+
value
- char value to be serialized
++public static char parseCharString(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static char deserializeCharString(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed (may be null
)
+JiBXException
- on parse error+public static java.lang.String serializeCharString(char value)+
+
value
- char value to be serialized
++public static float parseFloat(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeFloat(float value)+
+
value
- float value to be serialized
++public static double parseDouble(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.lang.String serializeDouble(double value)+
+
value
- double value to be serialized
++public static long parseYearMonth(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static long parseDate(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.util.Date deserializeDate(java.lang.String text) + throws JiBXException+
null
input.
++
text
- text to be parsed (may be null
)
+null
if passed null
+ input
+JiBXException
- on parse error+private static int validateDate(java.lang.String text) + throws JiBXException+
+
text
-
+JiBXException
- on validation error+public static java.sql.Date deserializeSqlDate(java.lang.String text) + throws JiBXException+
null
input.
++
text
- text to be parsed (may be null
)
+null
if passed null
+ input
+JiBXException
- on parse error+public static long parseTime(java.lang.String text, + int start, + int length) + throws JiBXException+
+
text
- text to be parsedstart
- offset of first character of time valuelength
- number of characters in time value
+JiBXException
- on parse error+public static long parseDateTime(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed
+JiBXException
- on parse error+public static java.util.Date deserializeDateTime(java.lang.String text) + throws JiBXException+
null
input.
++
text
- text to be parsed (may be null
)
+null
if passed null
+ input
+JiBXException
- on parse error+public static java.sql.Timestamp deserializeTimestamp(java.lang.String text) + throws JiBXException+
null
input.
++
text
- text to be parsed (may be null
)
+null
if passed
+ null
input
+JiBXException
- on parse error+public static java.sql.Time deserializeSqlTime(java.lang.String text) + throws JiBXException+
null
input.
++
text
- text to be parsed (may be null
)
+null
if passed null
+ input
+JiBXException
- on parse error+protected static void formatYearNumber(long year, + java.lang.StringBuffer buff)+
+
year
- number to be formattedbuff
- text formatting buffer+protected static void formatTwoDigits(int value, + java.lang.StringBuffer buff)+
+
value
- number to be formatted (0
to 99
)buff
- text formatting buffer+protected static void formatYear(long value, + java.lang.StringBuffer buff)+
+
value
- time in milliseconds to be converted (from 1 C.E.)buff
- text formatting buffer+protected static long formatYearMonth(long value, + java.lang.StringBuffer buff)+
+
value
- time in milliseconds to be converted (from 1 C.E.)buff
- text formatting buffer
++protected static int formatYearMonthDay(long value, + java.lang.StringBuffer buff)+
+
value
- time in milliseconds to be converted (from 1 C.E.)buff
- text formatting buffer
++public static java.lang.String serializeYear(long time) + throws JiBXException+
+
time
- time to be converted, as milliseconds from January 1, 1970
+JiBXException
- on conversion error+public static java.lang.String serializeYear(java.util.Date date) + throws JiBXException+
+
date
- date to be converted
+JiBXException
- on conversion error+public static java.lang.String serializeYearMonth(long time) + throws JiBXException+
+
time
- time to be converted, as milliseconds from January 1, 1970
+JiBXException
- on conversion error+public static java.lang.String serializeYearMonth(java.util.Date date) + throws JiBXException+
+
date
- date to be converted
+JiBXException
- on conversion error+public static java.lang.String serializeDate(long time) + throws JiBXException+
+
time
- time to be converted, as milliseconds from January 1, 1970
+JiBXException
- on conversion error+public static java.lang.String serializeDate(java.util.Date date) + throws JiBXException+
+
date
- date to be converted
+JiBXException
- on conversion error+public static java.lang.String serializeSqlDate(java.sql.Date date) + throws JiBXException+
+
date
- date to be converted
+JiBXException
- on conversion error+public static void serializeTime(int time, + java.lang.StringBuffer buff) + throws JiBXException+
+
time
- time to be converted, as milliseconds in daybuff
- buffer for appending time text
+JiBXException
- on conversion error+public static java.lang.String serializeDateTime(long time, + boolean zone) + throws JiBXException+
+
time
- time to be converted, as milliseconds from January 1, 1970zone
- flag for trailing 'Z' to be appended to indicate UTC
+JiBXException
- on conversion error+public static java.lang.String serializeDateTime(long time) + throws JiBXException+
+
time
- time to be converted, as milliseconds from January 1, 1970
+JiBXException
- on conversion error+public static java.lang.String serializeDateTime(java.util.Date date) + throws JiBXException+
+
date
- date to be converted
+JiBXException
- on conversion error+public static java.lang.String serializeTimestamp(java.sql.Timestamp stamp) + throws JiBXException+
+
stamp
- timestamp to be converted
+JiBXException
- on conversion error+public static java.lang.String serializeSqlTime(java.sql.Time time) + throws JiBXException+
+
time
- time to be converted
+JiBXException
- on conversion error+public static boolean isEqual(java.lang.Object a, + java.lang.Object b)+
+
a
- first object to be comparedb
- second object to be compared
+true
if both objects are null
, or if
+ a.equals(b)
; false
otherwise+public static int enumValue(java.lang.String target, + java.lang.String[] enums, + int[] vals) + throws JiBXException+
+
target
- text to be found in enumerationenums
- ordered array of texts included in enumerationvals
- array of values to be returned for corresponding text match
+ positions (position returned directly if this is null
)
+JiBXException
- if target text not found in enumeration+private static int decodeChunk(int base, + char[] chrs, + int fill, + byte[] byts) + throws JiBXException+
+
base
- starting offset within base64 character arraychrs
- character array for base64 text representationfill
- starting offset within byte data arraybyts
- byte data array
+JiBXException
- if invalid character in base64 representation+public static byte[] parseBase64(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed (may include extra characters)
+JiBXException
- if invalid character in base64 representation+public static byte[] deserializeBase64(java.lang.String text) + throws JiBXException+
+
text
- text to be parsed (may be null, or include extra characters)
+JiBXException
- if invalid character in base64 representation+public static void encodeChunk(int base, + byte[] byts, + java.lang.StringBuffer buff)+
+
base
- starting offset within byte arraybyts
- byte data arraybuff
- buffer for encoded text+public static java.lang.String serializeBase64(byte[] byts)+
+
byts
- byte data array
++public static java.lang.Object resizeArray(int size, + java.lang.Object base)+
+
size
- new aray sizebase
- array to be resized
++public static java.lang.Object growArray(java.lang.Object base)+
+
base
- array to be grown
++public static java.util.List arrayListFactory()+
java.util.ArrayList
as the
+ implementation of a java.util.List
.
++
java.util.ArrayList
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.Throwable + java.lang.Exception + org.jibx.runtime.JiBXException + org.jibx.runtime.UnrecoverableException ++
public class UnrecoverableException
+Unrecoverable exception class. This is used for fatal errors in marshalling + and unmarshalling. +
+ +
+
+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 | +
---|
+public UnrecoverableException(java.lang.String msg)+
+
msg
- message describing the exception condition+public UnrecoverableException(java.lang.String msg, + java.lang.Throwable root)+
+
msg
- message describing the exception conditionroot
- exception which caused this exception
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ int |
+jibx_getColumnNumber()
+
++ Get source document column number. |
+
+ java.lang.String |
+jibx_getDocumentName()
+
++ Get source document name. |
+
+ int |
+jibx_getLineNumber()
+
++ Get source document line number. |
+
+Method Detail | +
---|
+java.lang.String jibx_getDocumentName()+
+
null
if none+int jibx_getLineNumber()+
+
-1
if unknown+int jibx_getColumnNumber()+
+
-1
if unknown
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.BindingDirectory ++
public abstract class BindingDirectory
+Abstract class with static method to find the binding factory corresponding + to a binding name. +
+ +
+
+Field Summary | +|
---|---|
+static java.lang.String |
+BINDINGFACTORY_PREFIX
+
++ Prefix of binding factory name. |
+
+static java.lang.String |
+BINDINGFACTORY_SUFFIX
+
++ Suffix of binding factory name. |
+
+static java.lang.String |
+BINDINGLIST_NAME
+
++ Name of String[] field giving binding factory name list. |
+
+static java.lang.Class[] |
+EMPTY_ARGS
+
++ Empty argument list. |
+
+static java.lang.String |
+FACTORY_INSTMETHOD
+
++ Binding factory method to get instance of factory. |
+
+Constructor Summary | +|
---|---|
BindingDirectory()
+
++ |
+
+Method Summary | +|
---|---|
+private static java.lang.String |
+getBindingList(java.lang.Class clas)
+
++ Get list of bindings for class. |
+
+static IBindingFactory |
+getFactory(java.lang.Class clas)
+
++ Get instance of binding factory. |
+
+static IBindingFactory |
+getFactory(java.lang.String name,
+ java.lang.Class clas)
+
++ Get instance of binding factory. |
+
+private static IBindingFactory |
+getFactoryFromName(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 | +
---|
+public static final java.lang.String BINDINGLIST_NAME+
String[]
field giving binding factory name list.
++
+public static final java.lang.String BINDINGFACTORY_PREFIX+
+
+public static final java.lang.String BINDINGFACTORY_SUFFIX+
+
+public static final java.lang.String FACTORY_INSTMETHOD+
+
+public static final java.lang.Class[] EMPTY_ARGS+
+
+Constructor Detail | +
---|
+public BindingDirectory()+
+Method Detail | +
---|
+private static java.lang.String getBindingList(java.lang.Class clas) + throws JiBXException+
+
clas
- class with top-level mapping in binding
+JiBXException
- on error accessing binding information+private static IBindingFactory getFactoryFromName(java.lang.String name, + java.lang.Class clas) + throws JiBXException+
+
name
- fully qualified name of factory classclas
- class with class loader to be used for loading factory
+JiBXException
- on error loading or accessing factory+public static IBindingFactory getFactory(java.lang.String name, + java.lang.Class clas) + throws JiBXException+
+
name
- binding nameclas
- target class for binding
+JiBXException
- on any error in finding or accessing factory+public static IBindingFactory getFactory(java.lang.Class clas) + throws JiBXException+
+
clas
- target class for binding
+JiBXException
- on any error in finding or accessing factory
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.EnumSet ++
public class EnumSet
+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.
+
+ +
+
+Nested Class Summary | +|
---|---|
+static class |
+EnumSet.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 int |
+VALUE_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.String |
+getName(int value)
+
++ Get name for value. |
+
+ int |
+getValue(java.lang.String name)
+
++ Get value for name if defined. |
+
+ int |
+getValueChecked(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 | +
---|
+public static final int VALUE_LIMIT+
int
value supported for enumerations.
++
+private final EnumSet.EnumItem[] m_items+
+
+private final java.lang.String[] m_indexedNames+
+
+private final java.lang.String[] m_orderedNames+
+
+private final int[] m_orderedIndexes+
+
+Constructor Detail | +
---|
+public EnumSet(EnumSet.EnumItem[] items)+
+
items
- array of enumeration items (will be reordered)+public EnumSet(int start, + java.lang.String[] names)+
+
start
- item value for first added namenames
- array of names (no null
entries allowed)+public EnumSet(EnumSet base, + int start, + java.lang.String[] names)+
+
base
- base enumeration to be extendedstart
- item value for first added namenames
- array of names (no null
entries allowed)+Method Detail | +
---|
+private static EnumSet.EnumItem[] buildItems(int start, + java.lang.String[] names)+
+
start
- item value for first added namenames
- array of names (no null
entries allowed)+private static EnumSet.EnumItem[] mergeItems(EnumSet base, + int start, + java.lang.String[] names)+
+
base
- base enumeration to be extendedstart
- item value for first added namenames
- array of names (no null
entries allowed)+public java.lang.String getName(int value)+
+
value
- enumeration value
++public int getValue(java.lang.String name)+
+
name
- possible enumeration name
+-1
if not found in enumeration+public int getValueChecked(java.lang.String name)+
+
name
- enumeration name
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+endDocument()
+
++ End document. |
+
+ int |
+getIndent()
+
++ Get current nesting indent spaces. |
+
+ IMarshaller |
+getMarshaller(int index,
+ java.lang.String name)
+
++ Find the marshaller for a particular class index + in the current context. |
+
+ int |
+getStackDepth()
+
++ Get current marshalling object stack depth. |
+
+ java.lang.Object |
+getStackObject(int depth)
+
++ Get object from marshalling stack. |
+
+ java.lang.Object |
+getStackTop()
+
++ Get top object on marshalling stack. |
+
+ IXMLWriter |
+getXmlWriter()
+
++ Get the writer being used for output. |
+
+ void |
+marshalDocument(java.lang.Object root)
+
++ Marshal document from root object without XML declaration. |
+
+ void |
+marshalDocument(java.lang.Object root,
+ java.lang.String enc,
+ java.lang.Boolean alone)
+
++ Marshal document from root object. |
+
+ void |
+marshalDocument(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. |
+
+ void |
+marshalDocument(java.lang.Object root,
+ java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.Writer outw)
+
++ Marshal document from root object to writer. |
+
+ void |
+popObject()
+
++ Pop marshalled object from stack. |
+
+ void |
+pushObject(java.lang.Object obj)
+
++ Push created object to marshalling stack. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+setIndent(int count)
+
++ Set nesting indent spaces. |
+
+ void |
+setIndent(int count,
+ java.lang.String newline,
+ char indent)
+
++ Set nesting indentation. |
+
+ void |
+setOutput(java.io.OutputStream outs,
+ java.lang.String enc)
+
++ Set output stream and encoding. |
+
+ void |
+setOutput(java.io.OutputStream outs,
+ java.lang.String enc,
+ ICharacterEscaper esc)
+
++ Set output stream with encoding and escaper. |
+
+ void |
+setOutput(java.io.Writer outw)
+
++ Set output writer. |
+
+ void |
+setOutput(java.io.Writer outw,
+ ICharacterEscaper esc)
+
++ Set output writer and escaper. |
+
+ void |
+setXmlWriter(IXMLWriter xwrite)
+
++ Set the writer being used for output. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone)
+
++ Start document, writing the XML declaration. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.OutputStream outs)
+
++ Start document with output stream and encoding. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.Writer outw)
+
++ Start document with writer. |
+
+Method Detail | +
---|
+void setOutput(java.io.OutputStream outs, + java.lang.String enc, + ICharacterEscaper esc) + throws JiBXException+
+
outs
- stream for document data outputenc
- document output encoding, or null
uses UTF-8
+ defaultesc
- escaper for writing characters to stream
+JiBXException
- if error setting output+void setOutput(java.io.OutputStream outs, + java.lang.String enc) + throws JiBXException+
+
outs
- stream for document data outputenc
- document output encoding, or null
uses UTF-8
+ default
+JiBXException
- if error setting output+void setOutput(java.io.Writer outw, + ICharacterEscaper esc)+
+
outw
- writer for document data outputesc
- escaper for writing characters+void setOutput(java.io.Writer outw)+
+
outw
- writer for document data output+IXMLWriter getXmlWriter()+
+
+void setXmlWriter(IXMLWriter xwrite)+
+
xwrite
- XML writer used for output+int getIndent()+
+
+void setIndent(int count)+
+
count
- number of spaces to indent per level, or disable
+ indentation if negative+void setIndent(int count, + java.lang.String newline, + char indent)+
+
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+void reset()+
+
+void startDocument(java.lang.String enc, + java.lang.Boolean alone) + throws JiBXException+
+
enc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specified
+JiBXException
- on any error (possibly wrapping other exception)+void startDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + throws JiBXException+
+
enc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specifiedouts
- stream for document data output
+JiBXException
- on any error (possibly wrapping other exception)+void startDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + throws JiBXException+
+
enc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specifiedoutw
- writer for document data output
+JiBXException
- on any error (possibly wrapping other exception)+void endDocument() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+void marshalDocument(java.lang.Object root) + throws JiBXException+
endDocument()
.
++
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the binding
+JiBXException
- on any error (possibly wrapping other exception)+void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call to marshal the root
+ object using this context, and finally a call to endDocument()
.
++
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specified
+JiBXException
- on any error (possibly wrapping other exception)+void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call to marshal the root object using this context,
+ and finally a call to endDocument()
.
++
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specifiedouts
- stream for document data output
+JiBXException
- on any error (possibly wrapping other exception)+void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call
+ to marshal the root object using this context, and finally a call to
+ endDocument()
.
++
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
uses UTF-8 defaultalone
- standalone document flag, null
if not
+ specifiedoutw
- writer for document data output
+JiBXException
- on any error (possibly wrapping other exception)+void pushObject(java.lang.Object obj)+
+
obj
- object being marshalled+void popObject() + throws JiBXException+
+
JiBXException
- if no object on stack+int getStackDepth()+
+
+java.lang.Object getStackObject(int depth)+
+
depth
- object depth in stack to be retrieved (must be in the range
+ of zero to the current depth minus one).
++java.lang.Object getStackTop()+
+
null
if none+IMarshaller getMarshaller(int index, + java.lang.String name) + throws JiBXException+
+
index
- class index for marshalling definitionname
- fully qualified name of class to be marshalled (used only
+ for validation)
+JiBXException
- on any error (possibly wrapping other exception)
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.EnumSet.EnumItem ++
public static class EnumSet.EnumItem
+Enumeration pair information. This gives an int
value along
+ with the associated String
representation.
+
+ +
+
+Field Summary | +|
---|---|
+ java.lang.String |
+m_name
+
++ |
+
+ int |
+m_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 | +
---|
+public final int m_value+
+public final java.lang.String m_name+
+Constructor Detail | +
---|
+public EnumSet.EnumItem(int value, + java.lang.String name)+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+writeAttribute(java.lang.String text,
+ java.io.Writer writer)
+
++ Write attribute value with character entity substitutions. |
+
+ void |
+writeCData(java.lang.String text,
+ java.io.Writer writer)
+
++ Write CDATA to document. |
+
+ void |
+writeContent(java.lang.String text,
+ java.io.Writer writer)
+
++ Write content value with character entity substitutions. |
+
+Method Detail | +
---|
+void writeAttribute(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
text
- attribute value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+void writeContent(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+void writeCData(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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). +
+ +
+
+Method Summary | +|
---|---|
+ boolean |
+isPresent(IUnmarshallingContext ctx)
+
++ Check if instance present in XML. |
+
+ java.lang.Object |
+unmarshal(java.lang.Object obj,
+ IUnmarshallingContext ctx)
+
++ Unmarshal instance of handled class. |
+
+Method Detail | +
---|
+boolean isPresent(IUnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context
+true
if expected parse data found,
+ false
if not
+JiBXException
- on error in unmarshalling process+java.lang.Object unmarshal(java.lang.Object obj, + IUnmarshallingContext ctx) + throws JiBXException+
+
obj
- object to be unmarshalled (may be null
)ctx
- unmarshalling context
+null
)
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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). +
+ +
+
+Method Summary | +|
---|---|
+ boolean |
+isExtension(int index)
+
++ Check if marshaller represents an extension mapping. |
+
+ void |
+marshal(java.lang.Object obj,
+ IMarshallingContext ctx)
+
++ Marshal instance of handled class. |
+
+Method Detail | +
---|
+boolean isExtension(int index)+
+
index
- abstract mapping index to be checked
+true
if this mapping is an extension of the abstract
+ mapping, false
if not+void marshal(java.lang.Object obj, + IMarshallingContext ctx) + throws JiBXException+
+
obj
- object to be marshalled (may be null
if property
+ is not optional)ctx
- XML text output context
+JiBXException
- on error in marshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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.
+
+ +
+
+ +
+ +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.Throwable + java.lang.Exception + org.jibx.runtime.JiBXException + org.jibx.runtime.RecoverableException + org.jibx.runtime.ValidationException ++
public class ValidationException
+Validation exception class. This is used for marshalling and unmarshalling + errors that relate to data content. +
+ +
+
+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.String |
+addDescription(java.lang.String msg,
+ java.lang.Object obj)
+
++ Add description information for a validation object to message. |
+
+static java.lang.String |
+describe(java.lang.Object obj)
+
++ Get description information for a validation object. |
+
+ java.lang.String |
+getMessage()
+
++ 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 | +
---|
+public ValidationException(java.lang.String msg)+
+
msg
- message describing the exception condition+public ValidationException(java.lang.String msg, + java.lang.Throwable root)+
+
msg
- message describing the exception conditionroot
- exception which caused this exception+public ValidationException(java.lang.String msg, + java.lang.Object obj)+
+
msg
- message describing the exception conditionobj
- source object for validation error+public ValidationException(java.lang.String msg, + java.lang.Throwable root, + java.lang.Object obj)+
+
msg
- message describing the exception conditionroot
- exception which caused this exceptionobj
- source object for validation error+public ValidationException(java.lang.String msg, + java.lang.Object obj, + IUnmarshallingContext ctx)+
+
msg
- message describing the exception conditionobj
- source object for validation errorctx
- context used for unmarshalling+Method Detail | +
---|
+public static java.lang.String describe(java.lang.Object obj)+
Object.toString()
method call.
++
obj
- source object for validation error
++public static java.lang.String addDescription(java.lang.String msg, + java.lang.Object obj)+
describe(java.lang.Object)
call to the supplied message,
+ with some appropriate formatting.
++
msg
- base message textobj
- source object for validation error
++public java.lang.String getMessage()+
+
getMessage
in class java.lang.Throwable
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.lang.Throwable + java.lang.Exception + org.jibx.runtime.JiBXException ++
public class JiBXException
+Binding exception class. This is used for all types of errors that + can be generated by the runtime. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.Throwable |
+m_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.Throwable |
+getRootCause()
+
++ Get root cause exception. |
+
+ void |
+printStackTrace()
+
++ Print stack trace to standard error. |
+
+ void |
+printStackTrace(java.io.PrintStream s)
+
++ Print stack trace to stream. |
+
+ void |
+printStackTrace(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 | +
---|
+private java.lang.Throwable m_rootCause+
+
+Constructor Detail | +
---|
+public JiBXException(java.lang.String msg)+
+
msg
- message describing the exception condition+public JiBXException(java.lang.String msg, + java.lang.Throwable root)+
+
msg
- message describing the exception conditionroot
- exception which caused this exception+Method Detail | +
---|
+public java.lang.Throwable getRootCause()+
+
+public void printStackTrace()+
+
printStackTrace
in class java.lang.Throwable
+public void printStackTrace(java.io.PrintStream s)+
+
printStackTrace
in class java.lang.Throwable
s
- stream for printing stack trace+public void printStackTrace(java.io.PrintWriter s)+
+
printStackTrace
in class java.lang.Throwable
s
- writer for printing stack trace
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +IAbstractMarshaller + +IAliasable + +IBindingFactory + +ICharacterEscaper + +IMarshallable + +IMarshaller + +IMarshallingContext + +ITrackSource + +IUnmarshallable + +IUnmarshaller + +IUnmarshallingContext + +IXMLWriter |
+
+Classes
+
+ +BindingDirectory + +EnumSet + +EnumSet.EnumItem + +Utility |
+
+Exceptions
+
+ +JiBXException + +RecoverableException + +UnrecoverableException + +ValidationException |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
IAbstractMarshaller | +Abstract base marshaller interface definition. | +
IAliasable | +Nameable extension interface definition. | +
IBindingFactory | +Binding factory interface definition. | +
ICharacterEscaper | +Escaper for character data to be written to output document. | +
IMarshallable | +Marshallable interface definition. | +
IMarshaller | +Marshaller interface definition. | +
IMarshallingContext | +User interface for serializer to XML. | +
ITrackSource | +Unmarshalling source tracking interface. | +
IUnmarshallable | +Unmarshallable interface definition. | +
IUnmarshaller | +Unmarshaller interface definition. | +
IUnmarshallingContext | +User interface for deserializer from XML. | +
IXMLWriter | +XML writer interface used for output of marshalled document. | +
+ +
+Class Summary | +|
---|---|
BindingDirectory | +Abstract class with static method to find the binding factory corresponding + to a binding name. | +
EnumSet | +Named value set support class. | +
EnumSet.EnumItem | +Enumeration pair information. | +
Utility | +Utility class supplying static methods. | +
+ +
+Exception Summary | +|
---|---|
JiBXException | +Binding exception class. | +
RecoverableException | +Recoverable exception class. | +
UnrecoverableException | +Unrecoverable exception class. | +
ValidationException | +Validation exception class. | +
+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. +
+ +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Field Summary | +|
---|---|
+static int |
+COMPATIBLE_VERSION_MASK
+
++ Mask for portions of version number that effect compatibility. |
+
+static java.lang.String |
+CURRENT_VERSION_NAME
+
++ Current distribution file name. |
+
+static int |
+CURRENT_VERSION_NUMBER
+
++ Current binary version number. |
+
+Method Summary | +|
---|---|
+ IMarshallingContext |
+createMarshallingContext()
+
++ Create marshalling context instance. |
+
+ IUnmarshallingContext |
+createUnmarshallingContext()
+
++ Create unmarshalling context instance. |
+
+ java.lang.String |
+getCompilerDistribution()
+
++ Get distribution name for binding compiler used. |
+
+ int |
+getCompilerVersion()
+
++ 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. |
+
+ int |
+getTypeIndex(java.lang.String type)
+
++ Get mapped class index from type name for abstract non-base mappings + included in the binding. |
+
+Field Detail | +
---|
+static final int CURRENT_VERSION_NUMBER+
+
+static final java.lang.String CURRENT_VERSION_NAME+
+
+static final int COMPATIBLE_VERSION_MASK+
+
+Method Detail | +
---|
+IMarshallingContext createMarshallingContext() + throws JiBXException+
+
JiBXException
- if error creating context
+java.lang.UnsupportedOperationException
- if marshalling not supported
+ by binding+IUnmarshallingContext createUnmarshallingContext() + throws JiBXException+
+
JiBXException
- if error creating context
+java.lang.UnsupportedOperationException
- if unmarshalling not supported
+ by binding+int getCompilerVersion()+
+
+java.lang.String getCompilerDistribution()+
+
+java.lang.String[] getNamespaces()+
+
null
if not
+ an output binding)+java.lang.String[] getPrefixes()+
+
null
if not an output binding)+java.lang.String[] getMappedClasses()+
+
+java.lang.String[] getElementNamespaces()+
getMappedClasses()
call. Entries in the array are null
if
+ there is no element for a class or the element is in the default
+ namespace.
++
+java.lang.String[] getElementNames()+
getMappedClasses()
+ call. Entries in the array are null
if there is no element
+ for a class.
++
+int getTypeIndex(java.lang.String type)+
+
type
- fully-qualified class or type name
+-1
if type is not an
+ abstract non-base mapping
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+unmarshal(IUnmarshallingContext ctx)
+
++ Unmarshal self. |
+
+Method Detail | +
---|
+void unmarshal(IUnmarshallingContext ctx) + throws JiBXException+
+
ctx
- unmarshalling context
+JiBXException
- on error in unmarshalling process
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.MarshallingContext ++
public class MarshallingContext
+JiBX serializer supplying convenience methods for marshalling. Most of these + methods are designed for use in code generated by the binding generator. +
+ +
+
+Field Summary | +|
---|---|
+private static int |
+INITIAL_STACK_SIZE
+
++ Starting size for object stack. |
+
+private java.lang.String[] |
+m_classes
+
++ Names of classes included in mapping definition. |
+
+private IBindingFactory |
+m_factory
+
++ Binding factory used to create this unmarshaller. |
+
+private int |
+m_globalCount
+
++ Number of classes with global marshallers. |
+
+private java.util.HashMap |
+m_idMap
+
++ Shared map from IDs to objects. |
+
+private char |
+m_indentChar
+
++ Character used for indenting. |
+
+private int |
+m_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.String |
+m_newLine
+
++ Character sequence for end of line. |
+
+private java.lang.Object[] |
+m_objectStack
+
++ Stack of objects being marshalled. |
+
+private int |
+m_stackDepth
+
++ Current marshalling stack depth. |
+
+private java.lang.String[] |
+m_uris
+
++ URIs for namespaces used in binding. |
+
+private IXMLWriter |
+m_writer
+
++ Output document handler. |
+
+static java.lang.String |
+XML_NAMESPACE
+
++ Fixed XML namespace. |
+
+Constructor Summary | +|
---|---|
MarshallingContext(java.lang.String[] classes,
+ java.lang.String[] mcs,
+ java.lang.String[] uris,
+ IBindingFactory ifact)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+addMarshalling(int index,
+ java.lang.String name)
+
++ Define marshalling for class. |
+
+ MarshallingContext |
+attribute(int index,
+ java.lang.String name,
+ int value)
+
++ Generate integer attribute. |
+
+ MarshallingContext |
+attribute(int index,
+ java.lang.String name,
+ int value,
+ java.lang.String[] table)
+
++ Generate enumeration attribute. |
+
+ MarshallingContext |
+attribute(int index,
+ java.lang.String name,
+ java.lang.String value)
+
++ Generate text attribute. |
+
+ java.lang.String |
+buildNameString(int index,
+ java.lang.String name)
+
++ Build name with optional namespace. |
+
+ MarshallingContext |
+closeStartContent()
+
++ Close start tag with content to follow. |
+
+ MarshallingContext |
+closeStartEmpty()
+
++ Close start tag with no content (empty tag). |
+
+ MarshallingContext |
+content(int value)
+
++ Add integer content to current element. |
+
+ MarshallingContext |
+content(int value,
+ java.lang.String[] table)
+
++ Add enumeration content to current element. |
+
+ MarshallingContext |
+content(java.lang.String value)
+
++ Add text content to current element. |
+
+private ICharacterEscaper |
+createEscaper(java.lang.String enc)
+
++ Create character escaper for encoding. |
+
+ MarshallingContext |
+element(int index,
+ java.lang.String name,
+ int value)
+
++ Generate complete element with integer content. |
+
+ MarshallingContext |
+element(int index,
+ java.lang.String name,
+ int value,
+ java.lang.String[] table)
+
++ Generate complete element with enumeration content. |
+
+ MarshallingContext |
+element(int index,
+ java.lang.String name,
+ java.lang.String value)
+
++ Generate complete element with text content. |
+
+ void |
+endDocument()
+
++ End document. |
+
+ MarshallingContext |
+endTag(int index,
+ java.lang.String name)
+
++ Generate end tag for element. |
+
+ IBindingFactory |
+getFactory()
+
++ Return the binding factory used to create this unmarshaller. |
+
+ java.util.HashMap |
+getIdMap()
+
++ Get shared ID map. |
+
+ int |
+getIndent()
+
++ Get current nesting indent spaces. |
+
+ IMarshaller |
+getMarshaller(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. |
+
+ int |
+getStackDepth()
+
++ Get current marshalling object stack depth. |
+
+ java.lang.Object |
+getStackObject(int depth)
+
++ Get object from marshalling stack. |
+
+ java.lang.Object |
+getStackTop()
+
++ Get top object on marshalling stack. |
+
+ IXMLWriter |
+getXmlWriter()
+
++ Get the writer being used for output. |
+
+ MarshallingContext |
+marshalCollection(java.util.ArrayList col)
+
++ Marshal all items in a collection. |
+
+ MarshallingContext |
+marshalCollection(java.util.Collection col)
+
++ Marshal all items in a collection. |
+
+ MarshallingContext |
+marshalCollection(java.util.Vector col)
+
++ Marshal all items in a collection. |
+
+ void |
+marshalDocument(java.lang.Object root)
+
++ Marshal document from root object without XML declaration. |
+
+ void |
+marshalDocument(java.lang.Object root,
+ java.lang.String enc,
+ java.lang.Boolean alone)
+
++ Marshal document from root object. |
+
+ void |
+marshalDocument(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. |
+
+ void |
+marshalDocument(java.lang.Object root,
+ java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.Writer outw)
+
++ Marshal document from root object to writer. |
+
+protected void |
+marshalRoot(java.lang.Object root)
+
++ Marshal document from root object. |
+
+ void |
+popObject()
+
++ Pop marshalled object from stack. |
+
+ void |
+pushObject(java.lang.Object obj)
+
++ Push created object to marshalling stack. |
+
+ void |
+removeMarshalling(int index)
+
++ Undefine marshalling for element. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+setFromContext(MarshallingContext parent)
+
++ Initializes the context to use the same marshalled text destination and + parameters as another marshalling context. |
+
+ void |
+setIndent(int count)
+
++ Set nesting indent spaces. |
+
+ void |
+setIndent(int count,
+ java.lang.String newline,
+ char indent)
+
++ Set nesting indentation. |
+
+ void |
+setOutput(java.io.OutputStream outs,
+ java.lang.String enc)
+
++ Set output stream and encoding. |
+
+ void |
+setOutput(java.io.OutputStream outs,
+ java.lang.String enc,
+ ICharacterEscaper esc)
+
++ Set output stream with encoding and escaper. |
+
+ void |
+setOutput(java.io.Writer outw)
+
++ Set output writer. |
+
+ void |
+setOutput(java.io.Writer outw,
+ ICharacterEscaper esc)
+
++ Set output writer and escaper. |
+
+ void |
+setXmlWriter(IXMLWriter xwrite)
+
++ Set the writer being used for output. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone)
+
++ Start document. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.OutputStream outs)
+
++ Start document with output stream and encoding. |
+
+ void |
+startDocument(java.lang.String enc,
+ java.lang.Boolean alone,
+ java.io.Writer outw)
+
++ Start document with writer. |
+
+ MarshallingContext |
+startTag(int index,
+ java.lang.String name)
+
++ Generate start tag for element without attributes. |
+
+ MarshallingContext |
+startTagAttributes(int index,
+ java.lang.String name)
+
++ Generate start tag for element with attributes. |
+
+ MarshallingContext |
+startTagNamespaces(int index,
+ java.lang.String name,
+ int[] nums,
+ java.lang.String[] prefs)
+
++ Generate start tag for element with namespaces. |
+
+ MarshallingContext |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+ MarshallingContext |
+writeContent(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 | +
---|
+public static final java.lang.String XML_NAMESPACE+
+
+private static final int INITIAL_STACK_SIZE+
+
+private IBindingFactory m_factory+
+
+private java.lang.String[] m_classes+
+
+private int m_globalCount+
+
+private java.lang.String[] m_marshallerClasses+
null
for
+ mappings out of context).
++
+private IMarshaller[] m_marshallers+
+
+private java.lang.String[] m_uris+
+
+private int m_stackDepth+
+
+private java.lang.Object[] m_objectStack+
+
+private int m_indentCount+
+
+private java.lang.String m_newLine+
+
+private char m_indentChar+
+
+private java.util.HashMap m_idMap+
+
+private IXMLWriter m_writer+
+
+Constructor Detail | +
---|
+public MarshallingContext(java.lang.String[] classes, + java.lang.String[] mcs, + java.lang.String[] uris, + IBindingFactory ifact)+
+
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 | +
---|
+private ICharacterEscaper createEscaper(java.lang.String enc) + throws JiBXException+
+
enc
- document output encoding, or null
for default
+JiBXException
- if error creating setting output+public void setOutput(java.io.OutputStream outs, + java.lang.String enc, + ICharacterEscaper esc) + throws JiBXException+
+
setOutput
in interface IMarshallingContext
outs
- stream for document data outputenc
- document output encoding, or null
uses UTF-8
+ defaultesc
- escaper for writing characters to stream
+JiBXException
- if error setting output+public void setOutput(java.io.OutputStream outs, + java.lang.String enc) + throws JiBXException+
+
setOutput
in interface IMarshallingContext
outs
- stream for document data outputenc
- document output encoding, or null
for default
+JiBXException
- if error creating setting output+public void setOutput(java.io.Writer outw, + ICharacterEscaper esc)+
+
setOutput
in interface IMarshallingContext
outw
- writer for document data outputesc
- escaper for writing characters+public void setOutput(java.io.Writer outw)+
+
setOutput
in interface IMarshallingContext
outw
- writer for document data output+public IXMLWriter getXmlWriter()+
+
getXmlWriter
in interface IMarshallingContext
+public void setXmlWriter(IXMLWriter xwrite)+
+
setXmlWriter
in interface IMarshallingContext
xwrite
- XML writer used for output+public int getIndent()+
+
getIndent
in interface IMarshallingContext
+public void setIndent(int count)+
+
setIndent
in interface IMarshallingContext
count
- number of spaces to indent per level, or disable
+ indentation if negative+public void setIndent(int count, + java.lang.String newline, + char indent)+
+
setIndent
in interface IMarshallingContext
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+public void setFromContext(MarshallingContext parent)+
+
parent
- context supplying target for marshalled document text+public void reset()+
+
reset
in interface IMarshallingContext
+public IBindingFactory getFactory()+
+
+public java.lang.String[] getNamespaces()+
+
+public void startDocument(java.lang.String enc, + java.lang.Boolean alone) + throws JiBXException+
+
startDocument
in interface IMarshallingContext
enc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specified
+JiBXException
- on any error (possibly wrapping other exception)+public void startDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + throws JiBXException+
+
startDocument
in interface IMarshallingContext
enc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specifiedouts
- stream for document data output
+JiBXException
- on any error (possibly wrapping other exception)+public void startDocument(java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + throws JiBXException+
+
startDocument
in interface IMarshallingContext
enc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specifiedoutw
- writer for document data output
+JiBXException
- on any error (possibly wrapping other exception)+public void endDocument() + throws JiBXException+
+
endDocument
in interface IMarshallingContext
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String buildNameString(int index, + java.lang.String name)+
+
index
- namespace URI index numbername
- local name part of name
++public MarshallingContext startTag(int index, + java.lang.String name) + throws JiBXException+
+
index
- namespace URI index numbername
- element name
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext startTagAttributes(int index, + java.lang.String name) + throws JiBXException+
+
index
- namespace URI index numbername
- element name
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext attribute(int index, + java.lang.String name, + java.lang.String value) + throws JiBXException+
+
index
- namespace URI index numbername
- attribute namevalue
- text value for attribute (cannot be null
)
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext attribute(int index, + java.lang.String name, + int value) + throws JiBXException+
+
index
- namespace URI index numbername
- attribute namevalue
- integer value for attribute
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext attribute(int index, + java.lang.String name, + int value, + java.lang.String[] table) + throws JiBXException+
+
index
- namespace URI index numbername
- attribute namevalue
- integer enumeration value (zero-based)table
- text values in enumeration
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext closeStartContent() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext closeStartEmpty() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext content(java.lang.String value) + throws JiBXException+
+
value
- text element content
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext content(int value) + throws JiBXException+
+
value
- integer element content
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext content(int value, + java.lang.String[] table) + throws JiBXException+
+
value
- integer enumeration value (zero-based)table
- text values in enumeration
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext endTag(int index, + java.lang.String name) + throws JiBXException+
+
index
- namespace URI index numbername
- element name
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext element(int index, + java.lang.String name, + java.lang.String value) + throws JiBXException+
+
index
- namespace URI index numbername
- element namevalue
- text element content
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext element(int index, + java.lang.String name, + int value) + throws JiBXException+
+
index
- namespace URI index numbername
- element namevalue
- integer element content
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext element(int index, + java.lang.String name, + int value, + java.lang.String[] table) + throws JiBXException+
+
index
- namespace URI index numbername
- element namevalue
- integer enumeration value (zero-based)table
- text values in enumeration
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext writeCData(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public MarshallingContext writeContent(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public MarshallingContext marshalCollection(java.util.Collection col) + throws JiBXException+
+
col
- collection of items to be marshalled
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext marshalCollection(java.util.ArrayList col) + throws JiBXException+
+
col
- collection of items to be marshalled
+JiBXException
- on any error (possibly wrapping other exception)+public MarshallingContext marshalCollection(java.util.Vector col) + throws JiBXException+
+
col
- collection of items to be marshalled
+JiBXException
- on any error (possibly wrapping other exception)+public void addMarshalling(int index, + java.lang.String name)+
+
index
- class index for marshalling definitionname
- marshaller class name handling+public void removeMarshalling(int index)+
+
index
- class index for marshalling definition+public MarshallingContext startTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + throws JiBXException+
+
index
- namespace URI index numbername
- element namenums
- 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)
+JiBXException
- on any error (possibly wrapping other exception)+public IMarshaller getMarshaller(int index, + java.lang.String name) + throws JiBXException+
+
getMarshaller
in interface IMarshallingContext
index
- class index for marshalling definitionname
- fully qualified name of class to be marshalled (used only
+ for validation)
+JiBXException
- on any error (possibly wrapping other exception)+protected void marshalRoot(java.lang.Object root) + throws JiBXException+
+
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the binding
+JiBXException
- on any error (possibly wrapping other exception)+public void marshalDocument(java.lang.Object root) + throws JiBXException+
endDocument()
.
++
marshalDocument
in interface IMarshallingContext
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the binding
+JiBXException
- on any error (possibly wrapping other exception)+public void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call to marshal the root
+ object using this context, and finally a call to endDocument()
.
++
marshalDocument
in interface IMarshallingContext
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specified
+JiBXException
- on any error (possibly wrapping other exception)+public void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.OutputStream outs) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call to marshal the root object using this context,
+ and finally a call to endDocument()
.
++
marshalDocument
in interface IMarshallingContext
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specifiedouts
- stream for document data output
+JiBXException
- on any error (possibly wrapping other exception)+public void marshalDocument(java.lang.Object root, + java.lang.String enc, + java.lang.Boolean alone, + java.io.Writer outw) + throws JiBXException+
startDocument(java.lang.String, java.lang.Boolean)
, a call
+ to marshal the root object using this context, and finally a call to
+ endDocument()
.
++
marshalDocument
in interface IMarshallingContext
root
- object at root of structure to be marshalled, which must have
+ a top-level mapping in the bindingenc
- document encoding, null
if not specifiedalone
- standalone document flag, null
if not
+ specifiedoutw
- writer for document data output
+JiBXException
- on any error (possibly wrapping other exception)+public java.util.HashMap getIdMap()+
+
+public void pushObject(java.lang.Object obj)+
+
pushObject
in interface IMarshallingContext
obj
- object being marshalled+public void popObject() + throws JiBXException+
+
popObject
in interface IMarshallingContext
JiBXException
- if no object on stack+public int getStackDepth()+
+
getStackDepth
in interface IMarshallingContext
+public java.lang.Object getStackObject(int depth)+
+
getStackObject
in interface IMarshallingContext
depth
- object depth in stack to be retrieved (must be in the range
+ of zero to the current depth minus one).
++public java.lang.Object getStackTop()+
+
getStackTop
in interface IMarshallingContext
null
if none
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase.DeclarationInfo ++
private static class XMLWriterNamespaceBase.DeclarationInfo
+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. |
+
+ int |
+m_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 | +
---|
+public final int m_depth+
+
+public final int[] m_deltas+
+
+public final java.lang.String[] m_priors+
+
+Constructor Detail | +
---|
+public XMLWriterNamespaceBase.DeclarationInfo(int depth, + int[] deltas, + java.lang.String[] priors)+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.runtime.impl.XMLWriterBase + org.jibx.runtime.impl.StreamWriterBase ++
public abstract class StreamWriterBase
+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. +
+ +
+
+Field Summary | +|
---|---|
+protected static byte[] |
+AMP_ENTITY
+
++ |
+
+protected static byte[] |
+GT_ENTITY
+
++ |
+
+private static int |
+INITIAL_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.String |
+m_encodingName
+
++ Name of encoding used for stream. |
+
+protected byte[][][] |
+m_extensionBytes
+
++ Byte sequences for prefixes of extension namespaces in scope. |
+
+protected int |
+m_fillOffset
+
++ Current offset in filling buffer. |
+
+private boolean |
+m_indent
+
++ Indent tags for pretty-printed text. |
+
+private int |
+m_indentBase
+
++ Base number of characters in indent sequence (end of line only). |
+
+private int |
+m_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.OutputStream |
+m_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 | +|
---|---|
+ void |
+close()
+
++ Close document output. |
+
+ void |
+flush()
+
++ Flush document output. |
+
+ void |
+indent()
+
++ Request output indent. |
+
+ void |
+indent(int bias)
+
++ Request output indent. |
+
+protected void |
+makeSpace(int length)
+
++ Make at least the requested number of bytes available in the output + buffer. |
+
+ void |
+popExtensionNamespaces()
+
++ Remove extension namespace URIs. |
+
+ void |
+pushExtensionNamespaces(java.lang.String[] uris)
+
++ Append extension namespace URIs to those in mapping. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+setIndentSpaces(int count,
+ java.lang.String newline,
+ char indent)
+
++ Set nesting indentation. |
+
+ void |
+setOutput(java.io.OutputStream outs)
+
++ Set output stream. |
+
+protected void |
+undefineNamespace(int index)
+
++ Report that namespace has been undefined. |
+
+protected int |
+writeEntity(byte[] bytes,
+ int offset)
+
++ Write entity bytes to output. |
+
+protected void |
+writePrefix(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 | +
---|
+protected static final byte[] QUOT_ENTITY+
+protected static final byte[] AMP_ENTITY+
+protected static final byte[] GT_ENTITY+
+protected static final byte[] LT_ENTITY+
+protected static final byte[] LT_CDATASTART+
+protected static final byte[] LT_CDATAEND+
+private static final int INITIAL_BUFFER_SIZE+
+
+private final java.lang.String m_encodingName+
+
+private java.io.OutputStream m_stream+
+
+protected byte[] m_buffer+
+
+protected int m_fillOffset+
+
+protected byte[][] m_prefixBytes+
+
+protected byte[][][] m_extensionBytes+
+
+private boolean m_indent+
+
+private int m_indentBase+
+
+private int m_indentPerLevel+
+
+private byte[] m_indentSequence+
+
+Constructor Detail | +
---|
+public StreamWriterBase(java.lang.String enc, + java.lang.String[] uris)+
+
enc
- character encoding used for output to streamsuris
- 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")+public StreamWriterBase(StreamWriterBase base, + java.lang.String[] uris)+
+
base
- instance to be used as base for writeruris
- ordered array of URIs for namespaces used in document
+ (see StreamWriterBase(String, String[])
)+Method Detail | +
---|
+public void setOutput(java.io.OutputStream outs)+
+
outs
- stream for document data output+public void setIndentSpaces(int count, + java.lang.String newline, + char indent)+
+
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+protected void makeSpace(int length) + throws java.io.IOException+
+
length
- number of bytes space to be made available
+java.io.IOException
- if error writing to document+protected void undefineNamespace(int index)+
+
undefineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index number+protected void writePrefix(int index) + throws java.io.IOException+
+
writePrefix
in class XMLWriterBase
index
- namespace URI index number
+java.io.IOException
- if error writing to document+protected int writeEntity(byte[] bytes, + int offset)+
+
bytes
- actual bytes to be writtenoffset
- starting offset in buffer
++public void pushExtensionNamespaces(java.lang.String[] uris)+
+
pushExtensionNamespaces
in interface IXMLWriter
pushExtensionNamespaces
in class XMLWriterNamespaceBase
uris
- namespace URIs to extend those in mapping+public void popExtensionNamespaces()+
pushExtensionNamespaces(java.lang.String[])
.
++
popExtensionNamespaces
in interface IXMLWriter
popExtensionNamespaces
in class XMLWriterNamespaceBase
+public void indent(int bias) + throws java.io.IOException+
+
indent
in class XMLWriterBase
bias
- indent depth difference (positive or negative) from current
+ element nesting depth
+java.io.IOException
- on error writing to document+public void indent() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void flush() + throws java.io.IOException+
+
flush
in interface IXMLWriter
flush
in class XMLWriterBase
java.io.IOException
- on error writing to document+public void close() + throws java.io.IOException+
+
close
in interface IXMLWriter
close
in class XMLWriterBase
java.io.IOException
- on error writing to document+public void reset()+
+
reset
in interface IXMLWriter
reset
in class XMLWriterBase
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.runtime.impl.XMLWriterBase + org.jibx.runtime.impl.GenericXMLWriter ++
public class GenericXMLWriter
+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. +
+ +
+
+Field Summary | +|
---|---|
+private ICharacterEscaper |
+m_escaper
+
++ Escaper for character data content output. |
+
+private boolean |
+m_indent
+
++ Indent tags for pretty-printed text. |
+
+private int |
+m_indentBase
+
++ Base number of characters in indent sequence (end of line only). |
+
+private int |
+m_indentPerLevel
+
++ Number of extra characters in indent sequence per level of nesting. |
+
+private char[] |
+m_indentSequence
+
++ Raw text for indentation sequences. |
+
+private java.io.Writer |
+m_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 | +|
---|---|
+ void |
+close()
+
++ Close document output. |
+
+ IXMLWriter |
+createChildWriter(java.lang.String[] uris)
+
++ Create a child writer instance to be used for a separate binding. |
+
+protected void |
+defineNamespace(int index,
+ java.lang.String prefix)
+
++ Report that namespace has been defined. |
+
+ void |
+flush()
+
++ Flush document output. |
+
+ void |
+indent()
+
++ Request output indent. |
+
+ void |
+indent(int bias)
+
++ Request output indent. |
+
+ void |
+setIndentSpaces(int count,
+ java.lang.String newline,
+ char indent)
+
++ Set nesting indentation. |
+
+ void |
+setOutput(java.io.Writer outw,
+ ICharacterEscaper escaper)
+
++ Set output writer and escaper. |
+
+protected void |
+undefineNamespace(int index)
+
++ Report that namespace has been undefined. |
+
+protected void |
+writeAttributeText(java.lang.String text)
+
++ Write attribute text to output. |
+
+ void |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+protected void |
+writeMarkup(char chr)
+
++ Write markup character to output. |
+
+protected void |
+writeMarkup(java.lang.String text)
+
++ Write markup text to output. |
+
+protected void |
+writePrefix(int index)
+
++ Write namespace prefix to output. |
+
+ void |
+writeTextContent(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 | +
---|
+private java.io.Writer m_writer+
+
+private ICharacterEscaper m_escaper+
+
+private boolean m_indent+
+
+private int m_indentBase+
+
+private int m_indentPerLevel+
+
+private char[] m_indentSequence+
+
+Constructor Detail | +
---|
+public GenericXMLWriter(java.lang.String[] uris)+
+
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")+public GenericXMLWriter(GenericXMLWriter base, + java.lang.String[] uris)+
+
base
- instance to be used as base for writeruris
- ordered array of URIs for namespaces used in document
+ (see GenericXMLWriter(String[])
)+Method Detail | +
---|
+public void setOutput(java.io.Writer outw, + ICharacterEscaper escaper)+
+
outw
- writer for document data outputescaper
- character escaper for chosen encoding+public void setIndentSpaces(int count, + java.lang.String newline, + char indent)+
+
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+protected void writeMarkup(java.lang.String text) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
text
- markup text to be written
+java.io.IOException
- if error writing to document+protected void writeMarkup(char chr) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
chr
- markup character to be written
+java.io.IOException
- if error writing to document+protected void defineNamespace(int index, + java.lang.String prefix)+
+
defineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index numberprefix
- prefix used for namespace+protected void undefineNamespace(int index)+
+
undefineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index number+protected void writePrefix(int index) + throws java.io.IOException+
+
writePrefix
in class XMLWriterBase
index
- namespace URI index number
+java.io.IOException
- if error writing to document+protected void writeAttributeText(java.lang.String text) + throws java.io.IOException+
+
writeAttributeText
in class XMLWriterBase
text
- attribute value text to be written
+java.io.IOException
- if error writing to document+public void writeTextContent(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public void indent(int bias) + throws java.io.IOException+
+
indent
in class XMLWriterBase
bias
- indent depth difference (positive or negative) from current
+ element nesting depth
+java.io.IOException
- on error writing to document+public void indent() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void flush() + throws java.io.IOException+
+
flush
in interface IXMLWriter
flush
in class XMLWriterBase
java.io.IOException
- on error writing to document+public void close() + throws java.io.IOException+
+
close
in interface IXMLWriter
close
in class XMLWriterBase
java.io.IOException
- on error writing to document+public IXMLWriter createChildWriter(java.lang.String[] uris)+
+
createChildWriter
in class XMLWriterBase
uris
- ordered array of URIs for namespaces used in document
+ (see GenericXMLWriter(String[])
)
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.ISO88591Escaper ++
public class ISO88591Escaper
+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). +
+ +
+
+Field Summary | +|
---|---|
+private static ISO88591Escaper |
+s_instance
+
++ Singleton instance of class. |
+
+Constructor Summary | +|
---|---|
+private |
+ISO88591Escaper()
+
++ Private constructor to prevent external creation. |
+
+Method Summary | +|
---|---|
+static ICharacterEscaper |
+getInstance()
+
++ Get instance of escaper. |
+
+ void |
+writeAttribute(java.lang.String text,
+ java.io.Writer writer)
+
++ Write attribute value with character entity substitutions. |
+
+ void |
+writeCData(java.lang.String text,
+ java.io.Writer writer)
+
++ Write CDATA to document. |
+
+ void |
+writeContent(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 | +
---|
+private static final ISO88591Escaper s_instance+
+
+Constructor Detail | +
---|
+private ISO88591Escaper()+
+
+Method Detail | +
---|
+public void writeAttribute(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeAttribute
in interface ICharacterEscaper
text
- attribute value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeContent(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeContent
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeCData
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public static ICharacterEscaper getInstance()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase ++
public abstract class XMLWriterNamespaceBase
+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. +
+ +
+
+Nested Class Summary | +|
---|---|
+private static class |
+XMLWriterNamespaceBase.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 int |
+m_namespaceDepth
+
++ Depth of top namespace declaration level. |
+
+private java.util.Stack |
+m_namespaceStack
+
++ Stack of information for namespace declarations. |
+
+private int |
+m_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 void |
+closeNamespaces()
+
++ Ends the current innermost set of nested namespace definitions. |
+
+protected void |
+decrementNesting()
+
++ Decrement the current nesting depth. |
+
+protected abstract void |
+defineNamespace(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. |
+
+ int |
+getNamespaceCount()
+
++ Get the number of namespaces currently defined. |
+
+ java.lang.String |
+getNamespacePrefix(int index)
+
++ Get current prefix defined for namespace. |
+
+ java.lang.String[] |
+getNamespaces()
+
++ Get namespace URIs for mapping. |
+
+ java.lang.String |
+getNamespaceUri(int index)
+
++ Get URI for namespace. |
+
+ int |
+getNestingDepth()
+
++ Get the current element nesting depth. |
+
+ int |
+getPrefixIndex(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 void |
+incrementNesting()
+
++ Increment the current nesting depth. |
+
+ int[] |
+openNamespaces(int[] nums,
+ java.lang.String[] prefs)
+
++ Open the specified namespaces. |
+
+ void |
+popExtensionNamespaces()
+
++ Remove extension namespace URIs. |
+
+ void |
+pushExtensionNamespaces(java.lang.String[] uris)
+
++ Append extension namespace URIs to those in mapping. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+private void |
+setNamespacePrefix(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 void |
+undefineNamespace(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 | +
---|
+private static final int[] EMPTY_INT_ARRAY+
+
+protected java.lang.String[] m_uris+
+
+protected java.lang.String[] m_prefixes+
+
+private int m_nestingDepth+
+
+private java.util.Stack m_namespaceStack+
+
+private int m_namespaceDepth+
+
+private java.lang.String[][] m_extensionUris+
null
if not in use).
++
+private java.lang.String[][] m_extensionPrefixes+
null
if not in use).
++
+Constructor Detail | +
---|
+public XMLWriterNamespaceBase(java.lang.String[] uris)+
+
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 | +
---|
+protected abstract void defineNamespace(int index, + java.lang.String prefix) + throws java.io.IOException+
+
index
- namespace URI index numberprefix
- prefix used for namespace
+java.io.IOException
- if error writing to document+protected abstract void undefineNamespace(int index)+
+
index
- namespace URI index number+private void setNamespacePrefix(int index, + java.lang.String prefix)+
+
index
- namespace URI index number+public int[] openNamespaces(int[] nums, + java.lang.String[] prefs) + throws java.io.IOException+
+
openNamespaces
in interface IXMLWriter
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)
+java.io.IOException
- on error writing to document+private void closeNamespaces()+
+
+public final int getNestingDepth()+
+
getNestingDepth
in interface IXMLWriter
+public final int getNamespaceCount()+
+
getNamespaceCount
in interface IXMLWriter
+protected void incrementNesting()+
+
+protected void decrementNesting()+
+
+public void reset()+
+
reset
in interface IXMLWriter
+public final java.lang.String[] getNamespaces()+
+
getNamespaces
in interface IXMLWriter
+public final java.lang.String getNamespaceUri(int index)+
+
getNamespaceUri
in interface IXMLWriter
index
- namespace URI index number
+null
if the namespace index
+ is invalid+public final java.lang.String getNamespacePrefix(int index)+
+
getNamespacePrefix
in interface IXMLWriter
index
- namespace URI index number
+null
if the namespace is not
+ currently mapped+public final int getPrefixIndex(java.lang.String prefix)+
+
getPrefixIndex
in interface IXMLWriter
prefix
- text to match (non-null
, use "" for default
+ prefix)
++protected static java.lang.String[][] growArray(java.lang.String[][] base, + java.lang.String[] items)+
+
base
- array to be grown (null
is treated as zero
+ length)items
- array of strings to be added at end of base array
++protected static java.lang.String[][] shrinkArray(java.lang.String[][] base)+
+
base
- array to be shrunk
+null
if
+ empty)+public void pushExtensionNamespaces(java.lang.String[] uris)+
+
pushExtensionNamespaces
in interface IXMLWriter
uris
- namespace URIs to extend those in mapping+public void popExtensionNamespaces()+
pushExtensionNamespaces(java.lang.String[])
.
++
popExtensionNamespaces
in interface IXMLWriter
+public final java.lang.String[][] getExtensionNamespaces()+
+
getExtensionNamespaces
in interface IXMLWriter
null
if
+ none)
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.StringIntHashMap ++
public class StringIntHashMap
+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.
+
+ +
+
+Field Summary | +|
---|---|
+protected static double |
+DEFAULT_FILL
+
++ Default fill fraction allowed before growing table. |
+
+static int |
+DEFAULT_NOT_FOUND
+
++ Default value returned when key not found in table. |
+
+protected int |
+m_arraySize
+
++ Size of array used for keys. |
+
+protected int |
+m_entryCount
+
++ Number of entries present in table. |
+
+protected int |
+m_entryLimit
+
++ Entries allowed before growing table. |
+
+protected double |
+m_fillFraction
+
++ Fill fraction allowed for this hash table. |
+
+protected int |
+m_hitOffset
+
++ Offset added (modulo table size) to slot number on collision. |
+
+protected java.lang.String[] |
+m_keyTable
+
++ Array of key table slots. |
+
+protected int |
+m_notFoundValue
+
++ Value returned when key not found in table. |
+
+protected int[] |
+m_valueTable
+
++ Array of value table slots. |
+
+protected static int |
+MINIMUM_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 | +|
---|---|
+ int |
+add(java.lang.String key,
+ int value)
+
++ Add an entry to the table. |
+
+private int |
+assignSlot(java.lang.String key,
+ int value)
+
++ Assign slot for entry. |
+
+ java.lang.Object |
+clone()
+
++ Construct a copy of the table. |
+
+ boolean |
+containsKey(java.lang.String key)
+
++ Check if an entry is present in the table. |
+
+private int |
+freeSlot(int slot)
+
++ Find free slot number for entry. |
+
+ int |
+get(java.lang.String key)
+
++ Find an entry in the table. |
+
+protected void |
+internalRemove(int slot)
+
++ Internal remove pair from the table. |
+
+private boolean |
+reinsert(int slot)
+
++ Reinsert an entry into the hash map. |
+
+ int |
+remove(java.lang.String key)
+
++ Remove an entry from the table. |
+
+private void |
+restructure(java.lang.String[] keys,
+ int[] values)
+
++ Restructure the table. |
+
+private int |
+standardFind(java.lang.Object key)
+
++ Standard find key in table. |
+
+private int |
+standardSlot(java.lang.Object key)
+
++ Standard base slot computation for a key. |
+
+private int |
+stepSlot(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 | +
---|
+public static final int DEFAULT_NOT_FOUND+
+
+protected static final double DEFAULT_FILL+
+
+protected static final int MINIMUM_SIZE+
+
+protected final double m_fillFraction+
+
+protected int m_entryCount+
+
+protected int m_entryLimit+
+
+protected int m_arraySize+
+
+protected int m_hitOffset+
+
+protected java.lang.String[] m_keyTable+
+
+protected int[] m_valueTable+
+
+protected int m_notFoundValue+
+
+Constructor Detail | +
---|
+public StringIntHashMap(int count, + double fill, + int miss)+
+
count
- number of values to assume in initial sizing of tablefill
- fraction full allowed for table before growingmiss
- value returned when key not found in table+public StringIntHashMap(int count, + double fill)+
+
count
- number of values to assume in initial sizing of tablefill
- fraction full allowed for table before growing+public StringIntHashMap(int count)+
+
count
- number of values to assume in initial sizing of table+public StringIntHashMap()+
+
+public StringIntHashMap(StringIntHashMap base)+
+
base
- instance being copied+Method Detail | +
---|
+private final int stepSlot(int slot)+
+
slot
- slot number to be stepped
++private final int freeSlot(int slot)+
+
slot
- initial slot computed from key
++private final int standardSlot(java.lang.Object key)+
+
key
- key value to be computed
++private int standardFind(java.lang.Object key)+
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.
++
key
- to be found in table
+-index-1
of slot to be
+ used for inserting key in table if not already present (always negative)+private boolean reinsert(int slot)+
+
slot
- position of entry to be reinserted into hash map
+true
if the slot number used by the entry has has
+ changed, false
if not+protected void internalRemove(int slot)+
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.
++
slot
- index number of pair to be removed+private void restructure(java.lang.String[] keys, + int[] values)+
+
keys
- array of keysvalues
- array of values+private int assignSlot(java.lang.String key, + int value)+
+
key
- to be added to tablevalue
- associated value for key
++public int add(java.lang.String key, + int value)+
+
key
- key to be added to table (non- null
)value
- associated value for key
++public final boolean containsKey(java.lang.String key)+
+
key
- key for entry to be found
+true
if key found in table, false
+ if not+public final int get(java.lang.String key)+
+
key
- key for entry to be returned
++public int remove(java.lang.String key)+
+
key
- key to be removed from table
++public java.lang.Object clone()+
+
clone
in class java.lang.Object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.Reader + org.jibx.runtime.impl.InputStreamWrapper.WrappedStreamUTF8Reader ++
private class InputStreamWrapper.WrappedStreamUTF8Reader
+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 | +|
---|---|
+ void |
+close()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(char[] b)
+
++ |
+
+ int |
+read(char[] b,
+ int off,
+ int len)
+
++ |
+
+ boolean |
+ready()
+
++ |
+
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 | +
---|
+private InputStreamWrapper.WrappedStreamUTF8Reader()+
+Method Detail | +
---|
+public void close() + throws java.io.IOException+
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
+public int read(char[] b, + int off, + int len) + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public int read(char[] b) + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public int read() + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public boolean ready() + throws java.io.IOException+
ready
in class java.io.Reader
java.io.IOException
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.BackFillArray ++
public class BackFillArray
+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. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.Object[] |
+m_array
+
++ Array containing reference. |
+
+private int |
+m_index
+
++ Reference offset within array. |
+
+Constructor Summary | +|
---|---|
BackFillArray(int index,
+ java.lang.Object[] array)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+backfill(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 | +
---|
+private java.lang.Object[] m_array+
+
+private int m_index+
+
+Constructor Detail | +
---|
+public BackFillArray(int index, + java.lang.Object[] array)+
+
index
- reference offset within arrayarray
- array containing the reference+Method Detail | +
---|
+public void backfill(java.lang.Object obj)+
+
backfill
in interface BackFillReference
obj
- referenced object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.BackFillHolder ++
public class BackFillHolder
+Holder used to collect forward references to a particular object. The + references are processed when the object is defined. +
+ +
+
+Field Summary | +|
---|---|
+private java.lang.String |
+m_class
+
++ Expected class name of tracked object. |
+
+private java.util.ArrayList |
+m_list
+
++ List of references to this object. |
+
+Constructor Summary | +|
---|---|
BackFillHolder(java.lang.String name)
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+addBackFill(BackFillReference ref)
+
++ Add forward reference to tracked object. |
+
+ void |
+defineValue(java.lang.Object obj)
+
++ Define referenced object. |
+
+ java.lang.String |
+getExpectedClass()
+
++ 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 | +
---|
+private java.lang.String m_class+
+
+private java.util.ArrayList m_list+
+
+Constructor Detail | +
---|
+public BackFillHolder(java.lang.String name)+
+
name
- expected class name of tracked object+Method Detail | +
---|
+public void addBackFill(BackFillReference ref)+
+
ref
- backfill reference item+public void defineValue(java.lang.Object obj)+
+
obj
- referenced object+public java.lang.String getExpectedClass()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
public interface ITrackSourceImpl
+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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+jibx_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 | +
---|
+void jibx_setSource(java.lang.String name, + int line, + int column)+
+
name
- of source document, or null
if noneline
- source document line number, or -1
if unknowncolumn
- source document column position, or -1
if
+ unknown
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.USASCIIEscaper ++
public class USASCIIEscaper
+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). +
+ +
+
+Field Summary | +|
---|---|
+private static USASCIIEscaper |
+s_instance
+
++ Singleton instance of class. |
+
+Constructor Summary | +|
---|---|
+private |
+USASCIIEscaper()
+
++ Private constructor to prevent external creation. |
+
+Method Summary | +|
---|---|
+static ICharacterEscaper |
+getInstance()
+
++ Get instance of escaper. |
+
+ void |
+writeAttribute(java.lang.String text,
+ java.io.Writer writer)
+
++ Write attribute value with character entity substitutions. |
+
+ void |
+writeCData(java.lang.String text,
+ java.io.Writer writer)
+
++ Write CDATA to document. |
+
+ void |
+writeContent(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 | +
---|
+private static final USASCIIEscaper s_instance+
+
+Constructor Detail | +
---|
+private USASCIIEscaper()+
+
+Method Detail | +
---|
+public void writeAttribute(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeAttribute
in interface ICharacterEscaper
text
- attribute value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeContent(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeContent
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeCData
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public static ICharacterEscaper getInstance()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.InputStreamWrapper ++
public class InputStreamWrapper
+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 +
+ +
+
+Nested Class Summary | +|
---|---|
+private class |
+InputStreamWrapper.WrappedStream
+
++ Stream that just uses the enclosing class to buffer input from the + wrapped stream. |
+
+private class |
+InputStreamWrapper.WrappedStreamISO88591Reader
+
++ Reader for input stream using ISO8859-1 encoding. |
+
+private class |
+InputStreamWrapper.WrappedStreamUTF8Reader
+
++ Reader for input stream using UTF-8 encoding. |
+
+Field Summary | +|
---|---|
+private static int |
+BUFFER_SIZE
+
++ Default input buffer size. |
+
+private byte[] |
+m_buffer
+
++ Buffer for input bytes. |
+
+private int |
+m_emptyOffset
+
++ Current offset for generating character from buffer. |
+
+private java.lang.String |
+m_encodingName
+
++ Name of encoding to be used for stream. |
+
+private int |
+m_endOffset
+
++ Offset past end of bytes in buffer. |
+
+private boolean |
+m_isEnd
+
++ Flag for end of stream reached. |
+
+private int |
+m_scanOffset
+
++ Scan position offset used for lookahead in buffer. |
+
+private java.io.InputStream |
+m_stream
+
++ Stream for byte input. |
+
+Constructor Summary | +|
---|---|
InputStreamWrapper()
+
++ Constructor. |
+
+Method Summary | +|
---|---|
+ void |
+close()
+
++ Close document input. |
+
+private boolean |
+fillBuffer()
+
++ Reads data into the buffer. |
+
+ java.lang.String |
+getEncoding()
+
++ Get encoding for input document. |
+
+ java.io.Reader |
+getReader()
+
++ Get reader for wrapped input stream. |
+
+private boolean |
+isWhite(int chr)
+
++ Check if a character is XML whitespace. |
+
+private boolean |
+require(int min)
+
++ Reads data into the buffer to at least a minimum number of bytes. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+private java.lang.String |
+scanQuoted()
+
++ Reads a quote delimited token from the scan position in the buffer. |
+
+private java.lang.String |
+scanToken()
+
++ Reads a space or equals ('=') delimited token from the scan position in + the buffer. |
+
+ void |
+setEncoding(java.lang.String enc)
+
++ Set encoding for stream. |
+
+ void |
+setInput(java.io.InputStream ins)
+
++ Set input stream with encoding to be defined later. |
+
+ void |
+setInput(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 | +
---|
+private static final int BUFFER_SIZE+
+
+private java.lang.String m_encodingName+
+
+private java.io.InputStream m_stream+
+
+private boolean m_isEnd+
+
+private byte[] m_buffer+
+
+private int m_endOffset+
+
+private int m_emptyOffset+
+
+private int m_scanOffset+
+
+Constructor Detail | +
---|
+public InputStreamWrapper()+
+
+Method Detail | +
---|
+public void setInput(java.io.InputStream ins)+
+
ins
- stream for document data input+public void setInput(java.io.InputStream ins, + java.lang.String enc) + throws java.io.IOException+
+
ins
- stream for document data inputenc
- character encoding used for input from stream
+ (null
if to be determined from XML input)
+java.io.IOException
+public void setEncoding(java.lang.String enc) + throws java.io.IOException+
+
enc
- character encoding used for input from stream
+ (null
if to be determined from XML input)
+java.io.IOException
- if unknown encoding, or encoding already set+private boolean fillBuffer() + throws java.io.IOException+
+
true
if data has been read into buffer,
+ false
if not
+java.io.IOException
- on error reading from wrapped stream+private boolean require(int min) + throws java.io.IOException+
+
min
- number of bytes required
+true
if buffer contains at least the required byte
+ count on return, false
if not
+java.io.IOException
- on error reading from wrapped stream+private boolean isWhite(int chr)+
+
true
if whitespace, false
if not+private java.lang.String scanToken() + throws java.io.IOException+
+
java.io.IOException
- on error reading from wrapped stream+private java.lang.String scanQuoted() + throws java.io.IOException+
+
java.io.IOException
- on error reading from wrapped stream+public java.io.Reader getReader() + throws java.io.IOException+
+
java.io.IOException
- if error reading from document or creating a reader
+ for the encoding found+public java.lang.String getEncoding()+
getReader()
is called.
++
+public void close() + throws java.io.IOException+
+
java.io.IOException
- on error closing document+public void reset()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.Reader + org.jibx.runtime.impl.InputStreamWrapper.WrappedStreamISO88591Reader ++
private class InputStreamWrapper.WrappedStreamISO88591Reader
+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 | +|
---|---|
+ void |
+close()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(char[] b)
+
++ |
+
+ int |
+read(char[] b,
+ int off,
+ int len)
+
++ |
+
+ boolean |
+ready()
+
++ |
+
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 | +
---|
+private InputStreamWrapper.WrappedStreamISO88591Reader()+
+Method Detail | +
---|
+public void close() + throws java.io.IOException+
close
in interface java.io.Closeable
close
in class java.io.Reader
java.io.IOException
+public int read(char[] b, + int off, + int len) + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public int read(char[] b) + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public int read() + throws java.io.IOException+
read
in class java.io.Reader
java.io.IOException
+public boolean ready() + throws java.io.IOException+
ready
in class java.io.Reader
java.io.IOException
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.SparseArrayIterator ++
public class SparseArrayIterator
+Iterator class for sparse values in an array. This type of iterator
+ can be used for an object array which has references interspersed with
+ null
s.
+
+ +
+
+Field Summary | +|
---|---|
+protected java.lang.Object[] |
+m_array
+
++ Array supplying values for iteration. |
+
+protected int |
+m_offset
+
++ Offset of next iteration value. |
+
+Constructor Summary | +|
---|---|
+private |
+SparseArrayIterator(java.lang.Object[] array)
+
++ Internal constructor. |
+
+Method Summary | +|
---|---|
+protected boolean |
+advance()
+
++ Advance to next iteration value. |
+
+static java.util.Iterator |
+buildIterator(java.lang.Object[] array)
+
++ Build iterator. |
+
+ boolean |
+hasNext()
+
++ Check for iteration element available. |
+
+ java.lang.Object |
+next()
+
++ Get next iteration element. |
+
+ void |
+remove()
+
++ Remove element from iteration. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+protected java.lang.Object[] m_array+
+
+protected int m_offset+
+
+Constructor Detail | +
---|
+private SparseArrayIterator(java.lang.Object[] array)+
+
array
- array containing values to be iterated+Method Detail | +
---|
+protected boolean advance()+
null
value.
++
true
if element available, false
if
+ not+public boolean hasNext()+
+
hasNext
in interface java.util.Iterator
true
if element available, false
if
+ not+public java.lang.Object next()+
+
next
in interface java.util.Iterator
java.util.NoSuchElementException
- if past end of iteration+public void remove()+
+
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- for unsupported operation+public static java.util.Iterator buildIterator(java.lang.Object[] array)+
+
array
- array containing values to be iterated (may be
+ null
)
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.runtime.impl.XMLWriterBase + org.jibx.runtime.impl.StreamWriterBase + org.jibx.runtime.impl.ISO88591StreamWriter ++
public class ISO88591StreamWriter
+Handler for marshalling text document to a UTF-8 output stream. +
+ +
+
+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 | +|
---|---|
+ IXMLWriter |
+createChildWriter(java.lang.String[] uris)
+
++ Create a child writer instance to be used for a separate binding. |
+
+protected void |
+defineNamespace(int index,
+ java.lang.String prefix)
+
++ Report that namespace has been defined. |
+
+protected void |
+writeAttributeText(java.lang.String text)
+
++ Write attribute text to output. |
+
+ void |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+protected void |
+writeMarkup(char chr)
+
++ Write markup character to output. |
+
+protected void |
+writeMarkup(java.lang.String text)
+
++ Write markup text to output. |
+
+ void |
+writeTextContent(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 | +
---|
+public ISO88591StreamWriter(java.lang.String[] uris)+
+
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")+public ISO88591StreamWriter(ISO88591StreamWriter base, + java.lang.String[] uris)+
+
base
- instance to be used as base for writeruris
- ordered array of URIs for namespaces used in document
+ (see ISO88591StreamWriter(String[])
)+Method Detail | +
---|
+protected void writeMarkup(java.lang.String text) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
text
- markup text to be written
+java.io.IOException
- if error writing to document+protected void writeMarkup(char chr) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
chr
- markup character to be written
+java.io.IOException
- if error writing to document+protected void defineNamespace(int index, + java.lang.String prefix) + throws java.io.IOException+
+
defineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index numberprefix
- prefix used for namespace
+java.io.IOException
- if error writing to document+protected void writeAttributeText(java.lang.String text) + throws java.io.IOException+
+
writeAttributeText
in class XMLWriterBase
text
- attribute value text to be written
+java.io.IOException
- if error writing to document+public void writeTextContent(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public IXMLWriter createChildWriter(java.lang.String[] uris)+
+
createChildWriter
in class XMLWriterBase
uris
- ordered array of URIs for namespaces used in document
+ (see ISO88591StreamWriter(String[])
)
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.runtime.impl.XMLWriterBase ++
public abstract class XMLWriterBase
+Base implementation of XML writer interface. This provides common handling of + indentation and formatting that can be used for all forms of text output. +
+ +
+
+Field Summary | +|
---|---|
+protected boolean |
+m_contentSeen
+
++ Flag for current element has content. |
+
+protected boolean |
+m_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 | +|
---|---|
+ void |
+addAttribute(int index,
+ java.lang.String name,
+ java.lang.String value)
+
++ Add attribute to current open start tag. |
+
+abstract void |
+close()
+
++ Close document output. |
+
+ void |
+closeEmptyTag()
+
++ Close the current open start tag as an empty element. |
+
+ void |
+closeStartTag()
+
++ Close the current open start tag. |
+
+abstract IXMLWriter |
+createChildWriter(java.lang.String[] uris)
+
++ Create a child writer instance to be used for a separate binding. |
+
+ void |
+endTag(int index,
+ java.lang.String name)
+
++ Generate end tag. |
+
+abstract void |
+flush()
+
++ Flush document output. |
+
+protected abstract void |
+indent(int bias)
+
++ Request output indent with bias from current element nesting level. |
+
+ void |
+reset()
+
++ Reset to initial state for reuse. |
+
+ void |
+startTagClosed(int index,
+ java.lang.String name)
+
++ Generate closed start tag. |
+
+ void |
+startTagNamespaces(int index,
+ java.lang.String name,
+ int[] nums,
+ java.lang.String[] prefs)
+
++ Generate start tag for element with namespaces. |
+
+ void |
+startTagOpen(int index,
+ java.lang.String name)
+
++ Generate open start tag. |
+
+protected abstract void |
+writeAttributeText(java.lang.String text)
+
++ Write attribute text to output. |
+
+ void |
+writeComment(java.lang.String text)
+
++ Write comment to document. |
+
+ void |
+writeDocType(java.lang.String name,
+ java.lang.String sys,
+ java.lang.String pub,
+ java.lang.String subset)
+
++ Write DOCTYPE declaration to document. |
+
+ void |
+writeEntityRef(java.lang.String name)
+
++ Write entity reference to document. |
+
+protected abstract void |
+writeMarkup(char chr)
+
++ Write markup character to output. |
+
+protected abstract void |
+writeMarkup(java.lang.String text)
+
++ Write markup text to output. |
+
+ void |
+writePI(java.lang.String target,
+ java.lang.String data)
+
++ Write processing instruction to document. |
+
+protected abstract void |
+writePrefix(int index)
+
++ Write namespace prefix to output. |
+
+ void |
+writeXMLDecl(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 | +
---|
+protected boolean m_textSeen+
+
+protected boolean m_contentSeen+
+
+Constructor Detail | +
---|
+public XMLWriterBase(java.lang.String[] uris)+
+
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 | +
---|
+protected abstract void writeMarkup(java.lang.String text) + throws java.io.IOException+
+
text
- markup text to be written
+java.io.IOException
- if error writing to document+protected abstract void writeMarkup(char chr) + throws java.io.IOException+
+
chr
- markup character to be written
+java.io.IOException
- if error writing to document+protected abstract void writePrefix(int index) + throws java.io.IOException+
+
index
- namespace URI index number
+java.io.IOException
- if error writing to document+protected abstract void writeAttributeText(java.lang.String text) + throws java.io.IOException+
+
text
- attribute value text to be written
+java.io.IOException
- if error writing to document+protected abstract void indent(int bias) + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void writeXMLDecl(java.lang.String version, + java.lang.String encoding, + java.lang.String standalone) + throws java.io.IOException+
+
version
- XML version textencoding
- text for encoding attribute (unspecified if
+ null
)standalone
- text for standalone attribute (unspecified if
+ null
)
+java.io.IOException
- on error writing to document+public void startTagOpen(int index, + java.lang.String name) + throws java.io.IOException+
closeStartTag()
call.
++
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void startTagNamespaces(int index, + java.lang.String name, + int[] nums, + java.lang.String[] prefs) + throws java.io.IOException+
+
index
- namespace URI index numbername
- element namenums
- 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)
+java.io.IOException
- on error writing to document+public void addAttribute(int index, + java.lang.String name, + java.lang.String value) + throws java.io.IOException+
startTagOpen(int, java.lang.String)
or startTagNamespaces(int, java.lang.String, int[], java.lang.String[])
and before the
+ corresponding call to closeStartTag()
.
++
index
- namespace URI index numbername
- unqualified attribute namevalue
- text value for attribute
+java.io.IOException
- on error writing to document+public void closeStartTag() + throws java.io.IOException+
startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+public void closeEmptyTag() + throws java.io.IOException+
startTagOpen(int, java.lang.String)
.
++
java.io.IOException
- on error writing to document+public void startTagClosed(int index, + java.lang.String name) + throws java.io.IOException+
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void endTag(int index, + java.lang.String name) + throws java.io.IOException+
+
index
- namespace URI index numbername
- unqualified element name
+java.io.IOException
- on error writing to document+public void writeComment(java.lang.String text) + throws java.io.IOException+
+
text
- comment text
+java.io.IOException
- on error writing to document+public void writeEntityRef(java.lang.String name) + throws java.io.IOException+
+
name
- entity name
+java.io.IOException
- on error writing to document+public void writeDocType(java.lang.String name, + java.lang.String sys, + java.lang.String pub, + java.lang.String subset) + throws java.io.IOException+
+
name
- root element namesys
- 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)
+java.io.IOException
- on error writing to document+public void writePI(java.lang.String target, + java.lang.String data) + throws java.io.IOException+
+
target
- processing instruction target namedata
- processing instruction data
+java.io.IOException
- on error writing to document+public abstract void flush() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public abstract void close() + throws java.io.IOException+
+
java.io.IOException
- on error writing to document+public void reset()+
+
reset
in interface IXMLWriter
reset
in class XMLWriterNamespaceBase
+public abstract IXMLWriter createChildWriter(java.lang.String[] uris)+
+
uris
- ordered array of URIs for namespaces used in document
+ (see XMLWriterBase(String[])
)
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.UTF8Escaper ++
public class UTF8Escaper
+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). +
+ +
+
+Field Summary | +|
---|---|
+private static UTF8Escaper |
+s_instance
+
++ Singleton instance of class. |
+
+Constructor Summary | +|
---|---|
+private |
+UTF8Escaper()
+
++ Private constructor to prevent external creation. |
+
+Method Summary | +|
---|---|
+static ICharacterEscaper |
+getInstance()
+
++ Get instance of escaper. |
+
+ void |
+writeAttribute(java.lang.String text,
+ java.io.Writer writer)
+
++ Write attribute value with character entity substitutions. |
+
+ void |
+writeCData(java.lang.String text,
+ java.io.Writer writer)
+
++ Write CDATA to document. |
+
+ void |
+writeContent(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 | +
---|
+private static final UTF8Escaper s_instance+
+
+Constructor Detail | +
---|
+private UTF8Escaper()+
+
+Method Detail | +
---|
+public void writeAttribute(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeAttribute
in interface ICharacterEscaper
text
- attribute value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeContent(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeContent
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text, + java.io.Writer writer) + throws java.io.IOException+
+
writeCData
in interface ICharacterEscaper
text
- content value textwriter
- sink for output text
+java.io.IOException
- on error writing to document+public static ICharacterEscaper getInstance()+
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + java.io.InputStream + org.jibx.runtime.impl.InputStreamWrapper.WrappedStream ++
private class InputStreamWrapper.WrappedStream
+Stream that just uses the enclosing class to buffer input from the + wrapped stream. +
+ +
+
+Constructor Summary | +|
---|---|
+private |
+InputStreamWrapper.WrappedStream()
+
++ |
+
+Method Summary | +|
---|---|
+ int |
+available()
+
++ |
+
+ void |
+close()
+
++ |
+
+ int |
+read()
+
++ |
+
+ int |
+read(byte[] b)
+
++ |
+
+ int |
+read(byte[] b,
+ int off,
+ int len)
+
++ |
+
+ long |
+skip(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 | +
---|
+private InputStreamWrapper.WrappedStream()+
+Method Detail | +
---|
+public int available() + throws java.io.IOException+
available
in class java.io.InputStream
java.io.IOException
+public void close() + throws java.io.IOException+
close
in interface java.io.Closeable
close
in class java.io.InputStream
java.io.IOException
+public int read(byte[] b, + int off, + int len) + throws java.io.IOException+
read
in class java.io.InputStream
java.io.IOException
+public int read(byte[] b) + throws java.io.IOException+
read
in class java.io.InputStream
java.io.IOException
+public long skip(long n) + throws java.io.IOException+
skip
in class java.io.InputStream
java.io.IOException
+public int read() + throws java.io.IOException+
read
in class java.io.InputStream
java.io.IOException
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+Interfaces
+
+ +BackFillReference + +ITrackSourceImpl |
+
+Classes
+
+ +ArrayRangeIterator + +BackFillArray + +BackFillHolder + +GenericXMLWriter + +InputStreamWrapper + +ISO88591Escaper + +ISO88591StreamWriter + +MarshallingContext + +SparseArrayIterator + +StreamWriterBase + +StringIntHashMap + +UnmarshallingContext + +USASCIIEscaper + +UTF8Escaper + +UTF8StreamWriter + +XMLWriterBase + +XMLWriterNamespaceBase + +XMLWriterNamespaceBase.DeclarationInfo |
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+See:
+
+ Description
+
+ +
+Interface Summary | +|
---|---|
BackFillReference | +Backfill reference item, used for filling in forward references to + objects. | +
ITrackSourceImpl | +Unmarshalling source tracking implementation interface. | +
+ +
+Class Summary | +|
---|---|
ArrayRangeIterator | +Iterator class for values contained in an array range. | +
BackFillArray | +Backfill reference item, used for filling in forward references as + members of arrays. | +
BackFillHolder | +Holder used to collect forward references to a particular object. | +
GenericXMLWriter | +Generic handler for marshalling text document to a writer. | +
InputStreamWrapper | +Wrapper for input stream that supports multiple character encodings. | +
ISO88591Escaper | +Handler for writing ASCII output stream. | +
ISO88591StreamWriter | +Handler for marshalling text document to a UTF-8 output stream. | +
MarshallingContext | +JiBX serializer supplying convenience methods for marshalling. | +
SparseArrayIterator | +Iterator class for sparse values in an array. | +
StreamWriterBase | +Base handler for marshalling text document to an output stream. | +
StringIntHashMap | +Hash map using String values as keys mapped to primitive
+ int values. |
+
UnmarshallingContext | +XMLPull parser wrapper supplying convenience methods for access. | +
USASCIIEscaper | +Handler for writing ASCII output stream. | +
UTF8Escaper | +Handler for writing UTF output stream (for any form of UTF, despite the + name). | +
UTF8StreamWriter | +Handler for marshalling text document to a UTF-8 output stream. | +
XMLWriterBase | +Base implementation of XML writer interface. | +
XMLWriterNamespaceBase | +Base implementation of XML writer interface namespace handling. | +
XMLWriterNamespaceBase.DeclarationInfo | +Namespace declaration tracking information. | +
+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. +
+ +
+
+
+
|
++ + | +|||||
+ PREV PACKAGE + NEXT PACKAGE | ++ FRAMES + NO FRAMES + + + + + | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.ArrayRangeIterator ++
public class ArrayRangeIterator
+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. +
+ +
+
+Field Summary | +|
---|---|
+static ArrayRangeIterator |
+EMPTY_ITERATOR
+
++ Empty iterator used whenever possible. |
+
+protected java.lang.Object[] |
+m_array
+
++ Array supplying values for iteration. |
+
+protected int |
+m_limit
+
++ Ending offset for values. |
+
+protected int |
+m_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.Iterator |
+buildIterator(java.lang.Object[] array,
+ int start,
+ int limit)
+
++ Build iterator. |
+
+ boolean |
+hasNext()
+
++ Check for iteration element available. |
+
+ java.lang.Object |
+next()
+
++ Get next iteration element. |
+
+ void |
+remove()
+
++ Remove element from iteration. |
+
Methods inherited from class java.lang.Object | +
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
+
+Field Detail | +
---|
+public static final ArrayRangeIterator EMPTY_ITERATOR+
+
+protected java.lang.Object[] m_array+
+
+protected int m_offset+
+
+protected int m_limit+
+
+Constructor Detail | +
---|
+private ArrayRangeIterator(java.lang.Object[] array, + int start, + int limit)+
+
array
- array containing values to be iteratedstart
- starting offset in arraylimit
- offset past end of values+Method Detail | +
---|
+public boolean hasNext()+
+
hasNext
in interface java.util.Iterator
true
if element available, false
if
+ not+public java.lang.Object next()+
+
next
in interface java.util.Iterator
java.util.NoSuchElementException
- if past end of iteration+public void remove()+
+
remove
in interface java.util.Iterator
java.lang.UnsupportedOperationException
- for unsupported operation+public static java.util.Iterator buildIterator(java.lang.Object[] array, + int start, + int limit)+
+
array
- array containing values to be iterated (may be
+ null
)start
- starting offset in arraylimit
- offset past end of values
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.UnmarshallingContext ++
public class UnmarshallingContext
+XMLPull parser wrapper supplying convenience methods for access. Most of + these methods are designed for use in code generated by the binding + generator. +
+ +
+
+Field Summary | +|
---|---|
+static int |
+CDSECT
+
++ |
+
+static int |
+COMMENT
+
++ |
+
+private static java.lang.String |
+DEFAULT_PARSER_NAME
+
++ Default parser factory name when nothing else found. |
+
+static int |
+DOCDECL
+
++ |
+
+private static java.lang.String[] |
+EMPTY_STRING_ARRAY
+
++ Empty array of strings. |
+
+static int |
+END_DOCUMENT
+
++ |
+
+static int |
+END_TAG
+
++ |
+
+static int |
+ENTITY_REF
+
++ |
+
+static int |
+IGNORABLE_WHITESPACE
+
++ |
+
+private static int |
+INITIAL_STACK_SIZE
+
++ Starting size for object stack. |
+
+private java.lang.String |
+m_docName
+
++ Document name (may be null ). |
+
+private IBindingFactory |
+m_factory
+
++ Binding factory used to create this unmarshaller. |
+
+protected int |
+m_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.String |
+m_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.XmlPullParser |
+m_parser
+
++ Parser in use. |
+
+protected int |
+m_stackDepth
+
++ Current unmarshalling stack depth. |
+
+private InputStreamWrapper |
+m_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.HashMap |
+m_unmarshalMap
+
++ Mapping from element name to class index. |
+
+static int |
+PROCESSING_INSTRUCTION
+
++ |
+
+private static org.xmlpull.v1.XmlPullParserFactory |
+s_factory
+
++ Factory used for constructing parser instances. |
+
+static int |
+START_DOCUMENT
+
++ |
+
+static int |
+START_TAG
+
++ |
+
+static int |
+TEXT
+
++ |
+
+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.String |
+accumulateText()
+
++ Accumulate text content. |
+
+ void |
+addUnmarshalling(int index,
+ java.lang.String ns,
+ java.lang.String name,
+ java.lang.String cname)
+
++ Define unmarshalling for element. |
+
+private void |
+advance()
+
++ Advance to next parse item. |
+
+ boolean |
+attributeBoolean(java.lang.String ns,
+ java.lang.String name)
+
++ Get boolean value of attribute from current start tag. |
+
+ boolean |
+attributeBoolean(java.lang.String ns,
+ java.lang.String name,
+ boolean dflt)
+
++ Get boolean value of optional attribute from current start tag. |
+
+ byte |
+attributeByte(java.lang.String ns,
+ java.lang.String name)
+
++ Get byte value of attribute from current start tag. |
+
+ byte |
+attributeByte(java.lang.String ns,
+ java.lang.String name,
+ byte dflt)
+
++ Get byte value of optional attribute from current start tag. |
+
+ char |
+attributeChar(java.lang.String ns,
+ java.lang.String name)
+
++ Get char value of attribute from current start tag. |
+
+ char |
+attributeChar(java.lang.String ns,
+ java.lang.String name,
+ char dflt)
+
++ Get char value of optional attribute from current start tag. |
+
+ java.util.Date |
+attributeDate(java.lang.String ns,
+ java.lang.String name)
+
++ Get java.util.Date value of attribute from current start
+ tag. |
+
+ java.util.Date |
+attributeDate(java.lang.String ns,
+ java.lang.String name,
+ java.util.Date dflt)
+
++ Get java.util.Date value of optional attribute from current
+ start tag. |
+
+ double |
+attributeDouble(java.lang.String ns,
+ java.lang.String name)
+
++ Get double value of attribute from current start tag. |
+
+ double |
+attributeDouble(java.lang.String ns,
+ java.lang.String name,
+ double dflt)
+
++ Get double value of optional attribute from current start tag. |
+
+ int |
+attributeEnumeration(java.lang.String ns,
+ java.lang.String name,
+ java.lang.String[] enums,
+ int[] vals)
+
++ Get enumeration attribute value from current start tag. |
+
+ int |
+attributeEnumeration(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.Object |
+attributeExistingIDREF(java.lang.String ns,
+ java.lang.String name,
+ int index)
+
++ Get previously defined object corresponding to IDREF attribute from + current start tag. |
+
+ float |
+attributeFloat(java.lang.String ns,
+ java.lang.String name)
+
++ Get float value of attribute from current start tag. |
+
+ float |
+attributeFloat(java.lang.String ns,
+ java.lang.String name,
+ float dflt)
+
++ Get float value of optional attribute from current start tag. |
+
+ java.lang.Object |
+attributeForwardIDREF(java.lang.String ns,
+ java.lang.String name,
+ int index)
+
++ Get object (if defined yet) corresponding to IDREF attribute from + current start tag. |
+
+ int |
+attributeInt(java.lang.String ns,
+ java.lang.String name)
+
++ Get integer value of attribute from current start tag. |
+
+ int |
+attributeInt(java.lang.String ns,
+ java.lang.String name,
+ int dflt)
+
++ Get integer value of optional attribute from current + start tag. |
+
+ long |
+attributeLong(java.lang.String ns,
+ java.lang.String name)
+
++ Get long value of attribute from current start tag. |
+
+ long |
+attributeLong(java.lang.String ns,
+ java.lang.String name,
+ long dflt)
+
++ Get long value of optional attribute from current start tag. |
+
+ short |
+attributeShort(java.lang.String ns,
+ java.lang.String name)
+
++ Get short value of attribute from current start tag. |
+
+ short |
+attributeShort(java.lang.String ns,
+ java.lang.String name,
+ short dflt)
+
++ Get short value of optional attribute from current start tag. |
+
+ java.lang.String |
+attributeText(java.lang.String ns,
+ java.lang.String name)
+
++ Get text value of attribute from current start tag. |
+
+ 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. |
+
+static java.lang.String |
+buildNameString(java.lang.String ns,
+ java.lang.String name)
+
++ Build name with optional namespace. |
+
+ java.lang.String |
+buildPositionString()
+
++ Build current parse input position description. |
+
+ void |
+checkAllowedAttributes(java.lang.String[] nss,
+ java.lang.String[] names)
+
++ Check that only allowed attributes are present on current start tag. |
+
+ boolean |
+convertBoolean(java.lang.String text)
+
++ Convert boolean value. |
+
+ byte |
+convertByte(java.lang.String text)
+
++ Convert byte value with exception wrapper. |
+
+ char |
+convertChar(java.lang.String text)
+
++ Convert char value with exception wrapper. |
+
+ java.util.Date |
+convertDate(java.lang.String text)
+
++ Convert java.util.Date value with exception wrapper. |
+
+ double |
+convertDouble(java.lang.String text)
+
++ Convert double value with exception wrapper. |
+
+ int |
+convertEnum(java.lang.String target,
+ java.lang.String[] enums,
+ int[] vals)
+
++ Find required text value in enumeration. |
+
+ int |
+convertEnum(java.lang.String target,
+ java.lang.String[] enums,
+ int[] vals,
+ int dflt)
+
++ Find optional text value in enumeration. |
+
+ float |
+convertFloat(java.lang.String text)
+
++ Convert float value with exception wrapper. |
+
+ long |
+convertLong(java.lang.String text)
+
++ Convert long value with exception wrapper. |
+
+ short |
+convertShort(java.lang.String text)
+
++ Convert short value with exception wrapper. |
+
+private void |
+createParser(boolean nsa)
+
++ Create parser if one does not already exist. |
+
+ int |
+currentEvent()
+
++ Get the current parse event type. |
+
+ java.lang.String |
+currentNameString()
+
++ Build current element name, with optional namespace. |
+
+ void |
+defineID(java.lang.String id,
+ int index,
+ java.lang.Object obj)
+
++ Define object for ID. |
+
+ java.lang.Object |
+findDefinedID(java.lang.String id,
+ int index)
+
++ Find previously defined object corresponding to an ID. |
+
+ java.lang.Object |
+findID(java.lang.String id,
+ int index)
+
++ Find the object corresponding to an ID. |
+
+ int |
+getActiveNamespaceCount()
+
++ Get count of active namespaces. |
+
+ java.lang.String |
+getActiveNamespacePrefix(int index)
+
++ Get prefix for an active namespace. |
+
+ java.lang.String |
+getActiveNamespaceUri(int index)
+
++ Get URI for an active namespace. |
+
+ int |
+getAttributeCount()
+
++ Get number of attributes for current START_ELEMENT event. |
+
+ java.lang.String |
+getAttributeName(int index)
+
++ Get attribute name for current START_ELEMENT event. |
+
+ java.lang.String |
+getAttributeNamespace(int index)
+
++ Get attribute namespace for current START_ELEMENT event. |
+
+ java.lang.String |
+getAttributePrefix(int index)
+
++ Get attribute namespace prefix for current START_ELEMENT event. |
+
+ java.lang.String |
+getAttributeValue(int index)
+
++ Get attribute value for current START_ELEMENT event. |
+
+private java.lang.String |
+getAttributeValue(java.lang.String ns,
+ java.lang.String name)
+
++ Get attribute value from parser. |
+
+ java.lang.String |
+getDocumentName()
+
++ Return the supplied document name. |
+
+ java.lang.String |
+getElementName()
+
++ Returns current element name. |
+
+ java.lang.String |
+getElementNamespace()
+
++ Returns current element namespace URI. |
+
+ IBindingFactory |
+getFactory()
+
++ Return the binding factory used to create this unmarshaller. |
+
+ java.lang.String |
+getInputEncoding()
+
++ Return the input encoding, if known. |
+
+ java.lang.String |
+getName()
+
++ Get name associated with current parse event. |
+
+ java.lang.String |
+getNamespace()
+
++ Get namespace associated with current parse event. |
+
+ int |
+getNamespaceCount()
+
++ Get number of namespace declarations for current START_ELEMENT event. |
+
+ java.lang.String |
+getNamespacePrefix(int index)
+
++ Get namespace prefix for namespace declaration on current START_ELEMENT + event. |
+
+ java.lang.String |
+getNamespaceUri(int index)
+
++ Get namespace URI for namespace declaration on current START_ELEMENT + event. |
+
+ java.lang.String |
+getNamespaceUri(java.lang.String prefix)
+
++ Get namespace URI matching prefix. |
+
+ java.lang.String |
+getPrefix()
+
++ Get namespace prefix associated with current parse event. |
+
+ int |
+getStackDepth()
+
++ Get current unmarshalling object stack depth. |
+
+ java.lang.Object |
+getStackObject(int depth)
+
++ Get object from unmarshalling stack. |
+
+ java.lang.Object |
+getStackTop()
+
++ Get top object on unmarshalling stack. |
+
+ java.lang.String |
+getText()
+
++ Get text value for current event. |
+
+ IUnmarshaller |
+getUnmarshaller(int index)
+
++ Find the unmarshaller for a particular class index in the current + context. |
+
+ IUnmarshaller |
+getUnmarshaller(java.lang.String ns,
+ java.lang.String name)
+
++ Find the unmarshaller for a particular element name (including + namespace) in the current context. |
+
+ boolean |
+hasAnyAttribute(java.lang.String[] nss,
+ java.lang.String[] names)
+
++ Check if any of several attributes is present on current start tag. |
+
+ boolean |
+hasAttribute(java.lang.String ns,
+ java.lang.String name)
+
++ Check if attribute is present on current start tag. |
+
+ boolean |
+isAt(java.lang.String ns,
+ java.lang.String name)
+
++ Check if next tag is start of element. |
+
+ boolean |
+isEnd()
+
++ Check if next tag is an end tag. |
+
+protected void |
+mapUnmarshalling(int index)
+
++ Map unmarshalling for element. |
+
+private void |
+matchStart(java.lang.String ns,
+ java.lang.String name)
+
++ Internal parse to expected start tag. |
+
+ int |
+next()
+
++ Advance to next major parse event. |
+
+ int |
+nextToken()
+
++ Advance to next parse event. |
+
+ byte |
+parseContentByte(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning byte value of content. |
+
+ char |
+parseContentChar(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning char value of content. |
+
+ int |
+parseContentEnumeration(java.lang.String ns,
+ java.lang.String tag,
+ java.lang.String[] enums,
+ int[] vals)
+
++ Parse past end of element, returning enumeration value of content. |
+
+ int |
+parseContentInt(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning integer value of + content. |
+
+ short |
+parseContentShort(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning short value of content. |
+
+ java.lang.String |
+parseContentText()
+
++ Parse required text content. |
+
+ java.lang.String |
+parseContentText(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning optional text content. |
+
+ boolean |
+parseElementBoolean(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning boolean value of content. |
+
+ boolean |
+parseElementBoolean(java.lang.String ns,
+ java.lang.String tag,
+ boolean dflt)
+
++ Parse entire element, returning boolean value of optional content. |
+
+ byte |
+parseElementByte(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning byte value of content. |
+
+ byte |
+parseElementByte(java.lang.String ns,
+ java.lang.String tag,
+ byte dflt)
+
++ Parse entire element, returning byte value of optional content. |
+
+ char |
+parseElementChar(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning char value of content. |
+
+ char |
+parseElementChar(java.lang.String ns,
+ java.lang.String tag,
+ char dflt)
+
++ Parse entire element, returning char value of optional content. |
+
+ java.util.Date |
+parseElementDate(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning java.util.Date value
+ of content. |
+
+ java.util.Date |
+parseElementDate(java.lang.String ns,
+ java.lang.String tag,
+ java.util.Date dflt)
+
++ Parse entire element, returning java.util.Date value of
+ optional content. |
+
+ double |
+parseElementDouble(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning double value of content. |
+
+ double |
+parseElementDouble(java.lang.String ns,
+ java.lang.String tag,
+ double dflt)
+
++ Parse entire element, returning double value of optional content. |
+
+ int |
+parseElementEnumeration(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.Object |
+parseElementExistingIDREF(java.lang.String ns,
+ java.lang.String tag,
+ int index)
+
++ Parse entire element, returning previously defined object corresponding + to content interpreted as IDREF. |
+
+ float |
+parseElementFloat(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning float value of content. |
+
+ float |
+parseElementFloat(java.lang.String ns,
+ java.lang.String tag,
+ float dflt)
+
++ Parse entire element, returning float value of optional content. |
+
+ java.lang.Object |
+parseElementForwardIDREF(java.lang.String ns,
+ java.lang.String tag,
+ int index)
+
++ Parse entire element, returning object (if defined yet) corresponding + to content interpreted as IDREF. |
+
+ int |
+parseElementInt(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning integer value of content. |
+
+ int |
+parseElementInt(java.lang.String ns,
+ java.lang.String tag,
+ int dflt)
+
++ Parse entire optional element, returning integer value of content. |
+
+ long |
+parseElementLong(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past end of element, returning long value of content. |
+
+ long |
+parseElementLong(java.lang.String ns,
+ java.lang.String tag,
+ long dflt)
+
++ Parse entire element, returning long value of optional content. |
+
+ short |
+parseElementShort(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning short value of content. |
+
+ short |
+parseElementShort(java.lang.String ns,
+ java.lang.String tag,
+ short dflt)
+
++ Parse entire element, returning short value of optional content. |
+
+ java.lang.String |
+parseElementText(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse entire element, returning text content. |
+
+ java.lang.String |
+parseElementText(java.lang.String ns,
+ java.lang.String tag,
+ java.lang.String dflt)
+
++ Parse entire element, returning optional text content. |
+
+ boolean |
+parseIfStartTag(java.lang.String ns,
+ java.lang.String name)
+
++ Parse past start of element. |
+
+ void |
+parsePastCurrentEndTag(java.lang.String ns,
+ java.lang.String name)
+
++ Parse past current end of element. |
+
+ void |
+parsePastElement(java.lang.String ns,
+ java.lang.String tag)
+
++ Parse past element, ignoring all content. |
+
+ void |
+parsePastEndTag(java.lang.String ns,
+ java.lang.String name)
+
++ Parse past end of element. |
+
+ void |
+parsePastStartTag(java.lang.String ns,
+ java.lang.String name)
+
++ Parse past start of element. |
+
+ void |
+parseToStartTag(java.lang.String ns,
+ java.lang.String name)
+
++ Parse to start of element. |
+
+ void |
+popObject()
+
++ Pop unmarshalled object from stack. |
+
+ void |
+pushObject(java.lang.Object obj)
+
++ Push created object to unmarshalling stack. |
+
+ void |
+pushTrackedObject(java.lang.Object obj)
+
++ Push created object to unmarshalling stack with position tracking. |
+
+ void |
+registerBackFill(int index,
+ BackFillReference fill)
+
++ Register back fill item for last parsed ID value. |
+
+ void |
+registerBackFill(java.lang.String id,
+ int index,
+ BackFillReference fill)
+
++ Register back fill item for undefined ID value. |
+
+ void |
+removeUnmarshalling(int index)
+
++ Undefine unmarshalling for element. |
+
+ void |
+reset()
+
++ Reset unmarshalling information. |
+
+ void |
+setDocument(java.io.InputStream ins,
+ java.lang.String enc)
+
++ Set document to be parsed from stream. |
+
+ void |
+setDocument(java.io.InputStream ins,
+ java.lang.String enc,
+ boolean nsa)
+
++ Set document to be parsed from stream. |
+
+ void |
+setDocument(java.io.InputStream ins,
+ java.lang.String name,
+ java.lang.String enc)
+
++ Set named document to be parsed from stream. |
+
+ void |
+setDocument(java.io.Reader rdr)
+
++ Set document to be parsed from reader. |
+
+ void |
+setDocument(java.io.Reader rdr,
+ boolean nsa)
+
++ Set document to be parsed from reader. |
+
+ void |
+setDocument(java.io.Reader rdr,
+ java.lang.String name)
+
++ Set named document to be parsed from reader. |
+
+ void |
+setFromContext(UnmarshallingContext parent)
+
++ Initializes the context to use the same parser and document as another + unmarshalling context. |
+
+ void |
+skipElement()
+
++ Skip past current element. |
+
+ void |
+throwEndTagNameError(java.lang.String ns,
+ java.lang.String name)
+
++ Throw exception for expected element end tag not found. |
+
+ void |
+throwException(java.lang.String msg)
+
++ Throw exception with position information. |
+
+ void |
+throwException(java.lang.String msg,
+ java.lang.Exception ex)
+
++ Throw exception with position information and nested exception. |
+
+ void |
+throwStartTagException(java.lang.String msg)
+
++ Throw exception with start tag and position information. |
+
+ void |
+throwStartTagException(java.lang.String msg,
+ java.lang.Exception ex)
+
++ Throw exception with start tag, position information, and nested + exception. |
+
+ void |
+throwStartTagNameError(java.lang.String ns,
+ java.lang.String name)
+
++ Throw exception for expected element start tag not found. |
+
+ java.lang.String |
+toEnd()
+
++ Parse to end tag. |
+
+ java.lang.String |
+toStart()
+
++ Parse to start tag. |
+
+ int |
+toTag()
+
++ Parse to start or end tag. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.InputStream ins,
+ java.lang.String enc)
+
++ Unmarshal document from stream to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.InputStream ins,
+ java.lang.String name,
+ java.lang.String enc)
+
++ Unmarshal named document from stream to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.Reader rdr)
+
++ Unmarshal document from reader to object. |
+
+ java.lang.Object |
+unmarshalDocument(java.io.Reader rdr,
+ java.lang.String name)
+
++ Unmarshal named document from reader to object. |
+
+ java.lang.Object |
+unmarshalElement()
+
++ Unmarshal required element. |
+
+ java.lang.Object |
+unmarshalElement(java.lang.Class clas)
+
++ Unmarshal required element of specified type. |
+
+ java.lang.Object |
+unmarshalOptionalElement()
+
++ Unmarshal optional element. |
+
+private boolean |
+verifyNamespace(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 | +
---|
+public static final int START_DOCUMENT+
+public static final int END_DOCUMENT+
+public static final int START_TAG+
+public static final int END_TAG+
+public static final int TEXT+
+public static final int CDSECT+
+public static final int ENTITY_REF+
+public static final int IGNORABLE_WHITESPACE+
+public static final int PROCESSING_INSTRUCTION+
+public static final int COMMENT+
+public static final int DOCDECL+
+private static final java.lang.String DEFAULT_PARSER_NAME+
+
+private static final int INITIAL_STACK_SIZE+
+
+private static final java.lang.String[] EMPTY_STRING_ARRAY+
+
+private static org.xmlpull.v1.XmlPullParserFactory s_factory+
+
+private IBindingFactory m_factory+
+
+private InputStreamWrapper m_streamWrapper+
+
+private org.xmlpull.v1.XmlPullParser m_parser+
+
+private java.lang.String m_docName+
null
).
++
+protected java.lang.String[] m_unmarshallerClasses+
null
for
+ mappings out of context).
++
+protected IUnmarshaller[] m_unmarshallers+
+
+protected java.lang.String[] m_namespaces+
+
+protected java.lang.String[] m_names+
+
+protected int m_globalCount+
+
+protected java.util.HashMap[] m_idMaps+
+
+protected java.lang.String[] m_idClasses+
null
unless class-specific
+ IDs used).
++
+protected int m_stackDepth+
+
+protected java.lang.Object[] m_objectStack+
+
+protected java.util.HashMap m_unmarshalMap+
+
+protected java.lang.Integer[] m_indexes+
+
+protected java.lang.String m_idref+
+
+Constructor Detail | +
---|
+public UnmarshallingContext(int nmap, + java.lang.String[] umcs, + java.lang.String[] nss, + java.lang.String[] names, + java.lang.String[] idcs, + IBindingFactory ifact)+
+
nmap
- number of mapping definitions includedumcs
- 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 definitionsnames
- names for elements of classes with global definitionsidcs
- array of class names with IDs (null
if no IDs or
+ global IDs)ifact
- binding factory creating this unmarshaller+public UnmarshallingContext()+
+
+Method Detail | +
---|
+private void createParser(boolean nsa) + throws JiBXException+
+
nsa
- enable namespace processing by parser flag
+JiBXException
- if error creating parser+public static java.lang.String buildNameString(java.lang.String ns, + java.lang.String name)+
+
ns
- namespace URI of namename
- local name part of name
++public java.lang.String currentNameString()+
+
+public java.lang.String buildPositionString()+
+
+public void throwStartTagNameError(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI of namename
- local name part of name
+JiBXException
- always thrown+public void throwEndTagNameError(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI of namename
- local name part of name
+JiBXException
- always thrown+private void advance() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+private boolean verifyNamespace(java.lang.String ns)+
+
ns
- namespace URI expected (may be null
+ or the empty string for the empty namespace)
+true
if the current namespace matches that
+ expected, false
if not+private java.lang.String getAttributeValue(java.lang.String ns, + java.lang.String name)+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+null
if missing+public void setDocument(java.io.InputStream ins, + java.lang.String enc, + boolean nsa) + throws JiBXException+
+
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
+ determined by parsernsa
- enable namespace processing for parser flag
+JiBXException
- if error creating parser+public void setDocument(java.io.InputStream ins, + java.lang.String enc) + throws JiBXException+
+
setDocument
in interface IUnmarshallingContext
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+public void setDocument(java.io.Reader rdr, + boolean nsa) + throws JiBXException+
+
rdr
- reader supplying document datansa
- enable namespace processing for parser flag
+JiBXException
- if error creating parser+public void setDocument(java.io.Reader rdr) + throws JiBXException+
+
setDocument
in interface IUnmarshallingContext
rdr
- reader supplying document data
+JiBXException
- if error creating parser+public void setDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + throws JiBXException+
+
setDocument
in interface IUnmarshallingContext
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+public void setDocument(java.io.Reader rdr, + java.lang.String name) + throws JiBXException+
+
setDocument
in interface IUnmarshallingContext
rdr
- reader supplying document dataname
- document name
+JiBXException
- if error creating parser+public void setFromContext(UnmarshallingContext parent)+
+
parent
- context supplying parser and document to be unmarshalled+public void reset()+
+
reset
in interface IUnmarshallingContext
+public java.lang.String toStart() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String toEnd() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public int toTag() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public boolean isAt(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
isAt
in interface IUnmarshallingContext
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+true
if at start of element with supplied name,
+ false
if not
+JiBXException
- on any error (possibly wrapping other exception)+public boolean hasAttribute(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+true
if named attribute is present,
+ false
if not
+JiBXException
- on any error (possibly wrapping other exception)+public boolean hasAnyAttribute(java.lang.String[] nss, + java.lang.String[] names) + throws JiBXException+
+
nss
- namespace URIs for expected attributes (each may be
+ null
or the empty string for the empty namespace)names
- attribute names expected
+true
if at least one of the named attributes is
+ present, false
if not
+JiBXException
- on any error (possibly wrapping other exception)+public void checkAllowedAttributes(java.lang.String[] nss, + java.lang.String[] names) + throws JiBXException+
+
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)
+JiBXException
- on any error (possibly wrapping other exception)+private void matchStart(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public void parseToStartTag(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public void parsePastStartTag(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public boolean parseIfStartTag(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public void parsePastCurrentEndTag(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public void parsePastEndTag(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)name
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public boolean isEnd() + throws JiBXException+
+
isEnd
in interface IUnmarshallingContext
true
if at end of element, false
if
+ at start
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String accumulateText() + throws JiBXException+
+
JiBXException
- on error in unmarshalling+public java.lang.String parseContentText() + throws JiBXException+
+
JiBXException
- on any error (possible wrapping other exception)+public java.lang.String parseContentText(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public int parseContentInt(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public java.lang.String parseElementText(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public java.lang.String parseElementText(java.lang.String ns, + java.lang.String tag, + java.lang.String dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default text value
+JiBXException
- on any error (possible wrapping other exception)+public java.lang.String attributeText(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present+public java.lang.String attributeText(java.lang.String ns, + java.lang.String name, + java.lang.String dflt)+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
++public java.lang.Object findID(java.lang.String id, + int index) + throws JiBXException+
+
id
- ID textindex
- expected reference type index
+null
if not
+ yet defined
+JiBXException
- on any error+public java.lang.Object findDefinedID(java.lang.String id, + int index) + throws JiBXException+
+
id
- ID textindex
- expected reference type index
+JiBXException
- on any error+public java.lang.Object parseElementForwardIDREF(java.lang.String ns, + java.lang.String tag, + int index) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- attribute name expectedindex
- expected reference type index
+null
if not
+ yet defined
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.Object attributeForwardIDREF(java.lang.String ns, + java.lang.String name, + int index) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expectedindex
- expected reference type index
+null
if not
+ yet defined
+JiBXException
- if attribute not present, or ID mapped to a
+ different type of object than expected+public java.lang.Object parseElementExistingIDREF(java.lang.String ns, + java.lang.String tag, + int index) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- attribute name expectedindex
- expected reference type index
+JiBXException
- if attribute not present, ID not defined, or
+ mapped to a different type of object than expected+public java.lang.Object attributeExistingIDREF(java.lang.String ns, + java.lang.String name, + int index) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expectedindex
- expected reference type index
+JiBXException
- if attribute not present, ID not defined, or
+ mapped to a different type of object than expected+public int attributeInt(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid integer
+ value+public int attributeInt(java.lang.String ns, + java.lang.String name, + int dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid integer+public int parseElementInt(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public int parseElementInt(java.lang.String ns, + java.lang.String tag, + int dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public int convertEnum(java.lang.String target, + java.lang.String[] enums, + int[] vals) + throws JiBXException+
+
target
- text to be found in enumerationenums
- ordered array of texts included in enumerationvals
- array of values to be returned for corresponding text match
+ positions (position returned directly if this is null
)
+JiBXException
- if target text not found in enumeration+public int convertEnum(java.lang.String target, + java.lang.String[] enums, + int[] vals, + int dflt) + throws JiBXException+
null
.
++
target
- text to be found in enumeration (may be null
)enums
- ordered array of texts included in enumerationvals
- 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
+JiBXException
- if target text not found in enumeration+public int attributeEnumeration(java.lang.String ns, + java.lang.String name, + java.lang.String[] enums, + int[] vals) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expectedenums
- ordered array of texts included in enumerationvals
- array of values to be returned for corresponding text match
+ positions (position returned directly if this is null
)
+JiBXException
- if attribute not present or value not found in
+ enumeration list+public int attributeEnumeration(java.lang.String ns, + java.lang.String name, + java.lang.String[] enums, + int[] vals, + int dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expectedenums
- ordered array of texts included in enumerationvals
- 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
+JiBXException
- if attribute not present or value not found in
+ enumeration list+public int parseContentEnumeration(java.lang.String ns, + java.lang.String tag, + java.lang.String[] enums, + int[] vals) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expectedenums
- ordered array of texts included in enumerationvals
- array of values to be returned for corresponding text match
+ positions (position returned directly if this is null
)
+JiBXException
- on any error (possible wrapping other exception)+public int parseElementEnumeration(java.lang.String ns, + java.lang.String tag, + java.lang.String[] enums, + int[] vals, + int dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expectedenums
- ordered array of texts included in enumerationvals
- array of values to be returned for corresponding text match
+ positions (position returned directly if this is null
)dflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public byte convertByte(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid byte value+public byte attributeByte(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid byte value+public byte attributeByte(java.lang.String ns, + java.lang.String name, + byte dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid byte+public byte parseContentByte(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public byte parseElementByte(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public byte parseElementByte(java.lang.String ns, + java.lang.String tag, + byte dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public short convertShort(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid short value+public short attributeShort(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid short value+public short attributeShort(java.lang.String ns, + java.lang.String name, + short dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid short+public short parseContentShort(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public short parseElementShort(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public short parseElementShort(java.lang.String ns, + java.lang.String tag, + short dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public char convertChar(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid char value+public char attributeChar(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid char value+public char attributeChar(java.lang.String ns, + java.lang.String name, + char dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid char+public char parseContentChar(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public char parseElementChar(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possibly wrapping other exception)+public char parseElementChar(java.lang.String ns, + java.lang.String tag, + char dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public long convertLong(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid long value+public long attributeLong(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid long value+public long attributeLong(java.lang.String ns, + java.lang.String name, + long dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid long+public long parseElementLong(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public long parseElementLong(java.lang.String ns, + java.lang.String tag, + long dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public boolean convertBoolean(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid boolean value+public boolean attributeBoolean(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid boolean
+ value+public boolean attributeBoolean(java.lang.String ns, + java.lang.String name, + boolean dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid boolean+public boolean parseElementBoolean(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public boolean parseElementBoolean(java.lang.String ns, + java.lang.String tag, + boolean dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public float convertFloat(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid float value+public float attributeFloat(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid float value+public float attributeFloat(java.lang.String ns, + java.lang.String name, + float dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid float+public float parseElementFloat(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public float parseElementFloat(java.lang.String ns, + java.lang.String tag, + float dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public double convertDouble(java.lang.String text) + throws JiBXException+
+
text
- text for value to be converted
+JiBXException
- if not a valid double value+public double attributeDouble(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid double
+ value+public double attributeDouble(java.lang.String ns, + java.lang.String name, + double dflt) + throws JiBXException+
+
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid double+public double parseElementDouble(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public double parseElementDouble(java.lang.String ns, + java.lang.String tag, + double dflt) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public java.util.Date convertDate(java.lang.String text) + throws JiBXException+
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.
++
text
- text for value to be converted
+JiBXException
- if not a valid Date value+public java.util.Date attributeDate(java.lang.String ns, + java.lang.String name) + throws JiBXException+
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.
++
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expected
+JiBXException
- if attribute not present or not a valid Date
+ value+public java.util.Date attributeDate(java.lang.String ns, + java.lang.String name, + java.util.Date dflt) + throws JiBXException+
java.util.Date
value of optional attribute from current
+ start tag. If the attribute is not present the supplied default value is
+ returned instead.
++
ns
- namespace URI for expected attribute (may be null
+ or the empty string for the empty namespace)name
- attribute name expecteddflt
- value to be returned if attribute is not present
+JiBXException
- if attribute value is not a valid Date+public java.util.Date parseElementDate(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
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.
++
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public java.util.Date parseElementDate(java.lang.String ns, + java.lang.String tag, + java.util.Date dflt) + throws JiBXException+
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.
++
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expecteddflt
- default value
+JiBXException
- on any error (possibly wrapping other exception)+public void registerBackFill(java.lang.String id, + int index, + BackFillReference fill) + throws JiBXException+
+
id
- target undefined ID valueindex
- target reference type indexfill
- back fill item
+JiBXException
- if attribute not present, or ID already defined+public void registerBackFill(int index, + BackFillReference fill) + throws JiBXException+
+
index
- target reference type indexfill
- back fill item
+JiBXException
- if attribute not present, or ID already defined+public void defineID(java.lang.String id, + int index, + java.lang.Object obj) + throws JiBXException+
+
id
- text ID valueindex
- ID class index numberobj
- object corresponding to element
+JiBXException
- if duplicate ID or wrong class+protected void mapUnmarshalling(int index)+
+
index
- class index for unmarshalling definition to be added+public void addUnmarshalling(int index, + java.lang.String ns, + java.lang.String name, + java.lang.String cname)+
+
index
- class index for unmarshalling definitionns
- namespace for element (may be null
+ or the empty string for the empty namespace)name
- name for elementcname
- name of class created by unmarshaller+public void removeUnmarshalling(int index)+
+
index
- class index for unmarshalling definition+public IUnmarshaller getUnmarshaller(int index) + throws JiBXException+
+
getUnmarshaller
in interface IUnmarshallingContext
index
- class index for unmarshalling definition
+JiBXException
- if unable to create unmarshaller+public IUnmarshaller getUnmarshaller(java.lang.String ns, + java.lang.String name) + throws JiBXException+
+
ns
- namespace for element (may be null
+ or the empty string for the empty namespace)name
- name for element
+null
if none
+ found
+JiBXException
- if unable to create unmarshaller+public java.lang.Object unmarshalOptionalElement() + throws JiBXException+
+
null
if end tag
+ rather than start tag seen
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.Object unmarshalElement(java.lang.Class clas) + throws JiBXException+
+
clas
- expected class of unmarshalled object
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.Object unmarshalElement() + throws JiBXException+
+
unmarshalElement
in interface IUnmarshallingContext
JiBXException
- on any error (possibly wrapping other exception)+public void parsePastElement(java.lang.String ns, + java.lang.String tag) + throws JiBXException+
+
ns
- namespace URI for expected element (may be null
+ or the empty string for the empty namespace)tag
- element name expected
+JiBXException
- on any error (possible wrapping other exception)+public java.lang.String getElementName() + throws JiBXException+
+
null
if not at a start
+ or end tag
+JiBXException
- if error from parser+public java.lang.String getElementNamespace() + throws JiBXException+
+
null
if not at a start
+ or end tag
+JiBXException
- if error from parser+public void throwStartTagException(java.lang.String msg) + throws JiBXException+
+
msg
- exception message text
+JiBXException
- always thrown+public void throwStartTagException(java.lang.String msg, + java.lang.Exception ex) + throws JiBXException+
+
msg
- exception message textex
- nested exception
+JiBXException
- always thrown+public void throwException(java.lang.String msg) + throws JiBXException+
+
msg
- exception message text
+JiBXException
- always thrown+public void throwException(java.lang.String msg, + java.lang.Exception ex) + throws JiBXException+
+
msg
- exception message textex
- nested exception
+JiBXException
- always thrown+public java.lang.Object unmarshalDocument(java.io.InputStream ins, + java.lang.String enc) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String, boolean)
were called, followed by unmarshalElement(java.lang.Class)
++
unmarshalDocument
in interface IUnmarshallingContext
ins
- stream supplying document dataenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+public java.lang.Object unmarshalDocument(java.io.Reader rdr) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String, boolean)
were called, followed by unmarshalElement(java.lang.Class)
++
unmarshalDocument
in interface IUnmarshallingContext
rdr
- reader supplying document data
+JiBXException
- if error creating parser+public java.lang.Object unmarshalDocument(java.io.InputStream ins, + java.lang.String name, + java.lang.String enc) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String, boolean)
were called, followed by unmarshalElement(java.lang.Class)
++
unmarshalDocument
in interface IUnmarshallingContext
ins
- stream supplying document dataname
- document nameenc
- document input encoding, or null
if to be
+ determined by parser
+JiBXException
- if error creating parser+public java.lang.Object unmarshalDocument(java.io.Reader rdr, + java.lang.String name) + throws JiBXException+
setDocument(java.io.InputStream, java.lang.String, boolean)
were called, followed by unmarshalElement(java.lang.Class)
++
unmarshalDocument
in interface IUnmarshallingContext
rdr
- reader supplying document dataname
- document name
+JiBXException
- if error creating parser+public IBindingFactory getFactory()+
+
+public java.lang.String getDocumentName()+
+
getDocumentName
in interface IUnmarshallingContext
null
if none)+public java.lang.String getInputEncoding()+
+
null
if unknown)+public void pushObject(java.lang.Object obj)+
+
pushObject
in interface IUnmarshallingContext
obj
- object being unmarshalled+public void pushTrackedObject(java.lang.Object obj)+
+
obj
- object being unmarshalled+public void popObject() + throws JiBXException+
+
popObject
in interface IUnmarshallingContext
JiBXException
- if no object on stack+public int getStackDepth()+
+
getStackDepth
in interface IUnmarshallingContext
+public java.lang.Object getStackObject(int depth)+
+
getStackObject
in interface IUnmarshallingContext
depth
- object depth in stack to be retrieved (must be in the range
+ of zero to the current depth minus one).
++public java.lang.Object getStackTop()+
+
getStackTop
in interface IUnmarshallingContext
null
if none+public int getActiveNamespaceCount() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getActiveNamespaceUri(int index) + throws JiBXException+
+
index
- index number of namespace to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getActiveNamespacePrefix(int index) + throws JiBXException+
+
index
- stack position of namespace to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public void skipElement() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public int next() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public int nextToken() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public int currentEvent() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getName() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getNamespace() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getPrefix() + throws JiBXException+
+
null
if none
+JiBXException
- on any error (possibly wrapping other exception)+public int getAttributeCount() + throws JiBXException+
+
-1
if not at START_ELEMENT
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getAttributeName(int index) + throws JiBXException+
+
index
- index number of attribute to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getAttributeNamespace(int index) + throws JiBXException+
+
index
- index number of attribute to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getAttributePrefix(int index) + throws JiBXException+
+
index
- index number of attribute to be returned
+null
+ if none
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getAttributeValue(int index) + throws JiBXException+
+
index
- index number of attribute to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public int getNamespaceCount() + throws JiBXException+
+
-1
if not at
+ START_ELEMENT
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getNamespaceUri(int index) + throws JiBXException+
+
index
- index number of declaration to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getNamespacePrefix(int index) + throws JiBXException+
+
index
- index number of declaration to be returned
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getNamespaceUri(java.lang.String prefix) + throws JiBXException+
+
prefix
- namespace prefix to be matched (null
for
+ default namespace)
+JiBXException
- on any error (possibly wrapping other exception)+public java.lang.String getText() + throws JiBXException+
+
JiBXException
- on any error (possibly wrapping other exception)
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
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. +
+ +
+
+Method Summary | +|
---|---|
+ void |
+backfill(java.lang.Object obj)
+
++ Define referenced object. |
+
+Method Detail | +
---|
+void backfill(java.lang.Object obj)+
+
obj
- referenced object
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +
+java.lang.Object + org.jibx.runtime.impl.XMLWriterNamespaceBase + org.jibx.runtime.impl.XMLWriterBase + org.jibx.runtime.impl.StreamWriterBase + org.jibx.runtime.impl.UTF8StreamWriter ++
public class UTF8StreamWriter
+Handler for marshalling text document to a UTF-8 output stream. +
+ +
+
+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 | +|
---|---|
+ IXMLWriter |
+createChildWriter(java.lang.String[] uris)
+
++ Create a child writer instance to be used for a separate binding. |
+
+protected void |
+defineNamespace(int index,
+ java.lang.String prefix)
+
++ Report that namespace has been defined. |
+
+protected void |
+writeAttributeText(java.lang.String text)
+
++ Write attribute text to output. |
+
+ void |
+writeCData(java.lang.String text)
+
++ Write CDATA text to document. |
+
+protected void |
+writeMarkup(char chr)
+
++ Write markup character to output. |
+
+protected void |
+writeMarkup(java.lang.String text)
+
++ Write markup text to output. |
+
+ void |
+writeTextContent(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 | +
---|
+private byte[] m_converts+
+
+Constructor Detail | +
---|
+public UTF8StreamWriter(java.lang.String[] uris)+
+
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")+public UTF8StreamWriter(UTF8StreamWriter base, + java.lang.String[] uris)+
+
base
- instance to be used as base for writeruris
- ordered array of URIs for namespaces used in document
+ (see UTF8StreamWriter(String[])
)+Method Detail | +
---|
+protected void writeMarkup(java.lang.String text) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
text
- markup text to be written
+java.io.IOException
- if error writing to document+protected void writeMarkup(char chr) + throws java.io.IOException+
+
writeMarkup
in class XMLWriterBase
chr
- markup character to be written
+java.io.IOException
- if error writing to document+protected void defineNamespace(int index, + java.lang.String prefix)+
+
defineNamespace
in class XMLWriterNamespaceBase
index
- namespace URI index numberprefix
- prefix used for namespace+protected void writeAttributeText(java.lang.String text) + throws java.io.IOException+
+
writeAttributeText
in class XMLWriterBase
text
- attribute value text to be written
+java.io.IOException
- if error writing to document+public void writeTextContent(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public void writeCData(java.lang.String text) + throws java.io.IOException+
+
text
- content value text
+java.io.IOException
- on error writing to document+public IXMLWriter createChildWriter(java.lang.String[] uris)+
+
createChildWriter
in class XMLWriterBase
uris
- ordered array of URIs for namespaces used in document
+ (see UTF8StreamWriter(String[])
)
+
+
+
|
++ + | +|||||
+ PREV CLASS + NEXT CLASS | ++ FRAMES + NO FRAMES + + + + + | +|||||
+ SUMMARY: NESTED | FIELD | CONSTR | METHOD | ++DETAIL: FIELD | CONSTR | METHOD | +