From 554fd8c5195424bdbcabf5de30fdc183aba391bd Mon Sep 17 00:00:00 2001
From: upstream source tree <ports@midipix.org>
Date: Sun, 15 Mar 2015 20:14:05 -0400
Subject: obtained gcc-4.6.4.tar.bz2 from upstream website; verified
 gcc-4.6.4.tar.bz2.sig; imported gcc-4.6.4 source tree from verified upstream
 tarball.

downloading a git-generated archive based on the 'upstream' tag
should provide you with a source tree that is binary identical
to the one extracted from the above tarball.

if you have obtained the source via the command 'git clone',
however, do note that line-endings of files in your working
directory might differ from line-endings of the respective
files in the upstream repository.
---
 .../classpath/java/lang/annotation/Annotation.java | 135 +++++++++++++++++++++
 .../lang/annotation/AnnotationFormatError.java     | 105 ++++++++++++++++
 .../AnnotationTypeMismatchException.java           | 116 ++++++++++++++++++
 .../classpath/java/lang/annotation/Documented.java |  50 ++++++++
 .../java/lang/annotation/ElementType.java          |  59 +++++++++
 .../annotation/IncompleteAnnotationException.java  | 107 ++++++++++++++++
 .../classpath/java/lang/annotation/Inherited.java  |  51 ++++++++
 .../classpath/java/lang/annotation/Retention.java  |  59 +++++++++
 .../java/lang/annotation/RetentionPolicy.java      |  66 ++++++++++
 libjava/classpath/java/lang/annotation/Target.java |  52 ++++++++
 .../classpath/java/lang/annotation/package.html    |  46 +++++++
 11 files changed, 846 insertions(+)
 create mode 100644 libjava/classpath/java/lang/annotation/Annotation.java
 create mode 100644 libjava/classpath/java/lang/annotation/AnnotationFormatError.java
 create mode 100644 libjava/classpath/java/lang/annotation/AnnotationTypeMismatchException.java
 create mode 100644 libjava/classpath/java/lang/annotation/Documented.java
 create mode 100644 libjava/classpath/java/lang/annotation/ElementType.java
 create mode 100644 libjava/classpath/java/lang/annotation/IncompleteAnnotationException.java
 create mode 100644 libjava/classpath/java/lang/annotation/Inherited.java
 create mode 100644 libjava/classpath/java/lang/annotation/Retention.java
 create mode 100644 libjava/classpath/java/lang/annotation/RetentionPolicy.java
 create mode 100644 libjava/classpath/java/lang/annotation/Target.java
 create mode 100644 libjava/classpath/java/lang/annotation/package.html

(limited to 'libjava/classpath/java/lang/annotation')

