aboutsummaryrefslogtreecommitdiff
path: root/annotations/src/main/java/org/robolectric/annotation/Implements.java
diff options
context:
space:
mode:
Diffstat (limited to 'annotations/src/main/java/org/robolectric/annotation/Implements.java')
-rw-r--r--annotations/src/main/java/org/robolectric/annotation/Implements.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/annotations/src/main/java/org/robolectric/annotation/Implements.java b/annotations/src/main/java/org/robolectric/annotation/Implements.java
index d366003eb..84da01ec6 100644
--- a/annotations/src/main/java/org/robolectric/annotation/Implements.java
+++ b/annotations/src/main/java/org/robolectric/annotation/Implements.java
@@ -68,6 +68,17 @@ public @interface Implements {
Class<? extends ShadowPicker<?>> shadowPicker() default DefaultShadowPicker.class;
/**
+ * If set to true, Robolectric will invoke the native method variant instead of the no-op variant.
+ * This requires the native method to be bound, or an {@link UnsatisfiedLinkError} will occur.
+ *
+ * <p>{@link Implements#callNativeMethodsByDefault()} has precedence over {@link
+ * Implements#callThroughByDefault()} For instance, if both {@link
+ * Implements#callNativeMethodsByDefault()} and {@link Implements#callThroughByDefault()} are
+ * true, the native method variant will be preferred over the no-op native variant.
+ */
+ boolean callNativeMethodsByDefault() default false;
+
+ /**
* An interface used as the default for the {@code picker} param. Indicates that no custom {@link
* ShadowPicker} is being used.
*/