/* * Copyright (c) 2015, 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. */ /** *

* Dynalink is a library for dynamic linking of high-level operations on objects. * These operations include "read a property", * "write a property", "invoke a function" and so on. Dynalink is primarily * useful for implementing programming languages where at least some expressions * have dynamic types (that is, types that can not be decided statically), and * the operations on dynamic types are expressed as * {@link java.lang.invoke.CallSite call sites}. These call sites will be * linked to appropriate target {@link java.lang.invoke.MethodHandle method handles} * at run time based on actual types of the values the expressions evaluated to. * These can change between invocations, necessitating relinking the call site * multiple times to accommodate new types; Dynalink handles all that and more. *

* Dynalink supports implementation of programming languages with object models * that differ (even radically) from the JVM's class-based model and have their * custom type conversions. *

* Dynalink is closely related to, and relies on, the {@link java.lang.invoke} * package. *

* * While {@link java.lang.invoke} provides a low level API for dynamic linking * of {@code invokedynamic} call sites, it does not provide a way to express * higher level operations on objects, nor methods that implement them. These * operations are the usual ones in object-oriented environments: property * access, access of elements of collections, invocation of methods and * constructors (potentially with multiple dispatch, e.g. link- and run-time * equivalents of Java overloaded method resolution). These are all functions * that are normally desired in a language on the JVM. If a language is * statically typed and its type system matches that of the JVM, it can * accomplish this with use of the usual invocation, field access, etc. * instructions (e.g. {@code invokevirtual}, {@code getfield}). However, if the * language is dynamic (hence, types of some expressions are not known until * evaluated at run time), or its object model or type system don't match * closely that of the JVM, then it should use {@code invokedynamic} call sites * instead and let Dynalink manage them. */ module jdk.dynalink { requires java.logging; exports jdk.dynalink; exports jdk.dynalink.beans; exports jdk.dynalink.linker; exports jdk.dynalink.linker.support; exports jdk.dynalink.support; uses jdk.dynalink.linker.GuardingDynamicLinkerExporter; }