Package jadex.binary

Class BeanCodec

    • Constructor Detail

      • BeanCodec

        public BeanCodec()
    • Method Detail

      • isApplicable

        public boolean isApplicable​(java.lang.Class<?> clazz)
        Tests if the decoder can decode the class.
        Specified by:
        isApplicable in interface IDecoderHandler
        Specified by:
        isApplicable in class AbstractCodec
        Parameters:
        clazz - The class.
        Returns:
        True, if the decoder can decode this class.
      • createObject

        public java.lang.Object createObject​(java.lang.Class<?> clazz,
                                             IDecodingContext context)
        Creates the object during decoding.
        Specified by:
        createObject in class AbstractCodec
        Parameters:
        clazz - The class of the object.
        context - The decoding context.
        Returns:
        The created object.
      • decodeSubObjects

        public java.lang.Object decodeSubObjects​(java.lang.Object object,
                                                 java.lang.Class<?> clazz,
                                                 IDecodingContext context)
        Decodes and adds sub-objects during decoding.
        Overrides:
        decodeSubObjects in class AbstractCodec
        Parameters:
        object - The instantiated object.
        clazz - The class of the object.
        context - The decoding context.
        Returns:
        The finished object.
      • isApplicable

        public boolean isApplicable​(java.lang.Object object,
                                    java.lang.reflect.Type type,
                                    boolean clone,
                                    java.lang.ClassLoader targetcl)
        Test if the processor is applicable.
        Parameters:
        object - The object.
        targetcl - If not null, the traverser should make sure that the result object is compatible with the class loader, e.g. by cloning the object using the class loaded from the target class loader.
        Returns:
        True, if is applicable.
      • readBeanProperties

        public static void readBeanProperties​(java.lang.Object object,
                                              java.lang.Class clazz,
                                              IDecodingContext context,
                                              IBeanIntrospector intro)