<NME> Target.java
<BEF> /*
 * Copyright (c) 2003, 2004, 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 kinds of program element to which an annotation type
 * is applicable.  If a Target meta-annotation is not present on an
 * annotation type declaration, the declared type may be used on any
 * program element.  If such a meta-annotation is present, the compiler
 * will enforce the specified usage restriction.
 *
 * For example, this meta-annotation indicates that the declared type is
 * itself a meta-annotation type.  It can only be used on annotation type
 * declarations:
 * <pre>
 *    &#064;Target(ElementType.ANNOTATION_TYPE)
 *    public &#064;interface MetaAnnotationType {
 *        ...
 *    }
 * </pre>
 * This meta-annotation indicates that the declared type is intended solely
 * for use as a member type in complex annotation type declarations.  It
 * cannot be used to annotate anything directly:
 * <pre>
 *    &#064;Target({})
 *    public &#064;interface MemberType {
 *        ...
 *    }
 * </pre>
 * It is a compile-time error for a single ElementType constant to
 * appear more than once in a Target annotation.  For example, the
 * following meta-annotation is illegal:
 * <pre>
 *    &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})
 *    public &#064;interface Bogus {
 *        ...
 *    }
 * </pre>
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.ANNOTATION_TYPE)
public @interface Target {
    ElementType[] value();
}
}

<MSG> Updated java.lang.annotation to latest OpenJDK version.

	Change on 2016/09/14 by tball <tball@google.com>

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=133136124

<DFF> @@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, 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
@@ -26,43 +26,62 @@
 package java.lang.annotation;
 
 /**
- * Indicates the kinds of program element to which an annotation type
- * is applicable.  If a Target meta-annotation is not present on an
- * annotation type declaration, the declared type may be used on any
- * program element.  If such a meta-annotation is present, the compiler
- * will enforce the specified usage restriction.
+ * Indicates the contexts in which an annotation type is applicable. The
+ * declaration contexts and type contexts in which an annotation type may be
+ * applicable are specified in JLS 9.6.4.1, and denoted in source code by enum
+ * constants of {@link ElementType java.lang.annotation.ElementType}.
  *
- * For example, this meta-annotation indicates that the declared type is
- * itself a meta-annotation type.  It can only be used on annotation type
- * declarations:
+ * <p>If an {@code @Target} meta-annotation is not present on an annotation type
+ * {@code T} , then an annotation of type {@code T} may be written as a
+ * modifier for any declaration except a type parameter 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 9.7.4.
+ *
+ * <p>For example, this {@code @Target} meta-annotation indicates that the
+ * declared type is itself a meta-annotation type.  It can only be used on
+ * annotation type declarations:
  * <pre>
  *    &#064;Target(ElementType.ANNOTATION_TYPE)
  *    public &#064;interface MetaAnnotationType {
  *        ...
  *    }
  * </pre>
- * This meta-annotation indicates that the declared type is intended solely
- * for use as a member type in complex annotation type declarations.  It
- * cannot be used to annotate anything directly:
+ *
+ * <p>This {@code @Target} meta-annotation indicates that the declared type is
+ * intended solely for use as a member type in complex annotation type
+ * declarations.  It cannot be used to annotate anything directly:
  * <pre>
  *    &#064;Target({})
  *    public &#064;interface MemberType {
  *        ...
  *    }
  * </pre>
- * It is a compile-time error for a single ElementType constant to
- * appear more than once in a Target annotation.  For example, the
- * following meta-annotation is illegal:
+ *
+ * <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>
  *    &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})
  *    public &#064;interface Bogus {
  *        ...
  *    }
  * </pre>
+ *
+ * @since 1.5
+ * @jls 9.6.4.1 @Target
+ * @jls 9.7.4 Where Annotations May Appear
  */
 @Documented
 @Retention(RetentionPolicy.RUNTIME)
 @Target(ElementType.ANNOTATION_TYPE)
 public @interface Target {
+    /**
+     * Returns an array of the kinds of elements an annotation type
+     * can be applied to.
+     * @return an array of the kinds of elements an annotation type
+     * can be applied to
+     */
     ElementType[] value();
 }

