Class ProxyingInstantiator<T>

  • All Implemented Interfaces:
    ObjectInstantiator<T>

    @Instantiator(STANDARD)
    public class ProxyingInstantiator<T>
    extends java.lang.Object
    implements ObjectInstantiator<T>
    This instantiator creates a class by dynamically extending it. It will skip the call to the parent constructor in the bytecode. So that the constructor is indeed not called but you however instantiate a child class, not the actual class. The class loader will normally throw a VerifyError is you do that. However, using -Xverify:none should make it work
    • Constructor Summary

      Constructors 
      Constructor Description
      ProxyingInstantiator​(java.lang.Class<T> type)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T newInstance()
      Returns a new instance of an object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ProxyingInstantiator

        public ProxyingInstantiator​(java.lang.Class<T> type)
    • Method Detail

      • newInstance

        public T newInstance()
        Description copied from interface: ObjectInstantiator
        Returns a new instance of an object. The returned object's class is defined by the implementation.
        Specified by:
        newInstance in interface ObjectInstantiator<T>
        Returns:
        A new instance of an object.