org.springframework.util
Class AutoPopulatingList.ReflectiveElementFactory<E>

java.lang.Object
  extended by org.springframework.util.AutoPopulatingList.ReflectiveElementFactory<E>
All Implemented Interfaces:
java.io.Serializable, AutoPopulatingList.ElementFactory<E>
Enclosing class:
AutoPopulatingList<E>

private static class AutoPopulatingList.ReflectiveElementFactory<E>
extends java.lang.Object
implements AutoPopulatingList.ElementFactory<E>, java.io.Serializable

Reflective implementation of the ElementFactory interface, using Class.newInstance() on a given element class.

See Also:
Class.newInstance()

Field Summary
private  java.lang.Class<? extends E> elementClass
           
 
Constructor Summary
AutoPopulatingList.ReflectiveElementFactory(java.lang.Class<? extends E> elementClass)
           
 
Method Summary
 E createElement(int index)
          Create the element for the supplied index.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

elementClass

private final java.lang.Class<? extends E> elementClass
Constructor Detail

AutoPopulatingList.ReflectiveElementFactory

public AutoPopulatingList.ReflectiveElementFactory(java.lang.Class<? extends E> elementClass)
Method Detail

createElement

public E createElement(int index)
Description copied from interface: AutoPopulatingList.ElementFactory
Create the element for the supplied index.

Specified by:
createElement in interface AutoPopulatingList.ElementFactory<E>
Returns:
the element object