Class ReflectionProxyFactory

java.lang.Object
xyz.jpenilla.reflectionremapper.proxy.ReflectionProxyFactory

@DefaultQualifier(org.checkerframework.checker.nullness.qual.NonNull.class) public final class ReflectionProxyFactory extends Object
Factory for reflection proxy instances.
  • Method Details

    • reflectionProxy

      public <I> I reflectionProxy(Class<I> proxyInterface)
      Create a new instance of the given "reflection proxy interface".
      Type Parameters:
      I - interface type
      Parameters:
      proxyInterface - reflection proxy interface class
      Returns:
      reflection proxy instance
      Throws:
      IllegalArgumentException - when the specified proxy interface is malformed or invalid for the current environment
      See Also:
    • create

      public static ReflectionProxyFactory create(ReflectionRemapper reflectionRemapper, ClassLoader classLoader)
      Create a new ReflectionProxyFactory using the specified ReflectionRemapper for remapping, and the specified ClassLoader to load reflection proxy implementation classes.
      Parameters:
      reflectionRemapper - reflection remapper
      classLoader - classloader
      Returns:
      new ReflectionProxyFactory