Class InstanceFactory

java.lang.Object
io.github.connellite.reflection.InstanceFactory

public class InstanceFactory extends Object
Creates instances without calling a constructor when Objenesis is present, otherwise via ReflectionUtil.getInstance(Class).
  • Constructor Details

    • InstanceFactory

      public InstanceFactory()
  • Method Details

    • newInstance

      public static <T> T newInstance(Class<T> type)
      Creates an instance of type. With Objenesis the constructor is not called. Without it, an accessible no-arg constructor is required.