code: public JBBPClassInstantiator make(final JBBPClassInstantiatorType type) {
      JBBPUtils.assertNotNull(type, "Type must not be null");
  
      String className = "com.igormaznitsa.jbbp.mapper.instantiators.JBBPSafeInstantiator";
  
      switch (type) {
        case AUTO: {
          final String customClassName = JBBPSystemProperty.PROPERTY_INSTANTIATOR_CLASS.getAsString(null);
          if (customClassName == null) {
            try {
              final Class<?> unsafeclazz = Class.forName("sun.misc.Unsafe");
              unsafeclazz.getDeclaredField("theUnsafe");
              className = "com.igormaznitsa.jbbp.mapper.instantiators.JBBPUnsafeInstantiator";
            } catch (ClassNotFoundException | NoSuchFieldException | SecurityException ex) {
              // do nothing
            }
          } else {
            className = customClassName;
          }
        }
        break;
        case SAFE: {
          className = "com.igormaznitsa.jbbp.mapper.instantiators.JBBPSafeInstantiator";
        }
        break;
        case UNSAFE: {
          className = "com.igormaznitsa.jbbp.mapper.instantiators.JBBPUnsafeInstantiator";
        }
        break;
        default:
          throw new Error("Unexpected type, contact developer! [" + type + ']');
      }
  
      return (JBBPClassInstantiator) ReflectUtils.newInstanceForClassName(className);
    }
docs: Make an instantiator for defined type.
  
  @param type the type of needed instantiator, must not be null
  @return the class instantiator INSTANCE which is compatible with the
  current platform