diff --git a/libjava/classpath/java/lang/annotation/Annotation.java b/libjava/classpath/java/lang/annotation/Annotation.java
new file mode 100644
index 000000000..aac8bb9f1
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/Annotation.java
@@ -0,0 +1,135 @@
+/* Annotation.java - Base interface for all annotations
+   Copyright (C) 2004 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+/**
+ * This is the common interface for all annotations.  Note that classes
+ * that implement this class manually are not classed as annotations, and
+ * that this interface does not define an annotation type in itself.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+public interface Annotation
+{
+
+  /**
+   * Returns the type of this annotation.
+   *
+   * @return the class of which this annotation is an instance.
+   */
+  Class<? extends Annotation> annotationType();
+
+  /**
+   * <p>
+   * Returns true if the supplied object is equivalent to this annotation.
+   * For this property to hold, the following must be true of <code>o</code>:
+   * </p>
+   * <ul>
+   * <li>The object is also an instance of the same annotation type.</li>
+   * <li>The members of the supplied annotation are equal to those of this
+   * annotation, according to the following:
+   * <ul>
+   * <li>If the members are <code>float</code>s, then, for floats
+   * <code>x</code> and <code>y</code>,
+   * <code>Float.valueOf(x).equals(Float.valueOf(y)</code> must return
+   * true.  This differs from the usual (<code>==</code>) comparison
+   * in that <code>NaN</code> is considered equal to itself and positive
+   * and negative zero are seen as different.</li>
+   * <li>Likewise, if the members are <code>double</code>s, then, for doubles
+   * <code>x</code> and <code>y</code>,
+   * <code>Double.valueOf(x).equals(Double.valueOf(y)</code> must return
+   * true.  This differs from the usual (<code>==</code>) comparison
+   * in that <code>NaN</code> is considered equal to itself and positive
+   * and negative zero are seen as different.</li>
+   * <li>Strings, classes, enumerations and annotations are considered
+   * equal according to the <code>equals()</code> implementation for these
+   * types.</li>
+   * <li>Arrays are considered equal according to <code>Arrays.equals()</code>
+   * </li>
+   * <li>Any remaining types are considered equal using <code>==</code>.</li>
+   * </li>
+   * </ul>
+   *
+   * @param o the object to compare with this annotation.
+   * @return true if the supplied object is an annotation with equivalent
+   *         members.
+   */
+  boolean equals(Object o);
+
+  /**
+   * <p>
+   * Returns the hash code of the annotation.  This is computed as the
+   * sum of the hash codes of the annotation's members.
+   * </p>
+   * <p>
+   * The hash code of a member of the annotation is the result of XORing
+   * the hash code of its value with the result of multiplying the hash code
+   * of its name by 127.  Formally, if the value is <code>v</code> and the
+   * name is <code>n</code>, the hash code of the member is
+   * v.hashCode() XOR (127 * String.hashCode(n)).  <code>v.hashCode()</code>
+   * is defined as follows:
+   * </p>
+   * <ul>
+   * <li>The hash code of a primitive value (i.e. <code>byte</code>,
+   * <code>char</code>, <code>double</code>, <code>float</code>,
+   * <code>int</code>, <code>long</code>, <code>short</code> and
+   * <code>boolean</code>) is the hash code obtained from its corresponding
+   * wrapper class using <code>valueOf(v).hashCode()</code>, where
+   * <code>v</code> is the primitive value.</li>
+   * <li>The hash code of an enumeration, string, class or other annotation
+   * is obtained using <code>v.hashCode()</code>.</li>
+   * <li>The hash code of an array is computed using
+   * <code>Arrays.hashCode(v)</code>.</li>
+   * </ul>
+   *
+   * @return the hash code of the annotation, computed as the sum of its
+   *         member hashcodes.
+   */
+  int hashCode();
+
+  /**
+   * Returns a textual representation of the annotation.  This is
+   * implementation-dependent, but is expected to include the classname
+   * and the names and values of each member.
+   *
+   * @return a textual representation of the annotation.
+   */
+  String toString();
+}
diff --git a/libjava/classpath/java/lang/annotation/AnnotationFormatError.java b/libjava/classpath/java/lang/annotation/AnnotationFormatError.java
new file mode 100644
index 000000000..36f600632
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/AnnotationFormatError.java
@@ -0,0 +1,105 @@
+/* AnnotationFormatError.java - Thrown when an binary annotation is malformed
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+/**
+ * Thrown when an annotation found in a class file is
+ * malformed.  When the virtual machine finds a class file
+ * containing annotations, it attempts to parse them.
+ * This error is thrown if this operation fails.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+public class AnnotationFormatError extends Error
+{
+  private static final long serialVersionUID = -4256701562333669892L;
+
+  /**
+   * Constructs a new <code>AnnotationFormatError</code>
+   * using the specified message to give details of the error.
+   *
+   * @param message the message to use in the error output.
+   */
+  public AnnotationFormatError(String message)
+  {
+    super(message);
+  }
+
+  /**
+   * <p>
+   * Constructs a new <code>AnnotationFormatError</code>
+   * using the specified message to give details of the error.
+   * The supplied cause <code>Throwable</code> is used to
+   * provide additional history, with regards to the root
+   * of the problem.  It is perfectly valid for this to be null, if
+   * the cause is unknown.
+   * </p>
+   * <p>
+   * <strong>Note</strong>: if a cause is supplied, the error
+   * message from this cause is not automatically included in the
+   * error message given by this error.
+   * </p>
+   *
+   * @param message the message to use in the error output
+   * @param cause the cause of this error, or null if the cause
+   *              is unknown.
+   */
+  public AnnotationFormatError(String message, Throwable cause)
+  {
+    super(message, cause);
+  }
+
+  /**
+   * Constructs a new <code>AnnotationFormatError</code> using
+   * the supplied cause <code>Throwable</code> to
+   * provide additional history, with regards to the root
+   * of the problem.  It is perfectly valid for this to be null, if
+   * the cause is unknown.  If the cause is not null, the error
+   * message from this cause will also be used as the message
+   * for this error.
+   *
+   * @param cause the cause of the error.
+   */
+  public AnnotationFormatError(Throwable cause)
+  {
+    super(cause);
+  }
+
+}
diff --git a/libjava/classpath/java/lang/annotation/AnnotationTypeMismatchException.java b/libjava/classpath/java/lang/annotation/AnnotationTypeMismatchException.java
new file mode 100644
index 000000000..bab32e0ea
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/AnnotationTypeMismatchException.java
@@ -0,0 +1,116 @@
+/* AnnotationTypeMismatchException.java - Thrown when annotation has changed
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+import java.lang.reflect.Method;
+
+/**
+ * Thrown when accessing an element within an annotation for
+ * which the type has changed, since compilation or serialization
+ * took place.  The mismatch between the compiled or serialized
+ * type and the current type causes this exception to be thrown.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+public class AnnotationTypeMismatchException extends RuntimeException
+{
+
+  /**
+   * For compatability with Sun's JDK
+   */
+  private static final long serialVersionUID = 8125925355765570191L;
+
+  /**
+   * Constructs an <code>AnnotationTypeMismatchException</code>
+   * which is due to a mismatched type in the annotation
+   * element, <code>m</code>. The erroneous type used for the
+   * data in <code>m</code> is represented by the string,
+   * <code>type</code>.  This string is of an undefined format,
+   * and may contain the value as well as the type.
+   *
+   * @param m the element from the annotation.
+   * @param type the name of the erroneous type found in <code>m</code>.
+   */
+  public AnnotationTypeMismatchException(Method m, String type)
+  {
+    this.element = m;
+    this.foundType = type;
+  }
+
+  /**
+   * Returns the element from the annotation, for which a
+   * mismatch occurred.
+   *
+   * @return the element with the mismatched type.
+   */
+  public Method element()
+  {
+    return element;
+  }
+
+  /**
+   * Returns the erroneous type used by the element,
+   * represented as a <code>String</code>.  The format
+   * of this <code>String</code> is not explicitly specified,
+   * and may contain the value as well as the type.
+   *
+   * @return the type found in the element.
+   */
+  public String foundType()
+  {
+    return foundType;
+  }
+
+  // Names are chosen from serialization spec.
+  /**
+   * The element from the annotation.
+   *
+   * @serial the element with the mismatched type.
+   */
+  private Method element;
+
+  /**
+   * The erroneous type used by the element.
+   *
+   * @serial the type found in the element.
+   */
+  private String foundType;
+
+}
diff --git a/libjava/classpath/java/lang/annotation/Documented.java b/libjava/classpath/java/lang/annotation/Documented.java
new file mode 100644
index 000000000..9a51bc2f0
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/Documented.java
@@ -0,0 +1,50 @@
+/* Documented.java - Indicates documented source element
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+/**
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+@Documented @Retention(RUNTIME)
+public @interface Documented
+{
+}
diff --git a/libjava/classpath/java/lang/annotation/ElementType.java b/libjava/classpath/java/lang/annotation/ElementType.java
new file mode 100644
index 000000000..3ab89c946
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/ElementType.java
@@ -0,0 +1,59 @@
+/* ElementType.java - Enum listing Java source elements
+   Copyright (C) 2004 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+/**
+ * @since 1.5
+ */
+public enum ElementType
+{
+  ANNOTATION_TYPE,
+  CONSTRUCTOR,
+  FIELD,
+  LOCAL_VARIABLE,
+  METHOD,
+  PACKAGE,
+  PARAMETER,
+  TYPE;
+
+  /**
+   * For compatability with Sun's JDK
+   */
+  private static final long serialVersionUID = 2798216111136361587L;
+
+}
diff --git a/libjava/classpath/java/lang/annotation/IncompleteAnnotationException.java b/libjava/classpath/java/lang/annotation/IncompleteAnnotationException.java
new file mode 100644
index 000000000..b511b36c2
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/IncompleteAnnotationException.java
@@ -0,0 +1,107 @@
+/* IncompleteAnnotationException.java - Thrown when annotation has changed
+   Copyright (C) 2004 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+/**
+ * Thrown when accessing an element within an annotation which
+ * was added since compilation or serialization took place, and
+ * does not have a default value.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+public class IncompleteAnnotationException extends RuntimeException
+{
+
+  /**
+   * Constructs a new <code>IncompleteAnnotationException</code>
+   * which indicates that the element, <code>name</code>, was missing
+   * from the annotation, <code>type</code> at compile time and does
+   * not have a default value.
+   *
+   * @param type the type of annotation from which an element is missing.
+   * @param name the name of the missing element.
+   */
+  public IncompleteAnnotationException(Class<? extends Annotation> type,
+                                       String name)
+  {
+    this.annotationType = type;
+    this.elementName = name;
+  }
+
+  /**
+   * Returns the class representing the type of annotation
+   * from which an element was missing.
+   *
+   * @return the type of annotation.
+   */
+  public Class<? extends Annotation> annotationType()
+  {
+    return annotationType;
+  }
+
+  /**
+   * Returns the name of the missing annotation element.
+   *
+   * @return the element name.
+   */
+  public String elementName()
+  {
+    return elementName;
+  }
+
+  // Names are chosen from serialization spec.
+
+  /**
+   * The class representing the type of annotation from
+   * which an element was found to be missing.
+   *
+   * @serial the type of the annotation from which an
+   *         element was missing.
+   */
+  private Class<? extends Annotation> annotationType;
+
+  /**
+   * The name of the missing element.
+   *
+   * @serial the name of the missing element.
+   */
+  private String elementName;
+
+}
diff --git a/libjava/classpath/java/lang/annotation/Inherited.java b/libjava/classpath/java/lang/annotation/Inherited.java
new file mode 100644
index 000000000..34acbf47c
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/Inherited.java
@@ -0,0 +1,51 @@
+/* Inherited.java - Indicates inherited annotation
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+
+/**
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE)
+public @interface Inherited
+{
+}
diff --git a/libjava/classpath/java/lang/annotation/Retention.java b/libjava/classpath/java/lang/annotation/Retention.java
new file mode 100644
index 000000000..8d8a79dbc
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/Retention.java
@@ -0,0 +1,59 @@
+/* Retention.java - Retention policy for an annotation
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+
+/**
+ * This annotation is used to specify the desired lifetime of another
+ * annotation.
+ *
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @see RetentionPolicy
+ * @since 1.5
+ */
+@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE)
+public @interface Retention
+{
+  /**
+   * The value holds the lifetime of the annotation.
+   */
+  RetentionPolicy value();
+}
diff --git a/libjava/classpath/java/lang/annotation/RetentionPolicy.java b/libjava/classpath/java/lang/annotation/RetentionPolicy.java
new file mode 100644
index 000000000..56d2af1b7
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/RetentionPolicy.java
@@ -0,0 +1,66 @@
+/* RetentionPolicy.java - Enum listing lifetimes for an annotation
+   Copyright (C) 2004 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+/**
+ * This enum is used to control the lifetime of an annotation.
+ *
+ * @see Retention
+ *
+ * @since 1.5
+ */
+public enum RetentionPolicy
+{
+  /** Indicates that the annotation should be stored in class files.  */
+  CLASS,
+
+  /** Indicates that the annotation should be available at runtime.  */
+  RUNTIME,
+
+  /**
+   * Indicates that the annotation should only be available when
+   * parsing the source code.
+   */
+  SOURCE;
+
+  /**
+   * For compatability with Sun's JDK
+   */
+  private static final long serialVersionUID = -1700821648800605045L;
+
+}
diff --git a/libjava/classpath/java/lang/annotation/Target.java b/libjava/classpath/java/lang/annotation/Target.java
new file mode 100644
index 000000000..c9d968632
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/Target.java
@@ -0,0 +1,52 @@
+/* Target.java - Indicate where an annotation may be applied
+   Copyright (C) 2004, 2005 Free Software Foundation
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. */
+
+package java.lang.annotation;
+
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+
+/**
+ * @author Tom Tromey (tromey@redhat.com)
+ * @author Andrew John Hughes (gnu_andrew@member.fsf.org)
+ * @since 1.5
+ */
+@Documented @Retention(RUNTIME) @Target(ANNOTATION_TYPE)
+public @interface Target
+{
+  ElementType[] value();
+}
diff --git a/libjava/classpath/java/lang/annotation/package.html b/libjava/classpath/java/lang/annotation/package.html
new file mode 100644
index 000000000..ee70daf9e
--- /dev/null
+++ b/libjava/classpath/java/lang/annotation/package.html
@@ -0,0 +1,46 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
+<!-- package.html - describes classes in java.lang.annotation package.
+   Copyright (C) 2005 Free Software Foundation, Inc.
+
+This file is part of GNU Classpath.
+
+GNU Classpath is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU Classpath 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 for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Classpath; see the file COPYING.  If not, write to the
+Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301 USA.
+
+Linking this library statically or dynamically with other modules is
+making a combined work based on this library.  Thus, the terms and
+conditions of the GNU General Public License cover the whole
+combination.
+
+As a special exception, the copyright holders of this library give you
+permission to link this library with independent modules to produce an
+executable, regardless of the license terms of these independent
+modules, and to copy and distribute the resulting executable under
+terms of your choice, provided that you also meet, for each linked
+independent module, the terms and conditions of the license of that
+module.  An independent module is a module which is not derived from
+or based on this library.  If you modify this library, you may extend
+this exception to your version of the library, but you are not
+obligated to do so.  If you do not wish to do so, delete this
+exception statement from your version. -->
+
+<html>
+<head><title>GNU Classpath - java.lang.annotation</title></head>
+
+<body>
+<p>Classes to handle annotations.</p>
+
+</body>
+</html>
-- 
cgit v1.2.3