Package 

Class ReflectionUtil


  • 
    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.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • 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 class
        message - the message that will included the exception if the check fails.