[RFC/PATCH] Invokedynamic API stubs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

I'd like to check in these simple invokedynamic API stubs into CVS HEAD.
The APIs are not final but I think now is as good time as any to start
working on them especially as it needs work on the VM side. Furthermore,
there's already open source projects such as JRuby out there that use
invokedynamic so I think GNU Classpath probably needs to support it at
some point anyway.

			Pekka

>From 6dca9b60d6c2380164920e40302f08616a6874b6 Mon Sep 17 00:00:00 2001
From: Pekka Enberg <penberg@xxxxxxxxxx>
Date: Thu, 3 Feb 2011 16:47:15 +0200
Subject: [PATCH] Invokedynamic API stubs

This patch implements the work-in-progress invokedynamic API stubs described
here:

  http://download.oracle.com/javase/7/docs/api/java/dyn/package-summary.html

The classes don't do anything useful yet and don't even contain all the
specified methods.

Signed-off-by: Pekka Enberg <penberg@xxxxxxxxxx>
---
 java/lang/dyn/BootstrapMethod.java             |   52 +++++++++++++++++++++
 java/lang/dyn/CallSite.java                    |   57 +++++++++++++++++++++++
 java/lang/dyn/ClassValue.java                  |   45 ++++++++++++++++++
 java/lang/dyn/ConstantCallSite.java            |   46 ++++++++++++++++++
 java/lang/dyn/InvokeDynamic.java               |   49 ++++++++++++++++++++
 java/lang/dyn/InvokeDynamicBootstrapError.java |   47 +++++++++++++++++++
 java/lang/dyn/Linkage.java                     |   45 ++++++++++++++++++
 java/lang/dyn/LinkagePermission.java           |   55 ++++++++++++++++++++++
 java/lang/dyn/MethodHandle.java                |   59 ++++++++++++++++++++++++
 java/lang/dyn/MethodHandleProvider.java        |   52 +++++++++++++++++++++
 java/lang/dyn/MethodHandles.java               |   52 +++++++++++++++++++++
 java/lang/dyn/MethodType.java                  |   50 ++++++++++++++++++++
 java/lang/dyn/NoAccessException.java           |   47 +++++++++++++++++++
 java/lang/dyn/WrongMethodTypeException.java    |   47 +++++++++++++++++++
 14 files changed, 703 insertions(+), 0 deletions(-)
 create mode 100644 java/lang/dyn/BootstrapMethod.java
 create mode 100644 java/lang/dyn/CallSite.java
 create mode 100644 java/lang/dyn/ClassValue.java
 create mode 100644 java/lang/dyn/ConstantCallSite.java
 create mode 100644 java/lang/dyn/InvokeDynamic.java
 create mode 100644 java/lang/dyn/InvokeDynamicBootstrapError.java
 create mode 100644 java/lang/dyn/Linkage.java
 create mode 100644 java/lang/dyn/LinkagePermission.java
 create mode 100644 java/lang/dyn/MethodHandle.java
 create mode 100644 java/lang/dyn/MethodHandleProvider.java
 create mode 100644 java/lang/dyn/MethodHandles.java
 create mode 100644 java/lang/dyn/MethodType.java
 create mode 100644 java/lang/dyn/NoAccessException.java
 create mode 100644 java/lang/dyn/WrongMethodTypeException.java

