diff options
author | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 18:03:08 -0700 |
---|---|---|
committer | Mathieu Chartier <mathieuc@google.com> | 2015-04-21 18:04:38 -0700 |
commit | 1b7cda0fc609d9ebb21ed3e4179ce09927acb494 (patch) | |
tree | bdffc1bd48a1cc5c12141f458a3af8a7ac34c511 /libart | |
parent | 9b5054206dbf6b2cefbbc46568218d172ebd2570 (diff) | |
download | libcore-1b7cda0fc609d9ebb21ed3e4179ce09927acb494.zip libcore-1b7cda0fc609d9ebb21ed3e4179ce09927acb494.tar.gz libcore-1b7cda0fc609d9ebb21ed3e4179ce09927acb494.tar.bz2 |
Add missing @hide and fix Constructor + Method changing API
Change-Id: I9f68c96b4ddf7e8c004a3209fcc04fb371fb014a
Diffstat (limited to 'libart')
-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); } /** |