code: Object getInstanceOfClass(Class cls) {
  		if (Boolean.class.isAssignableFrom(cls) || Boolean.TYPE.isAssignableFrom(cls)) {
  			return Boolean.FALSE;
  		} else if (Integer.TYPE.isAssignableFrom(cls) || Short.TYPE.isAssignableFrom(cls) || Integer.class.isAssignableFrom(cls) || Short.class.isAssignableFrom(cls)) {
  			return 0;
  		} else if (Long.TYPE.isAssignableFrom(cls) || Long.class.isAssignableFrom(cls)) {
  			return 0L;
  		} else if (Float.TYPE.isAssignableFrom(cls) || Float.class.isAssignableFrom(cls)) {
  			return 0.1F;
  		} else if (Double.TYPE.isAssignableFrom(cls) || Double.class.isAssignableFrom(cls)) {
  			return 0.1D;
  		} else if (cls.isArray()) {
  			Class<?> comp = cls.getComponentType();
  			Object instance = getInstanceOfClass(comp);
  			return new Object[]{instance, instance};
  		} else {
  			try {
  				return cls.newInstance();
  			} catch (InstantiationException | IllegalAccessException ex) {
  				return getObjectFromConstantFields(cls);
  			}
  		}
  	}
docs: Get instance for classic class
  
  @param cls
  @return