Class BeanDescriptorProvider.CompositeBeanDescriptorProvider

    • Method Detail

      • provide

        public <T> BeanDescriptor<T> provide​(Class<T> ofClass,
                                             Genson genson)
        Description copied from interface: BeanDescriptorProvider
        Provides a BeanDescriptor for "type" using current Genson instance.
        Specified by:
        provide in interface BeanDescriptorProvider
        Parameters:
        ofClass - for which we need a BeanDescriptor.
        genson - current instance.
        Returns:
        A BeanDescriptor instance able to serialize/deserialize objects of type T.
      • provide

        public <T> BeanDescriptor<T> provide​(Class<T> ofClass,
                                             Type type,
                                             Genson genson)
        Description copied from interface: BeanDescriptorProvider
        Provides a BeanDescriptor that can serialize/deserialize "ofClass" type, based on "type" argument. The arguments "ofClass" and "type" will be the same in most cases, but for example in BeanViews ofClass will correspond to the parameterized type and "type" to the BeanView implementation.
        Specified by:
        provide in interface BeanDescriptorProvider
        Parameters:
        ofClass - is the Class for which we need a BeanDescriptor that will be able to serialize/deserialize objects of that type;
        type - to use to build this descriptor (use its declared methods, fields, etc).
        genson - is the current Genson instance.
        Returns:
        A BeanDescriptor instance able to serialize/deserialize objects of type ofClass.