diff --git a/src/main/java/si/mazi/rescu/AnnotationUtils.java b/src/main/java/si/mazi/rescu/AnnotationUtils.java
index <HASH>..<HASH> 100644
--- a/src/main/java/si/mazi/rescu/AnnotationUtils.java
+++ b/src/main/java/si/mazi/rescu/AnnotationUtils.java
@@ -42,7 +42,7 @@ public final class AnnotationUtils {
             return null;
         }
         try {
-            return (String) ann.getClass().getMethod("value").invoke(ann);
+            return (String) ann.annotationType().getMethod("value").invoke(ann);
         } catch (Exception e) {
             throw new RuntimeException("Can't access element 'value' in  " + annotationClass + ". This is probably a bug in rescu.", e);
         }
Use annotationType instead of getClass. Allows for Native image generation. (#<I>)