ReflectTools implements Serializable { public static boolean hasAnnotation(AnnotatedElement element, String annotationFqn) { return getAnnotation(element, annotationFqn).isPresent(); }  static Method findMethod(Class<?> cls, String methodName,
            Class<?>... parameterTypes); static Object getJavaFieldValue(Object object,
            java.lang.reflect.Field field); static Object getJavaFieldValue(Object object,
            java.lang.reflect.Field field, Class<?> propertyType); static void setJavaFieldValue(Object object,
            java.lang.reflect.Field field, Object value); static Class<?> convertPrimitiveType(Class<?> type); static Serializable getPrimitiveDefaultValue(
            Class<?> primitiveType); static boolean isSetter(Method method); static boolean isSetterName(String methodName); static boolean isGetterName(String methodName, boolean isBoolean); static boolean isGetter(Method method); static Stream<Method> getGetterMethods(Class<?> type); static Stream<Method> getSetterMethods(Class<?> type); static boolean isNotObjectMethod(Method method); static String getPropertyName(Method method); static Type getPropertyType(Method method); static T createInstance(Class<T> cls); static T createProxyInstance(Class<T> proxyClass,
            Class<?> originalClass); static void checkClassAccessibility(Class<?> clazz); static Type createParameterizedType(Class<?> rawType, Type subType); static Class<?> getGenericInterfaceType(Class<?> clazz,
            Class<?> interfaceType); static Optional<Method> getGetter(Class<? extends Object> beanClass,
            String propertyName); static boolean isCheckedException(Class<?> exceptionClass); static Method getFunctionalMethod(Class<?> functionalClass); static List<Integer> getConstantIntValues(Class<?> clazz); static Class<?> findCommonBaseType(Class<?> a, Class<?> b); static Optional<ClassLoader> findClosestCommonClassLoaderAncestor(
            ClassLoader classLoaderA, ClassLoader classLoaderB); static boolean hasAnnotation(AnnotatedElement element,
            String annotationFqn); static Object getAnnotationMethodValue(Annotation annotation,
            String methodName); static Optional<Annotation> getAnnotation(AnnotatedElement element,
            String annotationFqn);  }
@Test public void hasAnnotation_annotationPresents_returnsTrue() { Assert.assertTrue(ReflectTools.hasAnnotation(ClassWithAnnotation.class, TestAnnotation.class.getName())); }
@Test public void hasAnnotation_annotationIsAbsent_returnsFalse() { Assert.assertFalse(ReflectTools.hasAnnotation( ClassWithoutAnnotation.class, TestAnnotation.class.getName())); }