Interface BeanDescriptorProvider

    • Method Detail

      • provide

        <T> BeanDescriptor<T> provide​(Class<T> type,
                                      Genson genson)
        Provides a BeanDescriptor for "type" using current Genson instance.
        Parameters:
        type - for which we need a BeanDescriptor.
        genson - current instance.
        Returns:
        A BeanDescriptor instance able to serialize/deserialize objects of type T.
      • provide

        <T> BeanDescriptor<T> provide​(Class<T> ofClass,
                                      Type type,
                                      Genson genson)
        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.
        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.