Add sources for API 35
Downloaded from https://dl.google.com/android/repository/source-35_r01.zip
using SdkManager in Studio
Test: None
Change-Id: I83f78aa820b66edfdc9f8594d17bc7b6cacccec1
diff --git a/android-35/java/lang/annotation/Annotation.java b/android-35/java/lang/annotation/Annotation.java
new file mode 100644
index 0000000..0754991
--- /dev/null
+++ b/android-35/java/lang/annotation/Annotation.java
@@ -0,0 +1,142 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * The common interface extended by all annotation interfaces. Note that an
+ * interface that manually extends this one does <i>not</i> define
+ * an annotation interface. Also note that this interface does not itself
+ * define an annotation interface.
+ *
+ * More information about annotation interfaces can be found in section
+ * {@jls 9.6} of <cite>The Java Language Specification</cite>.
+ *
+ * The {@link java.lang.reflect.AnnotatedElement} interface discusses
+ * compatibility concerns when evolving an annotation interface from being
+ * non-repeatable to being repeatable.
+ *
+ * @author Josh Bloch
+ * @since 1.5
+ */
+public interface Annotation {
+ /**
+ * Returns true if the specified object represents an annotation
+ * that is logically equivalent to this one. In other words,
+ * returns true if the specified object is an instance of the same
+ * annotation interface as this instance, all of whose members are equal
+ * to the corresponding member of this annotation, as defined below:
+ * <ul>
+ * <li>Two corresponding primitive typed members whose values are
+ * {@code x} and {@code y} are considered equal if {@code x == y},
+ * unless their type is {@code float} or {@code double}.
+ *
+ * <li>Two corresponding {@code float} members whose values
+ * are {@code x} and {@code y} are considered equal if
+ * {@code Float.valueOf(x).equals(Float.valueOf(y))}.
+ * (Unlike the {@code ==} operator, NaN is considered equal
+ * to itself, and {@code 0.0f} unequal to {@code -0.0f}.)
+ *
+ * <li>Two corresponding {@code double} members whose values
+ * are {@code x} and {@code y} are considered equal if
+ * {@code Double.valueOf(x).equals(Double.valueOf(y))}.
+ * (Unlike the {@code ==} operator, NaN is considered equal
+ * to itself, and {@code 0.0} unequal to {@code -0.0}.)
+ *
+ * <li>Two corresponding {@code String}, {@code Class}, enum, or
+ * annotation typed members whose values are {@code x} and {@code y}
+ * are considered equal if {@code x.equals(y)}. (Note that this
+ * definition is recursive for annotation typed members.)
+ *
+ * <li>Two corresponding array typed members {@code x} and {@code y}
+ * are considered equal if {@code Arrays.equals(x, y)}, for the
+ * appropriate overloading of {@link java.util.Arrays#equals Arrays.equals}.
+ * </ul>
+ *
+ * @return true if the specified object represents an annotation
+ * that is logically equivalent to this one, otherwise false
+ */
+ boolean equals(Object obj);
+
+ /**
+ * Returns the hash code of this annotation.
+ *
+ * <p>The hash code of an annotation is the sum of the hash codes
+ * of its members (including those with default values).
+ *
+ * The hash code of an annotation member is (127 times the hash code
+ * of the member-name as computed by {@link String#hashCode()}) XOR
+ * the hash code of the member-value.
+ * The hash code of a member-value depends on its type as defined below:
+ * <ul>
+ * <li>The hash code of a primitive value <i>{@code v}</i> is equal to
+ * <code><i>WrapperType</i>.valueOf(<i>v</i>).hashCode()</code>, where
+ * <i>{@code WrapperType}</i> is the wrapper type corresponding
+ * to the primitive type of <i>{@code v}</i> ({@link Byte},
+ * {@link Character}, {@link Double}, {@link Float}, {@link Integer},
+ * {@link Long}, {@link Short}, or {@link Boolean}).
+ *
+ * <li>The hash code of a string, enum, class, or annotation member-value
+ * <i>{@code v}</i> is computed as by calling
+ * <code><i>v</i>.hashCode()</code>. (In the case of annotation
+ * member values, this is a recursive definition.)
+ *
+ * <li>The hash code of an array member-value is computed by calling
+ * the appropriate overloading of
+ * {@link java.util.Arrays#hashCode(long[]) Arrays.hashCode}
+ * on the value. (There is one overloading for each primitive
+ * type, and one for object reference types.)
+ * </ul>
+ *
+ * @return the hash code of this annotation
+ */
+ int hashCode();
+
+ /**
+ * Returns a string representation of this annotation. The details
+ * of the representation are implementation-dependent, but the following
+ * may be regarded as typical:
+ * <pre>
+ * @com.example.Name(first="Duke", middle="of", last="Java")
+ * </pre>
+ *
+ * @return a string representation of this annotation
+ */
+ String toString();
+
+ /**
+ * Returns the annotation interface of this annotation.
+ *
+ * @apiNote Implementation-dependent classes are used to provide
+ * the implementations of annotations. Therefore, calling {@link
+ * Object#getClass getClass} on an annotation will return an
+ * implementation-dependent class. In contrast, this method will
+ * reliably return the annotation interface of the annotation.
+ *
+ * @return the annotation interface of this annotation
+ * @see Enum#getDeclaringClass
+ */
+ Class<? extends Annotation> annotationType();
+}
diff --git a/android-35/java/lang/annotation/AnnotationFormatError.java b/android-35/java/lang/annotation/AnnotationFormatError.java
new file mode 100644
index 0000000..da1101c
--- /dev/null
+++ b/android-35/java/lang/annotation/AnnotationFormatError.java
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2004, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Thrown when the annotation parser attempts to read an annotation
+ * from a class file and determines that the annotation is malformed.
+ * This error can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
+ *
+ * @author Josh Bloch
+ * @see java.lang.reflect.AnnotatedElement
+ * @since 1.5
+ */
+public class AnnotationFormatError extends Error {
+ @java.io.Serial
+ private static final long serialVersionUID = -4256701562333669892L;
+
+ /**
+ * Constructs a new {@code AnnotationFormatError} with the specified
+ * detail message.
+ *
+ * @param message the detail message.
+ */
+ public AnnotationFormatError(String message) {
+ super(message);
+ }
+
+ /**
+ * Constructs a new {@code AnnotationFormatError} with the specified
+ * detail message and cause. Note that the detail message associated
+ * with {@code cause} is <i>not</i> automatically incorporated in
+ * this error's detail message.
+ *
+ * @param message the detail message
+ * @param cause the cause (A {@code null} value is permitted, and
+ * indicates that the cause is nonexistent or unknown.)
+ */
+ public AnnotationFormatError(String message, Throwable cause) {
+ super(message, cause);
+ }
+
+
+ /**
+ * Constructs a new {@code AnnotationFormatError} with the specified
+ * cause and a detail message of
+ * {@code (cause == null ? null : cause.toString())} (which
+ * typically contains the class and detail message of {@code cause}).
+ *
+ * @param cause the cause (A {@code null} value is permitted, and
+ * indicates that the cause is nonexistent or unknown.)
+ */
+ public AnnotationFormatError(Throwable cause) {
+ super(cause);
+ }
+}
diff --git a/android-35/java/lang/annotation/AnnotationTypeMismatchException.java b/android-35/java/lang/annotation/AnnotationTypeMismatchException.java
new file mode 100644
index 0000000..6a9ea51
--- /dev/null
+++ b/android-35/java/lang/annotation/AnnotationTypeMismatchException.java
@@ -0,0 +1,98 @@
+/*
+ * Copyright (c) 2003, 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+import java.lang.reflect.Method;
+
+/**
+ * Thrown to indicate that a program has attempted to access an element of
+ * an annotation whose type has changed after the annotation was compiled
+ * (or serialized).
+ * This exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
+ *
+ * @author Josh Bloch
+ * @see java.lang.reflect.AnnotatedElement
+ * @since 1.5
+ */
+public class AnnotationTypeMismatchException extends RuntimeException {
+ @java.io.Serial
+ private static final long serialVersionUID = 8125925355765570191L;
+
+ /**
+ * The {@code Method} object for the annotation element.
+ */
+ private final transient Method element;
+
+ /**
+ * The (erroneous) type of data found in the annotation. This string
+ * may, but is not required to, contain the value as well. The exact
+ * format of the string is unspecified.
+ */
+ private final String foundType;
+
+ /**
+ * Constructs an AnnotationTypeMismatchException for the specified
+ * annotation type element and found data type.
+ *
+ * @param element the {@code Method} object for the annotation
+ * element, may be {@code null}
+ * @param foundType the (erroneous) type of data found in the annotation.
+ * This string may, but is not required to, contain the value
+ * as well. The exact format of the string is unspecified,
+ * may be {@code null}.
+ */
+ public AnnotationTypeMismatchException(Method element, String foundType) {
+ super("Incorrectly typed data found for annotation element " + element
+ + " (Found data of type " + foundType + ")");
+ this.element = element;
+ this.foundType = foundType;
+ }
+
+ /**
+ * Returns the {@code Method} object for the incorrectly typed element.
+ * The value may be unavailable if this exception has been
+ * serialized and then read back in.
+ *
+ * @return the {@code Method} object for the incorrectly typed
+ * element, or {@code null} if unavailable
+ */
+ public Method element() {
+ return this.element;
+ }
+
+ /**
+ * Returns the type of data found in the incorrectly typed element.
+ * The returned string may, but is not required to, contain the value
+ * as well. The exact format of the string is unspecified and the string
+ * may be {@code null}.
+ *
+ * @return the type of data found in the incorrectly typed element
+ */
+ public String foundType() {
+ return this.foundType;
+ }
+}
diff --git a/android-35/java/lang/annotation/Documented.java b/android-35/java/lang/annotation/Documented.java
new file mode 100644
index 0000000..ed88b0b
--- /dev/null
+++ b/android-35/java/lang/annotation/Documented.java
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * If the annotation {@code @Documented} is present on the declaration
+ * of an annotation interface <i>A</i>, then any {@code @A} annotation on
+ * an element is considered part of the element's public contract.
+ *
+ * In more detail, when an annotation interface <i>A</i> is annotated with
+ * {@code Documented}, the presence and value of <i>A</i> annotations
+ * are a part of the public contract of the elements <i>A</i>
+ * annotates.
+ *
+ * Conversely, if an annotation interface <i>B</i> is <em>not</em>
+ * annotated with {@code Documented}, the presence and value of
+ * <i>B</i> annotations are <em>not</em> part of the public contract
+ * of the elements <i>B</i> annotates.
+ *
+ * Concretely, if an annotation interface is annotated with {@code Documented},
+ * by default a tool like javadoc will display annotations of that interface
+ * in its output while annotations of annotation interfaces without
+ * {@code Documented} will not be displayed.
+ *
+ * @author Joshua Bloch
+ * @since 1.5
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Documented {
+}
diff --git a/android-35/java/lang/annotation/ElementType.java b/android-35/java/lang/annotation/ElementType.java
new file mode 100644
index 0000000..c046272
--- /dev/null
+++ b/android-35/java/lang/annotation/ElementType.java
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * The constants of this enumerated class provide a simple classification of the
+ * syntactic locations where annotations may appear in a Java program. These
+ * constants are used in {@link java.lang.annotation.Target Target}
+ * meta-annotations to specify where it is legal to write annotations of a
+ * given type.
+ *
+ * <p>The syntactic locations where annotations may appear are split into
+ * <em>declaration contexts</em>, where annotations apply to declarations, and
+ * <em>type contexts</em>, where annotations apply to types used in
+ * declarations and expressions.
+ *
+ * <p>The constants {@link #ANNOTATION_TYPE}, {@link #CONSTRUCTOR}, {@link
+ * #FIELD}, {@link #LOCAL_VARIABLE}, {@link #METHOD}, {@link #PACKAGE}, {@link
+ * #MODULE}, {@link #PARAMETER}, {@link #TYPE}, and {@link #TYPE_PARAMETER}
+ * correspond to the declaration contexts in JLS 9.6.4.1.
+ *
+ * <p>For example, an annotation whose interface is meta-annotated with
+ * {@code @Target(ElementType.FIELD)} may only be written as a modifier for a
+ * field declaration.
+ *
+ * <p>The constant {@link #TYPE_USE} corresponds to the type contexts in JLS
+ * 4.11, as well as to two declaration contexts: class and interface
+ * declarations (including annotation declarations) and type parameter
+ * declarations.
+ *
+ * <p>For example, an annotation whose interface is meta-annotated with
+ * {@code @Target(ElementType.TYPE_USE)} may be written on the class or
+ * interface of a field (or within the class or interface of the field, if it
+ * is a nested or parameterized class or interface, or array class), and may
+ * also appear as a modifier for, say, a class declaration.
+ *
+ * <p>The {@code TYPE_USE} constant includes class and interface declarations
+ * and type parameter declarations as a convenience for designers of
+ * type checkers which give semantics to annotation interfaces. For example,
+ * if the annotation interface {@code NonNull} is meta-annotated with
+ * {@code @Target(ElementType.TYPE_USE)}, then {@code @NonNull}
+ * {@code class C {...}} could be treated by a type checker as indicating that
+ * all variables of class {@code C} are non-null, while still allowing
+ * variables of other classes to be non-null or not non-null based on whether
+ * {@code @NonNull} appears at the variable's declaration.
+ *
+ * @author Joshua Bloch
+ * @since 1.5
+ * @jls 9.6.4.1 @Target
+ * @jls 4.1 The Kinds of Types and Values
+ */
+public enum ElementType {
+ /** Class, interface (including annotation interface), enum, or record
+ * declaration */
+ TYPE,
+
+ /** Field declaration (includes enum constants) */
+ FIELD,
+
+ /** Method declaration */
+ METHOD,
+
+ /** Formal parameter declaration */
+ PARAMETER,
+
+ /** Constructor declaration */
+ CONSTRUCTOR,
+
+ /** Local variable declaration */
+ LOCAL_VARIABLE,
+
+ /** Annotation interface declaration (Formerly known as an annotation type.) */
+ ANNOTATION_TYPE,
+
+ /** Package declaration */
+ PACKAGE,
+
+ /**
+ * Type parameter declaration
+ *
+ * @since 1.8
+ */
+ TYPE_PARAMETER,
+
+ /**
+ * Use of a type
+ *
+ * @since 1.8
+ */
+ TYPE_USE,
+
+ /**
+ * Module declaration.
+ *
+ * @since 9
+ */
+ MODULE,
+
+ /**
+ * Record component
+ *
+ * @jls 8.10.3 Record Members
+ * @jls 9.7.4 Where Annotations May Appear
+ *
+ * @since 16
+ */
+ RECORD_COMPONENT;
+}
diff --git a/android-35/java/lang/annotation/IncompleteAnnotationException.java b/android-35/java/lang/annotation/IncompleteAnnotationException.java
new file mode 100644
index 0000000..921d4b9
--- /dev/null
+++ b/android-35/java/lang/annotation/IncompleteAnnotationException.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Thrown to indicate that a program has attempted to access an element of
+ * an annotation interface that was added to the annotation interface definition
+ * after the annotation was compiled (or serialized). This exception will not be
+ * thrown if the new element has a default value.
+ * This exception can be thrown by the {@linkplain
+ * java.lang.reflect.AnnotatedElement API used to read annotations
+ * reflectively}.
+ *
+ * @author Josh Bloch
+ * @see java.lang.reflect.AnnotatedElement
+ * @since 1.5
+ */
+public class IncompleteAnnotationException extends RuntimeException {
+ @java.io.Serial
+ private static final long serialVersionUID = 8445097402741811912L;
+
+ /**
+ * The annotation interface.
+ */
+ private Class<? extends Annotation> annotationType;
+ /**
+ * The element name.
+ */
+ private String elementName;
+
+ /**
+ * Constructs an IncompleteAnnotationException to indicate that
+ * the named element was missing from the specified annotation interface.
+ *
+ * @param annotationType the Class object for the annotation interface
+ * @param elementName the name of the missing element
+ * @throws NullPointerException if either parameter is {@code null}
+ */
+ public IncompleteAnnotationException(
+ Class<? extends Annotation> annotationType,
+ String elementName) {
+ super(annotationType.getName() + " missing element " +
+ elementName.toString());
+
+ this.annotationType = annotationType;
+ this.elementName = elementName;
+ }
+
+ /**
+ * Returns the Class object for the annotation interface with the
+ * missing element.
+ *
+ * @return the Class object for the annotation interface with the
+ * missing element
+ */
+ public Class<? extends Annotation> annotationType() {
+ return annotationType;
+ }
+
+ /**
+ * Returns the name of the missing element.
+ *
+ * @return the name of the missing element
+ */
+ public String elementName() {
+ return elementName;
+ }
+}
diff --git a/android-35/java/lang/annotation/Inherited.java b/android-35/java/lang/annotation/Inherited.java
new file mode 100644
index 0000000..3cfc07d
--- /dev/null
+++ b/android-35/java/lang/annotation/Inherited.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Indicates that an annotation interface is automatically inherited. If
+ * an Inherited meta-annotation is present on an annotation interface
+ * declaration, and the user queries the annotation interface on a class
+ * declaration, and the class declaration has no annotation for this interface,
+ * then the class's superclass will automatically be queried for the
+ * annotation interface. This process will be repeated until an annotation for
+ * this interface is found, or the top of the class hierarchy (Object)
+ * is reached. If no superclass has an annotation for this interface, then
+ * the query will indicate that the class in question has no such annotation.
+ *
+ * <p>Note that this meta-annotation interface has no effect if the annotated
+ * interface is used to annotate anything other than a class. Note also
+ * that this meta-annotation only causes annotations to be inherited
+ * from superclasses; annotations on implemented interfaces have no
+ * effect.
+ *
+ * @author Joshua Bloch
+ * @since 1.5
+ * @jls 9.6.4.3 @Inherited
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Inherited {
+}
diff --git a/android-35/java/lang/annotation/Native.java b/android-35/java/lang/annotation/Native.java
new file mode 100644
index 0000000..861c1ff
--- /dev/null
+++ b/android-35/java/lang/annotation/Native.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+
+/**
+ * Indicates that a field defining a constant value may be referenced
+ * from native code.
+ *
+ * The annotation may be used as a hint by tools that generate native
+ * header files to determine whether a header file is required, and
+ * if so, what declarations it should contain.
+ *
+ * @since 1.8
+ */
+@Documented
+@Target(ElementType.FIELD)
+@Retention(RetentionPolicy.SOURCE)
+public @interface Native {
+}
diff --git a/android-35/java/lang/annotation/Repeatable.java b/android-35/java/lang/annotation/Repeatable.java
new file mode 100644
index 0000000..d8c58d8
--- /dev/null
+++ b/android-35/java/lang/annotation/Repeatable.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2012, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * The annotation interface {@code java.lang.annotation.Repeatable} is
+ * used to indicate that the annotation interface whose declaration it
+ * (meta-)annotates is <em>repeatable</em>. The value of
+ * {@code @Repeatable} indicates the <em>containing annotation
+ * interface</em> for the repeatable annotation interface.
+ *
+ * @since 1.8
+ * @jls 9.6.3 Repeatable Annotation Interfaces
+ * @jls 9.7.5 Multiple Annotations of the Same Interface
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Repeatable {
+ /**
+ * Indicates the <em>containing annotation interface</em> for the
+ * repeatable annotation interface.
+ * @return the containing annotation interface
+ */
+ Class<? extends Annotation> value();
+}
diff --git a/android-35/java/lang/annotation/Retention.java b/android-35/java/lang/annotation/Retention.java
new file mode 100644
index 0000000..daf5f6e
--- /dev/null
+++ b/android-35/java/lang/annotation/Retention.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Indicates how long annotations with the annotated interface are to
+ * be retained. If no Retention annotation is present on
+ * an annotation interface declaration, the retention policy defaults to
+ * {@code RetentionPolicy.CLASS}.
+ *
+ * <p>A Retention meta-annotation has effect only if the
+ * meta-annotated interface is used directly for annotation. It has no
+ * effect if the meta-annotated interface is used as a member interface in
+ * another annotation interface.
+ *
+ * @author Joshua Bloch
+ * @since 1.5
+ * @jls 9.6.4.2 @Retention
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Retention {
+ /**
+ * Returns the retention policy.
+ * @return the retention policy
+ */
+ RetentionPolicy value();
+}
diff --git a/android-35/java/lang/annotation/RetentionPolicy.java b/android-35/java/lang/annotation/RetentionPolicy.java
new file mode 100644
index 0000000..6ec9eb6
--- /dev/null
+++ b/android-35/java/lang/annotation/RetentionPolicy.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Annotation retention policy. The constants of this enumerated class
+ * describe the various policies for retaining annotations. They are used
+ * in conjunction with the {@link Retention} meta-annotation interface to
+ * specify how long annotations are to be retained.
+ *
+ * @author Joshua Bloch
+ * @since 1.5
+ */
+public enum RetentionPolicy {
+ /**
+ * Annotations are to be discarded by the compiler.
+ */
+ SOURCE,
+
+ /**
+ * Annotations are to be recorded in the class file by the compiler
+ * but need not be retained by the VM at run time. This is the default
+ * behavior.
+ */
+ CLASS,
+
+ /**
+ * Annotations are to be recorded in the class file by the compiler and
+ * retained by the VM at run time, so they may be read reflectively.
+ *
+ * @see java.lang.reflect.AnnotatedElement
+ */
+ RUNTIME
+}
diff --git a/android-35/java/lang/annotation/Target.java b/android-35/java/lang/annotation/Target.java
new file mode 100644
index 0000000..ee164cd
--- /dev/null
+++ b/android-35/java/lang/annotation/Target.java
@@ -0,0 +1,89 @@
+/*
+ * Copyright (c) 2003, 2020, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package java.lang.annotation;
+
+/**
+ * Indicates the contexts in which an annotation interface is applicable. The
+ * declaration contexts and type contexts in which an annotation interface may
+ * be applicable are specified in JLS {@jls 9.6.4.1}, and denoted in source code by
+ * enum constants of {@link ElementType java.lang.annotation.ElementType}.
+ *
+ * <p>If an {@code @Target} meta-annotation is not present on an annotation
+ * interface {@code T}, then an annotation of type {@code T} may be written as
+ * a modifier for any declaration.
+ *
+ * <p>If an {@code @Target} meta-annotation is present, the compiler will enforce
+ * the usage restrictions indicated by {@code ElementType}
+ * enum constants, in line with JLS {@jls 9.7.4}.
+ *
+ * <p>For example, this {@code @Target} meta-annotation indicates that the
+ * declared interface is itself a meta-annotation interface. It can only be
+ * used on annotation interface declarations:
+ * <pre>
+ * @Target(ElementType.ANNOTATION_TYPE)
+ * public @interface MetaAnnotationType {
+ * ...
+ * }
+ * </pre>
+ *
+ * <p>This {@code @Target} meta-annotation indicates that the declared class or
+ * interface is intended solely for use as a member class or interface in
+ * complex annotation interface declarations. It cannot be used to annotate
+ * anything directly:
+ * <pre>
+ * @Target({})
+ * public @interface MemberInterface {
+ * ...
+ * }
+ * </pre>
+ *
+ * <p>It is a compile-time error for a single {@code ElementType} constant to
+ * appear more than once in an {@code @Target} annotation. For example, the
+ * following {@code @Target} meta-annotation is illegal:
+ * <pre>
+ * @Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})
+ * public @interface Bogus {
+ * ...
+ * }
+ * </pre>
+ *
+ * @since 1.5
+ * @jls 9.6.4.1 @Target
+ * @jls 9.7.4 Where Annotations May Appear
+ * @jls 9.7.5 Multiple Annotations of the Same Interface
+ */
+@Documented
+@Retention(RetentionPolicy.RUNTIME)
+@Target(ElementType.ANNOTATION_TYPE)
+public @interface Target {
+ /**
+ * Returns an array of the kinds of elements an annotation interface
+ * can be applied to.
+ * @return an array of the kinds of elements an annotation interface
+ * can be applied to
+ */
+ ElementType[] value();
+}
diff --git a/android-35/java/lang/annotation/package-info.java b/android-35/java/lang/annotation/package-info.java
new file mode 100644
index 0000000..b2b7ec6
--- /dev/null
+++ b/android-35/java/lang/annotation/package-info.java
@@ -0,0 +1,33 @@
+/*
+ * Copyright (c) 2004, 2006, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation. Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Provides library support for the Java programming language
+ * annotation facility.
+ *
+ * @author Josh Bloch
+ * @since 1.5
+ */
+package java.lang.annotation;