net.ctdp.rfdynhud.values
Class GenericSizesIterator

java.lang.Object
  extended by net.ctdp.rfdynhud.properties.GenericFieldsIterator<Size>
      extended by net.ctdp.rfdynhud.values.GenericSizesIterator
All Implemented Interfaces:
java.util.Iterator<Size>

public class GenericSizesIterator
extends GenericFieldsIterator<Size>

Iterates all Size fields of a given Class. This includes all super classes and even private fields.

It is implemented using generics and a dirty trick to access private fields.

Author:
Marvin Froehlich (CTDP)

Constructor Summary
GenericSizesIterator(java.lang.Object object)
           
GenericSizesIterator(java.lang.Object object, boolean includeStatic)
           
 
Method Summary
protected  boolean checkFieldType(java.lang.reflect.Field field)
          Checks, if the field is of a type, that we want to iterate.
 
Methods inherited from class net.ctdp.rfdynhud.properties.GenericFieldsIterator
hasNext, next, remove
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericSizesIterator

public GenericSizesIterator(java.lang.Object object,
                            boolean includeStatic)

GenericSizesIterator

public GenericSizesIterator(java.lang.Object object)
Method Detail

checkFieldType

protected boolean checkFieldType(java.lang.reflect.Field field)
Description copied from class: GenericFieldsIterator
Checks, if the field is of a type, that we want to iterate.

Specified by:
checkFieldType in class GenericFieldsIterator<Size>
Returns:
true, if the field is interesting, false otherwise.