Package io.tesler.core.util
Class InstrumentationAwareReflectionUtils
- java.lang.Object
-
- io.tesler.core.util.InstrumentationAwareReflectionUtils
-
public final class InstrumentationAwareReflectionUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description InstrumentationAwareReflectionUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<Field>
getAllNonSyntheticFieldsList(Class<?> cls)
Gets all non synthetic fields of the given class and its parents (if any).
-
-
-
Method Detail
-
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
- theClass
to query- Returns:
- an array of Fields (possibly empty).
- Throws:
IllegalArgumentException
- if the class isnull
-
-