Class ReflectionPool<T>


  • public class ReflectionPool<T>
    extends Pool<T>
    Pool that creates new instances of a type using reflection. The type must have a zero argument constructor. Constructor.setAccessible(boolean) will be used if the class and/or constructor is not visible.
    • Constructor Detail

      • ReflectionPool

        public ReflectionPool​(java.lang.Class<T> type)
      • ReflectionPool

        public ReflectionPool​(java.lang.Class<T> type,
                              int initialCapacity)
      • ReflectionPool

        public ReflectionPool​(java.lang.Class<T> type,
                              int initialCapacity,
                              int max)
    • Method Detail

      • newObject

        protected T newObject()
        Specified by:
        newObject in class Pool<T>