code: public <T> ObjectInstantiator<T> newInstantiatorOf(Class<T> type) {
        if(!Serializable.class.isAssignableFrom(type)) {
           throw new ObjenesisException(new NotSerializableException(type+" not serializable"));
        }
        if(JVM_NAME.startsWith(HOTSPOT) || PlatformDescription.isThisJVM(OPENJDK)) {
           // Java 7 GAE was under a security manager so we use a degraded system
           if(isGoogleAppEngine() && PlatformDescription.SPECIFICATION_VERSION.equals("1.7")) {
              return new ObjectInputStreamInstantiator<>(type);
           }
           return new SunReflectionFactorySerializationInstantiator<>(type);
        }
        else if(JVM_NAME.startsWith(DALVIK)) {
           if(PlatformDescription.isAndroidOpenJDK()) {
              return new ObjectStreamClassInstantiator<>(type);
           }
           return new AndroidSerializationInstantiator<>(type);
        }
        else if(JVM_NAME.startsWith(GNU)) {
           return new GCJSerializationInstantiator<>(type);
        }
        else if(JVM_NAME.startsWith(PERC)) {
           return new PercSerializationInstantiator<>(type);
        }
  
        return new SunReflectionFactorySerializationInstantiator<>(type);
     }
docs: Return an {@link ObjectInstantiator} allowing to create instance following the java
  serialization framework specifications.
  
  @param type Class to instantiate
  @return The ObjectInstantiator for the class