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 Summary

    Fields
    Modifier and Type Field Description
    java.lang.Class<T> type
    the array type

    Fields inherited from class net.dermetfan.gdx.utils.ArrayPool

    max, maxEach
  • Constructor Summary

    Constructors
    Constructor Description
    ReflectionArrayPool​(java.lang.Class<T> type, int max, int maxEach)  
  • Method Summary

    Modifier and Type Method Description
    protected T[] newArray​(int length)  

    Methods inherited from class net.dermetfan.gdx.utils.ArrayPool

    clear, free, getFree, obtain

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • type

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

    • ReflectionArrayPool

      public ReflectionArrayPool​(java.lang.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