-
public class ReflectionUtil
Provides utility methods that can be used access and mutate objects using reflection.
-
-
Method Summary
Modifier and Type Method Description static boolean
setField(@NonNull() Object source, @NonNull() String fieldName, @Nullable() Object value)
static void
assertCallerAnnotation(Class<out Annotation> annotationClass, String message)
Ensures if the caller of the method calling this method is annotated with the specifiedannotation. -
-
Method Detail
-
setField
static boolean setField(@NonNull() Object source, @NonNull() String fieldName, @Nullable() Object value)
-
assertCallerAnnotation
static void assertCallerAnnotation(Class<out Annotation> annotationClass, String message)
Ensures if the caller of the method calling this method is annotated with the specifiedannotation.
- Parameters:
annotationClass
- the expected annotation classmessage
- the message that will included the exception if the check fails.
-
-
-
-