Class CGLIBEnhancedConverter

  • All Implemented Interfaces:
    Converter, ConverterMatcher, Caching

    public class CGLIBEnhancedConverter
    extends SerializableConverter
    Converts a proxy created by the CGLIB Enhancer. Such a proxy is recreated while deserializing the proxy. The converter does only work, if
    • the DefaultNamingPolicy is used for the proxy's name
    • the proxy uses a factory or only one Callback is registered
    • a possible super class has at least a protected default constructor
    Note, that the this converter relies on the CGLIBMapper.
    Since:
    1.2
    • Field Detail

      • DEFAULT_NAMING_MARKER

        private static java.lang.String DEFAULT_NAMING_MARKER
      • CALLBACK_MARKER

        private static java.lang.String CALLBACK_MARKER
      • fieldCache

        private transient java.util.Map fieldCache
    • Method Detail

      • canConvert

        public boolean canConvert​(java.lang.Class type)
        Description copied from interface: ConverterMatcher
        Determines whether the converter can marshall a particular type.
        Specified by:
        canConvert in interface ConverterMatcher
        Overrides:
        canConvert in class SerializableConverter
        Parameters:
        type - the Class representing the object type to be converted
      • getCallbacks

        private net.sf.cglib.proxy.Callback[] getCallbacks​(java.lang.Object source)
      • createCallbackIndexMap

        private java.util.Map createCallbackIndexMap​(net.sf.cglib.proxy.Factory source)
      • createNullArguments

        private java.lang.Object[] createNullArguments​(java.lang.Class[] parameterTypes)
      • createReverseEngineeredCallbackOfProperType

        private net.sf.cglib.proxy.Callback createReverseEngineeredCallbackOfProperType​(net.sf.cglib.proxy.Callback callback,
                                                                                        int index,
                                                                                        java.util.Map callbackIndexMap)
      • create

        private java.lang.Object create​(net.sf.cglib.proxy.Enhancer enhancer,
                                        java.util.List callbacks,
                                        boolean useFactory)