Class CrdbProxyFactory

java.lang.Object
com.cockroachlabs.crdb.proxy.CrdbProxyFactory

public final class CrdbProxyFactory extends Object
Produces enhanced instances of annotated targets.
  • If the target implements at least one interface, a JDK Proxy is created over those interfaces and delegates to the original instance. Note: the returned object is the interface type, so assign it to an interface-typed reference.
  • Otherwise a ByteBuddy subclass of the concrete class is generated; the target's field state is copied into the new instance.
  • Constructor Details

    • CrdbProxyFactory

      public CrdbProxyFactory()
    • CrdbProxyFactory

      public CrdbProxyFactory(CrdbConfig config)
  • Method Details

    • enhance

      public <T> T enhance(T target)
      Enhance target, choosing the proxy strategy automatically.