Class OAVObjectWriterHandler

    • Constructor Detail

      • OAVObjectWriterHandler

        public OAVObjectWriterHandler​(java.util.Set typeinfos)
        Create a new writer.
      • OAVObjectWriterHandler

        public OAVObjectWriterHandler​(boolean gentypetags,
                                      java.util.Set typeinfos)
        Create a new writer.
      • OAVObjectWriterHandler

        public OAVObjectWriterHandler​(boolean gentypetags,
                                      boolean prefertags,
                                      java.util.Set typeinfos)
        Create a new writer.
      • OAVObjectWriterHandler

        public OAVObjectWriterHandler​(boolean gentypetags,
                                      boolean prefertags,
                                      boolean flattening,
                                      java.util.Set typeinfos)
        Create a new writer.
    • Method Detail

      • getObjectType

        public java.lang.Object getObjectType​(java.lang.Object object,
                                              IContext context)
        Get the object type
        Specified by:
        getObjectType in class AbstractObjectWriterHandler
        Parameters:
        object - The object.
        Returns:
        The object type.
      • getTagName

        public QName getTagName​(java.lang.Object object,
                                IContext context)
        Get the tag name for an object.
      • getTagWithPrefix

        public QName getTagWithPrefix​(QName tag,
                                      IContext context)
        Get the tag with namespace.
      • getValue

        protected java.lang.Object getValue​(java.lang.Object object,
                                            java.lang.Object attr,
                                            IContext context,
                                            java.lang.Object info)
        Get a value from an object.
        Specified by:
        getValue in class AbstractObjectWriterHandler
      • getPropertyName

        protected java.lang.String getPropertyName​(java.lang.Object property)
        Get the name of a property. Cuts off all before "_has_" (hack?!).
        Specified by:
        getPropertyName in class AbstractObjectWriterHandler
      • isBasicType

        protected boolean isBasicType​(java.lang.Object property,
                                      java.lang.Object value)
        Test if a value is a basic type.
        Specified by:
        isBasicType in class AbstractObjectWriterHandler
      • getProperties

        protected java.util.Collection getProperties​(java.lang.Object object,
                                                     IContext context,
                                                     boolean includemethods,
                                                     boolean includefields)
        Get the properties of an object.
        Specified by:
        getProperties in class AbstractObjectWriterHandler
      • isDecodableToSameType

        protected boolean isDecodableToSameType​(java.lang.Object property,
                                                java.lang.Object value,
                                                IContext context)
        Test if a value is decodable to the same type. Works for basic (final) types only and checks if the two types are of same class.
        Specified by:
        isDecodableToSameType in class AbstractObjectWriterHandler