From 2cc1eed17442ea0a7c8ec29ca038b9b4687e40d4 Mon Sep 17 00:00:00 2001 From: Neil Fuller Date: Mon, 22 Aug 2016 18:41:52 +0100 Subject: Track libcore java.lang.reflect API changes The modifications to Class / Field affect the .txt file for no good reason: the use of a different generic variable name results in changes because the tools think methods have been added / removed when they haven't. The only interface change from upstream included is adding "extends AnnotatedElement" to GenericDeclaration. All (platform) subclasses already did implement this interface. App classes may be affected but only if they do not currently implement those methods and they are somehow called. Bug: 28666126 Test: cts ran for libcore (libcore, harmony_java_lang, org) Change-Id: Ice5afb80834d7f7a4d23dade21a1590c6b323ed8 --- api/current.txt | 5 +++-- api/system-current.txt | 5 +++-- api/test-current.txt | 5 +++-- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/api/current.txt b/api/current.txt index 195b6403530e..cac43c4bb185 100644 --- a/api/current.txt +++ b/api/current.txt @@ -50450,12 +50450,14 @@ package java.lang { method public static java.lang.Class forName(java.lang.String, boolean, java.lang.ClassLoader) throws java.lang.ClassNotFoundException; method public A getAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getAnnotations(); + method public A[] getAnnotationsByType(java.lang.Class); method public java.lang.String getCanonicalName(); method public java.lang.ClassLoader getClassLoader(); method public java.lang.Class[] getClasses(); method public java.lang.Class getComponentType(); method public java.lang.reflect.Constructor getConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; method public java.lang.reflect.Constructor[] getConstructors() throws java.lang.SecurityException; + method public A getDeclaredAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getDeclaredAnnotations(); method public java.lang.Class[] getDeclaredClasses(); method public java.lang.reflect.Constructor getDeclaredConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; @@ -51897,7 +51899,6 @@ package java.lang.reflect { public final class Field extends java.lang.reflect.AccessibleObject implements java.lang.reflect.Member { method public java.lang.Object get(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; - method public A getAnnotation(java.lang.Class); method public boolean getBoolean(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public byte getByte(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public char getChar(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; @@ -51929,7 +51930,7 @@ package java.lang.reflect { method public abstract java.lang.reflect.Type getGenericComponentType(); } - public abstract interface GenericDeclaration { + public abstract interface GenericDeclaration implements java.lang.reflect.AnnotatedElement { method public abstract java.lang.reflect.TypeVariable[] getTypeParameters(); } diff --git a/api/system-current.txt b/api/system-current.txt index 54f987aaada0..5cb543787003 100644 --- a/api/system-current.txt +++ b/api/system-current.txt @@ -53806,12 +53806,14 @@ package java.lang { method public static java.lang.Class forName(java.lang.String, boolean, java.lang.ClassLoader) throws java.lang.ClassNotFoundException; method public A getAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getAnnotations(); + method public A[] getAnnotationsByType(java.lang.Class); method public java.lang.String getCanonicalName(); method public java.lang.ClassLoader getClassLoader(); method public java.lang.Class[] getClasses(); method public java.lang.Class getComponentType(); method public java.lang.reflect.Constructor getConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; method public java.lang.reflect.Constructor[] getConstructors() throws java.lang.SecurityException; + method public A getDeclaredAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getDeclaredAnnotations(); method public java.lang.Class[] getDeclaredClasses(); method public java.lang.reflect.Constructor getDeclaredConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; @@ -55253,7 +55255,6 @@ package java.lang.reflect { public final class Field extends java.lang.reflect.AccessibleObject implements java.lang.reflect.Member { method public java.lang.Object get(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; - method public A getAnnotation(java.lang.Class); method public boolean getBoolean(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public byte getByte(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public char getChar(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; @@ -55285,7 +55286,7 @@ package java.lang.reflect { method public abstract java.lang.reflect.Type getGenericComponentType(); } - public abstract interface GenericDeclaration { + public abstract interface GenericDeclaration implements java.lang.reflect.AnnotatedElement { method public abstract java.lang.reflect.TypeVariable[] getTypeParameters(); } diff --git a/api/test-current.txt b/api/test-current.txt index d06e5cfacaa4..5c013775bc9a 100644 --- a/api/test-current.txt +++ b/api/test-current.txt @@ -50530,12 +50530,14 @@ package java.lang { method public static java.lang.Class forName(java.lang.String, boolean, java.lang.ClassLoader) throws java.lang.ClassNotFoundException; method public A getAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getAnnotations(); + method public A[] getAnnotationsByType(java.lang.Class); method public java.lang.String getCanonicalName(); method public java.lang.ClassLoader getClassLoader(); method public java.lang.Class[] getClasses(); method public java.lang.Class getComponentType(); method public java.lang.reflect.Constructor getConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; method public java.lang.reflect.Constructor[] getConstructors() throws java.lang.SecurityException; + method public A getDeclaredAnnotation(java.lang.Class); method public java.lang.annotation.Annotation[] getDeclaredAnnotations(); method public java.lang.Class[] getDeclaredClasses(); method public java.lang.reflect.Constructor getDeclaredConstructor(java.lang.Class...) throws java.lang.NoSuchMethodException, java.lang.SecurityException; @@ -51977,7 +51979,6 @@ package java.lang.reflect { public final class Field extends java.lang.reflect.AccessibleObject implements java.lang.reflect.Member { method public java.lang.Object get(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; - method public A getAnnotation(java.lang.Class); method public boolean getBoolean(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public byte getByte(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; method public char getChar(java.lang.Object) throws java.lang.IllegalAccessException, java.lang.IllegalArgumentException; @@ -52009,7 +52010,7 @@ package java.lang.reflect { method public abstract java.lang.reflect.Type getGenericComponentType(); } - public abstract interface GenericDeclaration { + public abstract interface GenericDeclaration implements java.lang.reflect.AnnotatedElement { method public abstract java.lang.reflect.TypeVariable[] getTypeParameters(); } -- cgit v1.2.3-59-g8ed1b