Class ByteBuddyProxyStrategy

  • All Implemented Interfaces:
    ProxyStrategy

    public class ByteBuddyProxyStrategy
    extends java.lang.Object
    implements ProxyStrategy
    An implementation of ProxyStrategy which uses Byte Buddy to implement the proxy.
    • Constructor Detail

      • ByteBuddyProxyStrategy

        public ByteBuddyProxyStrategy()
    • Method Detail

      • createProxyFactory

        public <T> java.util.function.Function<ProxyStrategy.InstanceSupplier<T>,​T> createProxyFactory​(java.lang.Class<T> cls)
                                                                                                      throws java.lang.Exception
        Description copied from interface: ProxyStrategy
        Creates a proxy factory for the given Class and returns a function which can be used to create a new proxy.
        Specified by:
        createProxyFactory in interface ProxyStrategy
        Type Parameters:
        T - the class type to proxy
        Parameters:
        cls - a Class to proxy, cannot be null
        Returns:
        a function which can be used to create a new proxy, never null
        Throws:
        java.lang.Exception - when unable to create a proxy factory, including when the functionality is disabled, the given class is unsuitable or an error occurred during proxy factory creation