Class BinaryDtoAllocator

java.lang.Object
io.datarouter.bytes.binarydto.internal.BinaryDtoAllocator

public class BinaryDtoAllocator
extends Object
Borrowed from Gson's UnsafeAllocator Allows instantiation of BinaryDtos without a no-arg constructor. A no-arg constructor complicates the encouraged use of final fields.
  • Constructor Details

    • BinaryDtoAllocator

      public BinaryDtoAllocator()
  • Method Details

    • allocate

      public static <T extends BinaryDto<T>> T allocate​(Class<T> cls)