net.ctdp.rfdynhud.properties
Class GenericPropertiesIterator

java.lang.Object
  extended by net.ctdp.rfdynhud.properties.GenericFieldsIterator<Property>
      extended by net.ctdp.rfdynhud.properties.GenericPropertiesIterator
All Implemented Interfaces:
java.util.Iterator<Property>

public class GenericPropertiesIterator
extends GenericFieldsIterator<Property>

Iterates all Property 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
GenericPropertiesIterator(java.lang.Object object)
           
GenericPropertiesIterator(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

GenericPropertiesIterator

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

GenericPropertiesIterator

public GenericPropertiesIterator(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<Property>
Returns:
true, if the field is interesting, false otherwise.