diff options
-rw-r--r-- | libart/src/main/java/java/lang/reflect/AbstractMethod.java | 15 | ||||
-rw-r--r-- | libart/src/main/java/java/lang/reflect/Constructor.java | 3 | ||||
-rw-r--r-- | libart/src/main/java/java/lang/reflect/Method.java | 3 |
3 files changed, 14 insertions, 7 deletions
diff --git a/libart/src/main/java/java/lang/reflect/AbstractMethod.java b/libart/src/main/java/java/lang/reflect/AbstractMethod.java index aa5df0c..0ac15f9 100644 --- a/libart/src/main/java/java/lang/reflect/AbstractMethod.java +++ b/libart/src/main/java/java/lang/reflect/AbstractMethod.java @@ -49,7 +49,11 @@ public abstract class AbstractMethod extends AccessibleObject { /** Bits encoding access (e.g. public, private) as well as other runtime specific flags */ protected int accessFlags; - /** The ArtMethod associated with this Method, requried for dispatching due to entrypoints */ + /** + * The ArtMethod associated with this Method, requried for dispatching due to entrypoints + * Hidden to workaround b/16828157. + * @hide + */ protected ArtMethod artMethod; /** Method's declaring class */ @@ -62,6 +66,10 @@ public abstract class AbstractMethod extends AccessibleObject { /** The method index of this method within its defining dex file */ protected int dexMethodIndex; + /** + * Hidden to workaround b/16828157. + * @hide + */ protected AbstractMethod() { } @@ -209,10 +217,7 @@ public abstract class AbstractMethod extends AccessibleObject { * * @return an array of arrays of {@code Annotation} instances */ - public Annotation[][] getParameterAnnotations() { - return AnnotationAccess.getParameterAnnotations( - declaringClassOfOverriddenMethod, dexMethodIndex); - } + public abstract Annotation[][] getParameterAnnotations(); /** * Returns the constructor's signature in non-printable form. This is called diff --git a/libart/src/main/java/java/lang/reflect/Constructor.java b/libart/src/main/java/java/lang/reflect/Constructor.java index 0e5706f..9701147 100644 --- a/libart/src/main/java/java/lang/reflect/Constructor.java +++ b/libart/src/main/java/java/lang/reflect/Constructor.java @@ -209,7 +209,8 @@ public final class Constructor<T> extends AbstractMethod implements GenericDecla * @return an array of arrays of {@code Annotation} instances */ public Annotation[][] getParameterAnnotations() { - return super.getParameterAnnotations(); + return AnnotationAccess.getParameterAnnotations( + declaringClassOfOverriddenMethod, dexMethodIndex); } /** diff --git a/libart/src/main/java/java/lang/reflect/Method.java b/libart/src/main/java/java/lang/reflect/Method.java index 1439a3b..a07ec6f 100644 --- a/libart/src/main/java/java/lang/reflect/Method.java +++ b/libart/src/main/java/java/lang/reflect/Method.java @@ -309,7 +309,8 @@ public final class Method extends AbstractMethod implements GenericDeclaration, * @return an array of arrays of {@code Annotation} instances */ public Annotation[][] getParameterAnnotations() { - return super.getParameterAnnotations(); + return AnnotationAccess.getParameterAnnotations( + declaringClassOfOverriddenMethod, dexMethodIndex); } /** |