{'commit': 'diff --git a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Annotation.java b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Annotation.java\nindex d7b8ddd76..7de674681 100644\n--- a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Annotation.java\n+++ b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Annotation.java\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2003, 2009, Oracle and/or its affiliates. All rights reserved.\n+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.\n  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  *\n  * This code is free software; you can redistribute it and/or modify it\n@@ -34,6 +34,10 @@ package java.lang.annotation;\n  * More information about annotation types can be found in section 9.6 of\n  * <cite>The Java&trade; Language Specification</cite>.\n  *\n+ * The {@link java.lang.reflect.AnnotatedElement} interface discusses\n+ * compatibility concerns when evolving an annotation type from being\n+ * non-repeatable to being repeatable.\n+ *\n  * @author  Josh Bloch\n  * @since   1.5\n  */\n@@ -126,6 +130,7 @@ public interface Annotation {\n \n     /**\n      * Returns the annotation type of this annotation.\n+     * @return the annotation type of this annotation\n      */\n     Class<? extends Annotation> annotationType();\n }\ndiff --git a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java\nindex 7d7c2b1f9..241b21a43 100644\n--- a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java\n+++ b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/IncompleteAnnotationException.java\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2003, 2008, Oracle and/or its affiliates. All rights reserved.\n+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.\n  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  *\n  * This code is free software; you can redistribute it and/or modify it\n@@ -41,21 +41,22 @@ package java.lang.annotation;\n public class IncompleteAnnotationException extends RuntimeException {\n     private static final long serialVersionUID = 8445097402741811912L;\n \n-    private Class annotationType;\n+    private Class<? extends Annotation> annotationType;\n     private String elementName;\n \n-\n     /**\n      * Constructs an IncompleteAnnotationException to indicate that\n      * the named element was missing from the specified annotation type.\n      *\n      * @param annotationType the Class object for the annotation type\n      * @param elementName the name of the missing element\n+     * @throws NullPointerException if either parameter is {@code null}\n      */\n     public IncompleteAnnotationException(\n             Class<? extends Annotation> annotationType,\n             String elementName) {\n-        super(annotationType.getName() + " missing element " + elementName);\n+        super(annotationType.getName() + " missing element " +\n+              elementName.toString());\n \n         this.annotationType = annotationType;\n         this.elementName = elementName;\ndiff --git a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Inherited.java b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Inherited.java\nindex a7efa6b41..83391e29e 100644\n--- a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Inherited.java\n+++ b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Inherited.java\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.\n+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.\n  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  *\n  * This code is free software; you can redistribute it and/or modify it\n@@ -44,6 +44,7 @@ package java.lang.annotation;\n  *\n  * @author  Joshua Bloch\n  * @since 1.5\n+ * @jls 9.6.3.3 @Inherited\n  */\n @Documented\n @Retention(RetentionPolicy.RUNTIME)\ndiff --git a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java\nindex dc67de3f0..1ad405633 100644\n--- a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java\n+++ b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java\n@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.\n+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.\n  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  *\n  * This code is free software; you can redistribute it and/or modify it\n@@ -26,43 +26,62 @@\n package java.lang.annotation;\n \n /**\n- * Indicates the kinds of program element to which an annotation type\n- * is applicable.  If a Target meta-annotation is not present on an\n- * annotation type declaration, the declared type may be used on any\n- * program element.  If such a meta-annotation is present, the compiler\n- * will enforce the specified usage restriction.\n+ * Indicates the contexts in which an annotation type is applicable. The\n+ * declaration contexts and type contexts in which an annotation type may be\n+ * applicable are specified in JLS 9.6.4.1, and denoted in source code by enum\n+ * constants of {@link ElementType java.lang.annotation.ElementType}.\n  *\n- * For example, this meta-annotation indicates that the declared type is\n- * itself a meta-annotation type.  It can only be used on annotation type\n- * declarations:\n+ * <p>If an {@code @Target} meta-annotation is not present on an annotation type\n+ * {@code T} , then an annotation of type {@code T} may be written as a\n+ * modifier for any declaration except a type parameter declaration.\n+ *\n+ * <p>If an {@code @Target} meta-annotation is present, the compiler will enforce\n+ * the usage restrictions indicated by {@code ElementType}\n+ * enum constants, in line with JLS 9.7.4.\n+ *\n+ * <p>For example, this {@code @Target} meta-annotation indicates that the\n+ * declared type is itself a meta-annotation type.  It can only be used on\n+ * annotation type declarations:\n  * <pre>\n  *    &#064;Target(ElementType.ANNOTATION_TYPE)\n  *    public &#064;interface MetaAnnotationType {\n  *        ...\n  *    }\n  * </pre>\n- * This meta-annotation indicates that the declared type is intended solely\n- * for use as a member type in complex annotation type declarations.  It\n- * cannot be used to annotate anything directly:\n+ *\n+ * <p>This {@code @Target} meta-annotation indicates that the declared type is\n+ * intended solely for use as a member type in complex annotation type\n+ * declarations.  It cannot be used to annotate anything directly:\n  * <pre>\n  *    &#064;Target({})\n  *    public &#064;interface MemberType {\n  *        ...\n  *    }\n  * </pre>\n- * It is a compile-time error for a single ElementType constant to\n- * appear more than once in a Target annotation.  For example, the\n- * following meta-annotation is illegal:\n+ *\n+ * <p>It is a compile-time error for a single {@code ElementType} constant to\n+ * appear more than once in an {@code @Target} annotation.  For example, the\n+ * following {@code @Target} meta-annotation is illegal:\n  * <pre>\n  *    &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})\n  *    public &#064;interface Bogus {\n  *        ...\n  *    }\n  * </pre>\n+ *\n+ * @since 1.5\n+ * @jls 9.6.4.1 @Target\n+ * @jls 9.7.4 Where Annotations May Appear\n  */\n @Documented\n @Retention(RetentionPolicy.RUNTIME)\n @Target(ElementType.ANNOTATION_TYPE)\n public @interface Target {\n+    /**\n+     * Returns an array of the kinds of elements an annotation type\n+     * can be applied to.\n+     * @return an array of the kinds of elements an annotation type\n+     * can be applied to\n+     */\n     ElementType[] value();\n }\ndiff --git a/jre_emul/java_sources.mk b/jre_emul/java_sources.mk\nindex 7b27ed845..28615b1e8 100644\n--- a/jre_emul/java_sources.mk\n+++ b/jre_emul/java_sources.mk\n@@ -164,6 +164,7 @@ JAVA_PUBLIC_SOURCES_CORE = \\\n   java/lang/annotation/ElementType.java \\\n   java/lang/annotation/IncompleteAnnotationException.java \\\n   java/lang/annotation/Inherited.java \\\n+  java/lang/annotation/Native.java \\\n   java/lang/annotation/Repeatable.java \\\n   java/lang/annotation/Retention.java \\\n   java/lang/annotation/RetentionPolicy.java \\\n', 'commit_subject': 'Updated java.lang.annotation to latest OpenJDK version.', 'repo_name': 'google/j2objc', 'committer': {'name': 'Tom Ball', 'email': '413a605d00e3df24790ca07c68ba8993b8d2bae1@google.com', 'time_sec': '1474060513', 'tz_offset': '-420', 'date': {'seconds': '1474060513'}}, 'commit_tree': '3911ab2b61051aaa3c6315802d8ce071ecc3af9e', 'commit_message': 'Updated java.lang.annotation to latest OpenJDK version.\n\n\tChange on 2016/09/14 by tball <tball@google.com>\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=133136124\n', 'language_name': 'C', 'license': 'apache-2.0', 'hunks': '@@ -1,5 +1,5 @@\n /*\n- * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.\n+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.\n  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n  *\n  * This code is free software; you can redistribute it and/or modify it\n@@ -26,43 +26,62 @@\n package java.lang.annotation;\n \n /**\n- * Indicates the kinds of program element to which an annotation type\n- * is applicable.  If a Target meta-annotation is not present on an\n- * annotation type declaration, the declared type may be used on any\n- * program element.  If such a meta-annotation is present, the compiler\n- * will enforce the specified usage restriction.\n+ * Indicates the contexts in which an annotation type is applicable. The\n+ * declaration contexts and type contexts in which an annotation type may be\n+ * applicable are specified in JLS 9.6.4.1, and denoted in source code by enum\n+ * constants of {@link ElementType java.lang.annotation.ElementType}.\n  *\n- * For example, this meta-annotation indicates that the declared type is\n- * itself a meta-annotation type.  It can only be used on annotation type\n- * declarations:\n+ * <p>If an {@code @Target} meta-annotation is not present on an annotation type\n+ * {@code T} , then an annotation of type {@code T} may be written as a\n+ * modifier for any declaration except a type parameter declaration.\n+ *\n+ * <p>If an {@code @Target} meta-annotation is present, the compiler will enforce\n+ * the usage restrictions indicated by {@code ElementType}\n+ * enum constants, in line with JLS 9.7.4.\n+ *\n+ * <p>For example, this {@code @Target} meta-annotation indicates that the\n+ * declared type is itself a meta-annotation type.  It can only be used on\n+ * annotation type declarations:\n  * <pre>\n  *    &#064;Target(ElementType.ANNOTATION_TYPE)\n  *    public &#064;interface MetaAnnotationType {\n  *        ...\n  *    }\n  * </pre>\n- * This meta-annotation indicates that the declared type is intended solely\n- * for use as a member type in complex annotation type declarations.  It\n- * cannot be used to annotate anything directly:\n+ *\n+ * <p>This {@code @Target} meta-annotation indicates that the declared type is\n+ * intended solely for use as a member type in complex annotation type\n+ * declarations.  It cannot be used to annotate anything directly:\n  * <pre>\n  *    &#064;Target({})\n  *    public &#064;interface MemberType {\n  *        ...\n  *    }\n  * </pre>\n- * It is a compile-time error for a single ElementType constant to\n- * appear more than once in a Target annotation.  For example, the\n- * following meta-annotation is illegal:\n+ *\n+ * <p>It is a compile-time error for a single {@code ElementType} constant to\n+ * appear more than once in an {@code @Target} annotation.  For example, the\n+ * following {@code @Target} meta-annotation is illegal:\n  * <pre>\n  *    &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})\n  *    public &#064;interface Bogus {\n  *        ...\n  *    }\n  * </pre>\n+ *\n+ * @since 1.5\n+ * @jls 9.6.4.1 @Target\n+ * @jls 9.7.4 Where Annotations May Appear\n  */\n @Documented\n @Retention(RetentionPolicy.RUNTIME)\n @Target(ElementType.ANNOTATION_TYPE)\n public @interface Target {\n+    /**\n+     * Returns an array of the kinds of elements an annotation type\n+     * can be applied to.\n+     * @return an array of the kinds of elements an annotation type\n+     * can be applied to\n+     */\n     ElementType[] value();\n }\n', 'addition_count': 34, 'deletion_count': 15, 'src_file': 'a/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java', 'tgt_file': 'b/jre_emul/android/platform/libcore/ojluni/src/main/java/java/lang/annotation/Target.java', 'file_extension': '.java', 'before_file': '/*\n * Copyright (c) 2003, 2004, Oracle and/or its affiliates. All rights reserved.\n * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.\n *\n * This code is free software; you can redistribute it and/or modify it\n * under the terms of the GNU General Public License version 2 only, as\n * published by the Free Software Foundation.  Oracle designates this\n * particular file as subject to the "Classpath" exception as provided\n * by Oracle in the LICENSE file that accompanied this code.\n *\n * This code is distributed in the hope that it will be useful, but WITHOUT\n * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\n * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License\n * version 2 for more details (a copy is included in the LICENSE file that\n * accompanied this code).\n *\n * You should have received a copy of the GNU General Public License version\n * 2 along with this work; if not, write to the Free Software Foundation,\n * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.\n *\n * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA\n * or visit www.oracle.com if you need additional information or have any\n * questions.\n */\n\npackage java.lang.annotation;\n\n/**\n * Indicates the kinds of program element to which an annotation type\n * is applicable.  If a Target meta-annotation is not present on an\n * annotation type declaration, the declared type may be used on any\n * program element.  If such a meta-annotation is present, the compiler\n * will enforce the specified usage restriction.\n *\n * For example, this meta-annotation indicates that the declared type is\n * itself a meta-annotation type.  It can only be used on annotation type\n * declarations:\n * <pre>\n *    &#064;Target(ElementType.ANNOTATION_TYPE)\n *    public &#064;interface MetaAnnotationType {\n *        ...\n *    }\n * </pre>\n * This meta-annotation indicates that the declared type is intended solely\n * for use as a member type in complex annotation type declarations.  It\n * cannot be used to annotate anything directly:\n * <pre>\n *    &#064;Target({})\n *    public &#064;interface MemberType {\n *        ...\n *    }\n * </pre>\n * It is a compile-time error for a single ElementType constant to\n * appear more than once in a Target annotation.  For example, the\n * following meta-annotation is illegal:\n * <pre>\n *    &#064;Target({ElementType.FIELD, ElementType.METHOD, ElementType.FIELD})\n *    public &#064;interface Bogus {\n *        ...\n *    }\n * </pre>\n */\n@Documented\n@Retention(RetentionPolicy.RUNTIME)\n@Target(ElementType.ANNOTATION_TYPE)\npublic @interface Target {\n    ElementType[] value();\n}\n}\n', 'message': 'Updated java.lang.annotation to latest OpenJDK version.\n\n\tChange on 2016/09/14 by tball <tball@google.com>\n\n-------------\nCreated by MOE: https://github.com/google/moe\nMOE_MIGRATED_REVID=133136124\n', 'author_name': 'Tom Ball', 'lang': 'java'}