Package ru.objectsfill.utils
Class FieldUtils
java.lang.Object
ru.objectsfill.utils.FieldUtils
Utility class for working with fields in Java classes.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voiddoWithFields(Class<?> clazz, FieldCallback fc) Invokes the given FieldCallback for each field in the specified class and its superclasses.
-
Method Details
-
doWithFields
Invokes the given FieldCallback for each field in the specified class and its superclasses.- Parameters:
clazz- the class to process fields forfc- the FieldCallback to invoke for each field- Throws:
IllegalArgumentException- if the class is nullIllegalStateException- if the FieldCallback encounters an error while processing a field
-