Class ReflectionArrayPool<T>

java.lang.Object
net.dermetfan.gdx.utils.ArrayPool<T>
net.dermetfan.gdx.utils.ReflectionArrayPool<T>

public class ReflectionArrayPool<T> extends ArrayPool<T>
an ArrayPool that creates new arrays using reflection
Since:
0.11.1
  • Field Details

    • type

      public final Class<T> type
      the array type
  • Constructor Details

    • ReflectionArrayPool

      public ReflectionArrayPool(Class<T> type, int max, int maxEach)
  • Method Details

    • newArray

      protected T[] newArray(int length)
      Specified by:
      newArray in class ArrayPool<T>
      Returns:
      a new array of the given length