code: private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
  		in.defaultReadObject();
  
  		// may be null if this serializer was deserialized from an older version
  		if (this.values == null) {
  			this.values = enumClass.getEnumConstants();
  
  			this.valueToOrdinal = new EnumMap<>(this.enumClass);
  			int i = 0;
  			for (T value : values) {
  				this.valueToOrdinal.put(value, i++);
  			}
  		}
  	}
docs: --------------------------------------------------------------------------------------------