diff --git a/java/lang/dyn/BootstrapMethod.java b/java/lang/dyn/BootstrapMethod.java
new file mode 100644
index 0000000..d2ec24a
--- /dev/null
+++ b/java/lang/dyn/BootstrapMethod.java
@@ -0,0 +1,52 @@
+/* BootstrapMethod.java --
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+import static java.lang.annotation.RetentionPolicy.SOURCE;
+import static java.lang.annotation.ElementType.*;
+
+/**
+ * @since 1.7
+ */
+@Target(value={/*TYPE_USE,*/TYPE,METHOD,CONSTRUCTOR})
+@Retention(value=SOURCE)
+public @interface BootstrapMethod
+{
+}
diff --git a/java/lang/dyn/CallSite.java b/java/lang/dyn/CallSite.java
new file mode 100644
index 0000000..5099d1e
--- /dev/null
+++ b/java/lang/dyn/CallSite.java
@@ -0,0 +1,57 @@
+/* CallSite.java -- Call site for invokedynamic.
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.reflect.Type;
+
+/**
+ * @since 1.7
+ */
+public class CallSite
+  implements MethodHandleProvider
+{
+  public MethodHandle asMethodHandle()
+  {
+    throw new UnsupportedOperationException();
+  }
+
+  public MethodHandle asMethodHandle(MethodType type) throws WrongMethodTypeException
+  {
+    throw new UnsupportedOperationException();
+  }
+}
diff --git a/java/lang/dyn/ClassValue.java b/java/lang/dyn/ClassValue.java
new file mode 100644
index 0000000..4c15b20
--- /dev/null
+++ b/java/lang/dyn/ClassValue.java
@@ -0,0 +1,45 @@
+/* ClassValue.java --
+   Copyright (C) 2011 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.dyn;
+
+/**
+ * @since 1.7
+ */
+public abstract class ClassValue<T>
+{
+}
diff --git a/java/lang/dyn/ConstantCallSite.java b/java/lang/dyn/ConstantCallSite.java
new file mode 100644
index 0000000..eaed7af
--- /dev/null
+++ b/java/lang/dyn/ConstantCallSite.java
@@ -0,0 +1,46 @@
+/* ConstantCallSite.java -- Constant call site for invokedynamic.
+   Copyright (C) 2011 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.dyn;
+
+/**
+ * @since 1.7
+ */
+public class ConstantCallSite
+  extends CallSite
+{
+}
diff --git a/java/lang/dyn/InvokeDynamic.java b/java/lang/dyn/InvokeDynamic.java
new file mode 100644
index 0000000..1352ec8
--- /dev/null
+++ b/java/lang/dyn/InvokeDynamic.java
@@ -0,0 +1,49 @@
+/* InvokeDynamic.java -- Syntantic marker class for invokedynamic instruction.
+   Copyright (C) 2011 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.dyn;
+
+/**
+ * An InvokeDynamic is used as syntantic marker for classes that have no
+ * methods nor instances which are accessed through the
+ * <code>invokedynamic</code> bytecode instruction.
+ *
+ * @since 1.7
+ */
+public final class InvokeDynamic
+{
+}
diff --git a/java/lang/dyn/InvokeDynamicBootstrapError.java b/java/lang/dyn/InvokeDynamicBootstrapError.java
new file mode 100644
index 0000000..2645f80
--- /dev/null
+++ b/java/lang/dyn/InvokeDynamicBootstrapError.java
@@ -0,0 +1,47 @@
+/* InvokeDynamicBootstrapError.java -- 
+   Copyright (C) 2011 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. */
+
+package java.dyn;
+
+/**
+ * @since 1.7
+ */
+public class InvokeDynamicBootstrapError
+  extends LinkageError
+{
+  private static final long serialVersionUID = -1;
+}
diff --git a/java/lang/dyn/Linkage.java b/java/lang/dyn/Linkage.java
new file mode 100644
index 0000000..3acebd0
--- /dev/null
+++ b/java/lang/dyn/Linkage.java
@@ -0,0 +1,45 @@
+/* Linkage.java --
+   Copyright (C) 2011 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.dyn;
+
+/**
+ * @since 1.7
+ */
+public class Linkage
+{
+}
diff --git a/java/lang/dyn/LinkagePermission.java b/java/lang/dyn/LinkagePermission.java
new file mode 100644
index 0000000..6788e30
--- /dev/null
+++ b/java/lang/dyn/LinkagePermission.java
@@ -0,0 +1,55 @@
+/* LinkagePermission.java --
+   Copyright (C) 2011 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.dyn;
+
+import java.io.Serializable;
+import java.security.Guard;
+
+/**
+ * @since 1.7
+ */
+public final class LinkagePermission
+  implements Serializable, Guard
+{
+  private static final long serialVersionUID = -1;
+
+  public void checkGuard(Object obj)
+  {
+    throw new UnsupportedOperationException();
+  }
+}
diff --git a/java/lang/dyn/MethodHandle.java b/java/lang/dyn/MethodHandle.java
new file mode 100644
index 0000000..9e57b8a
--- /dev/null
+++ b/java/lang/dyn/MethodHandle.java
@@ -0,0 +1,59 @@
+/* MethodHandle.java -- Method handle for invokedynamic.
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.reflect.Type;
+
+/** A MethodHandle is a handle to executable reference to a method,
+ * constructor, or field used by theinvokedynamic bytecode instruction.
+ *
+ * @since 1.7
+ */
+public abstract class MethodHandle
+  implements MethodHandleProvider
+{
+  public MethodHandle asMethodHandle()
+  {
+    throw new UnsupportedOperationException();
+  }
+
+  public MethodHandle asMethodHandle(MethodType type) throws WrongMethodTypeException
+  {
+    throw new UnsupportedOperationException();
+  }
+}
diff --git a/java/lang/dyn/MethodHandleProvider.java b/java/lang/dyn/MethodHandleProvider.java
new file mode 100644
index 0000000..afc5dee
--- /dev/null
+++ b/java/lang/dyn/MethodHandleProvider.java
@@ -0,0 +1,52 @@
+/* MethodHandleProvider.java -- Method handle provider for invokedynamic.
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.reflect.Type;
+
+/**
+ * A MethodHandleProvider represents an object that provides a target method
+ * handler for invokedynamic bytecode instruction.
+ *
+ * @since 1.7
+ */
+public interface MethodHandleProvider
+{
+  MethodHandle asMethodHandle();
+  MethodHandle asMethodHandle(MethodType type) throws WrongMethodTypeException;
+}
diff --git a/java/lang/dyn/MethodHandles.java b/java/lang/dyn/MethodHandles.java
new file mode 100644
index 0000000..2e5ed86
--- /dev/null
+++ b/java/lang/dyn/MethodHandles.java
@@ -0,0 +1,52 @@
+/* MethodHandles.java -- Method handle helper methods.
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.reflect.Type;
+
+/**
+ * MethodHandles contains static helper methods for method handles.
+ *
+ * @since 1.7
+ */
+public class MethodHandles
+{
+  public static final class Lookup
+  {
+  }
+}
diff --git a/java/lang/dyn/MethodType.java b/java/lang/dyn/MethodType.java
new file mode 100644
index 0000000..f8b924f
--- /dev/null
+++ b/java/lang/dyn/MethodType.java
@@ -0,0 +1,50 @@
+/* MethodType.java -- Method handle argument and return types. 
+   Copyright (C) 2011 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.dyn;
+
+import java.lang.reflect.Type;
+
+/**
+ * A MethodType represents argument and return types of method handles.
+ *
+ * @since 1.7
+ */
+public final class MethodType
+  implements Type
+{
+}
diff --git a/java/lang/dyn/NoAccessException.java b/java/lang/dyn/NoAccessException.java
new file mode 100644
index 0000000..1e1578e
--- /dev/null
+++ b/java/lang/dyn/NoAccessException.java
@@ -0,0 +1,47 @@
+/* NoAccessException.java -- 
+   Copyright (C) 2011 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. */
+
+package java.dyn;
+
+/**
+ * @since 1.7
+ */
+public class NoAccessException
+  extends Exception
+{
+  private static final long serialVersionUID = -1;
+}
diff --git a/java/lang/dyn/WrongMethodTypeException.java b/java/lang/dyn/WrongMethodTypeException.java
new file mode 100644
index 0000000..db114e0
--- /dev/null
+++ b/java/lang/dyn/WrongMethodTypeException.java
@@ -0,0 +1,47 @@
+/* WrongMethodTypeException.java -- 
+   Copyright (C) 2011 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. */
+
+package java.dyn;
+
+/**
+ * @since 1.7
+ */
+public class WrongMethodTypeException
+  extends RuntimeException
+{
+  private static final long serialVersionUID = -1;
+}
-- 
1.7.1






[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux