Class FieldUtils

java.lang.Object
net.apartium.cocoabeans.reflect.FieldUtils

public class FieldUtils extends Object
Utilities to work with java Field class
See Also:
  • Constructor Details

    • FieldUtils

      public FieldUtils()
  • Method Details

    • getDeclaredFieldsByExactType

      public static Set<Field> getDeclaredFieldsByExactType(Class<?> clazz, Class<?> fieldType)
      Get all declared fields whose type is the same of given fieldType
      Parameters:
      clazz - clazz to lookup fields from
      fieldType - expected field types
      Returns:
      a mutable set of fields found
    • getFieldsByExactType

      public static Set<Field> getFieldsByExactType(Class<?> clazz, Class<?> fieldType)
      Get all fields whose type is the same of given fieldType
      Parameters:
      clazz - clazz to lookup fields from
      fieldType - expected field types
      Returns:
      a mutable set of fields found