Class InstrumentationAwareReflectionUtils

java.lang.Object
org.cxbox.core.util.InstrumentationAwareReflectionUtils

public final class InstrumentationAwareReflectionUtils extends Object
  • Constructor Details

    • InstrumentationAwareReflectionUtils

      public InstrumentationAwareReflectionUtils()
  • Method Details

    • getAllNonSyntheticFieldsList

      public static List<Field> getAllNonSyntheticFieldsList(Class<?> cls)
      Gets all non-synthetic fields of the given class and its parents (if any). Frameworks like jacoco add synthetic fields for internal usage. This method can be used instead of FieldUtils.getAllFieldsList to avoid clashes with such fields
      Parameters:
      cls - the Class to query
      Returns:
      an array of Fields (possibly empty).
      Throws:
      IllegalArgumentException - if the class is null
    • getFields

      public static List<Field> getFields(Class<?> cls)
    • forName

      public static Class<?> forName(String cls)
    • findField

      public static Field findField(Class<?> dtoClazz, String name)