src/sample/nashorn/dynalink/DOMLinkerExporter.java
author rwestberg
Fri, 01 Jun 2018 10:15:48 +0200
changeset 50336 1b6ea6bcd21a
parent 47216 71c04702a3d5
permissions -rw-r--r--
8203237: JFR TestBiasedLockRevocationEvents should ignore events unrelated to the test Reviewed-by: egahlin, mgronlun
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     1
/*
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     2
 * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     3
 *
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     4
 * Redistribution and use in source and binary forms, with or without
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     5
 * modification, are permitted provided that the following conditions
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     6
 * are met:
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     7
 *
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     8
 *   - Redistributions of source code must retain the above copyright
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
     9
 *     notice, this list of conditions and the following disclaimer.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    10
 *
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    11
 *   - Redistributions in binary form must reproduce the above copyright
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    12
 *     notice, this list of conditions and the following disclaimer in the
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    13
 *     documentation and/or other materials provided with the distribution.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    14
 *
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    15
 *   - Neither the name of Oracle nor the names of its
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    16
 *     contributors may be used to endorse or promote products derived
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    17
 *     from this software without specific prior written permission.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    18
 *
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    19
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    20
 * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    21
 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    22
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    23
 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    24
 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    25
 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    26
 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    27
 * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    28
 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    29
 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    30
 */
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    31
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    32
import java.lang.invoke.MethodHandle;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    33
import java.lang.invoke.MethodHandles;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    34
import java.lang.invoke.MethodType;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    35
import java.util.ArrayList;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    36
import java.util.List;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    37
import jdk.dynalink.CallSiteDescriptor;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    38
import jdk.dynalink.NamedOperation;
41842
50202a344d28 8168005: Introduce namespaces for GET, SET Dynalink operations
attila
parents: 41422
diff changeset
    39
import jdk.dynalink.NamespaceOperation;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    40
import jdk.dynalink.Operation;
41842
50202a344d28 8168005: Introduce namespaces for GET, SET Dynalink operations
attila
parents: 41422
diff changeset
    41
import jdk.dynalink.StandardNamespace;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    42
import jdk.dynalink.StandardOperation;
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    43
import jdk.dynalink.linker.GuardedInvocation;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    44
import jdk.dynalink.linker.GuardingDynamicLinker;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    45
import jdk.dynalink.linker.GuardingDynamicLinkerExporter;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    46
import jdk.dynalink.linker.LinkRequest;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    47
import jdk.dynalink.linker.LinkerServices;
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    48
import jdk.dynalink.linker.TypeBasedGuardingDynamicLinker;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    49
import jdk.dynalink.linker.support.Guards;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    50
import jdk.dynalink.linker.support.Lookup;
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    51
import org.w3c.dom.Element;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    52
import org.w3c.dom.Node;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    53
import org.w3c.dom.NodeList;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    54
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    55
/**
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    56
 * This is a dynalink pluggable linker (see http://openjdk.java.net/jeps/276).
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    57
 * This linker handles XML DOM Element objects specially. This linker links
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    58
 * special properties starting with "_" and treats those as child element names
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    59
 * to access. This kind of child element access makes it easy to write XML DOM
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    60
 * accessing scripts. See for example ./dom_linker_gutenberg.js.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    61
 */
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    62
public final class DOMLinkerExporter extends GuardingDynamicLinkerExporter {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    63
    static {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    64
        System.out.println("pluggable dynalink DOM linker loaded");
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    65
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    66
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    67
    // return List of child Elements of the given Element matching the given name.
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    68
    private static List<Element> getChildElements(final Element elem, final String name) {
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    69
        final NodeList nodeList = elem.getChildNodes();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    70
        final List<Element> childElems = new ArrayList<>();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    71
        final int len = nodeList.getLength();
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    72
        for (int i = 0; i < len; i++) {
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    73
            final Node node = nodeList.item(i);
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    74
            if (node.getNodeType() == Node.ELEMENT_NODE &&
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    75
                ((Element)node).getTagName().equals(name)) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    76
                childElems.add((Element)node);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    77
            }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    78
        }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    79
        return childElems;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    80
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    81
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    82
    // method that returns either unique child element matching given name
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    83
    // or a list of child elements of that name (if there are more than one matches).
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    84
    public static Object getElementsByName(final Object elem, final String name) {
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    85
        final List<Element> elems = getChildElements((Element)elem, name);
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    86
        return elems.size() == 1? elems.get(0) : elems;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    87
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    88
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    89
    // method to extract text context under a given DOM Element
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    90
    public static Object getElementText(final Object elem) {
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    91
        final NodeList nodeList = ((Element)elem).getChildNodes();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    92
        final int len = nodeList.getLength();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    93
        final StringBuilder text = new StringBuilder();
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    94
        for (int i = 0; i < len; i++) {
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
    95
            final Node node = nodeList.item(i);
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    96
            if (node.getNodeType() == Node.TEXT_NODE) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    97
                text.append(node.getNodeValue());
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    98
            }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    99
        }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   100
        return text.toString();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   101
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   102
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   103
    private static final MethodHandle ELEMENTS_BY_NAME;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   104
    private static final MethodHandle ELEMENT_TEXT;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   105
    private static final MethodHandle IS_ELEMENT;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   106
    static {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   107
        ELEMENTS_BY_NAME = Lookup.PUBLIC.findStatic(DOMLinkerExporter.class,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   108
            "getElementsByName",
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   109
            MethodType.methodType(Object.class, Object.class, String.class));
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   110
        ELEMENT_TEXT = Lookup.PUBLIC.findStatic(DOMLinkerExporter.class,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   111
            "getElementText",
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   112
            MethodType.methodType(Object.class, Object.class));
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   113
        IS_ELEMENT = Guards.isInstance(Element.class, MethodType.methodType(Boolean.TYPE, Object.class));
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   114
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   115
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   116
    @Override
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   117
    public List<GuardingDynamicLinker> get() {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   118
        final ArrayList<GuardingDynamicLinker> linkers = new ArrayList<>();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   119
        linkers.add(new TypeBasedGuardingDynamicLinker() {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   120
            @Override
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   121
            public boolean canLinkType(final Class<?> type) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   122
                return Element.class.isAssignableFrom(type);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   123
            }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   124
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   125
            @Override
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   126
            public GuardedInvocation getGuardedInvocation(final LinkRequest request,
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   127
                final LinkerServices linkerServices) throws Exception {
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   128
                final Object self = request.getReceiver();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   129
                if (! (self instanceof Element)) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   130
                    return null;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   131
                }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   132
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   133
                final CallSiteDescriptor desc = request.getCallSiteDescriptor();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   134
                final Operation op = desc.getOperation();
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   135
                final Object name = NamedOperation.getName(op);
41842
50202a344d28 8168005: Introduce namespaces for GET, SET Dynalink operations
attila
parents: 41422
diff changeset
   136
                final boolean getProp = NamespaceOperation.contains(
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   137
                        NamedOperation.getBaseOperation(op),
41842
50202a344d28 8168005: Introduce namespaces for GET, SET Dynalink operations
attila
parents: 41422
diff changeset
   138
                        StandardOperation.GET, StandardNamespace.PROPERTY);
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   139
                if (getProp && name instanceof String) {
41422
97eda72f53b6 8167117: insert missing final keywords
attila
parents: 34549
diff changeset
   140
                    final String nameStr = (String)name;
34452
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   141
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   142
                    // Treat names starting with "_" as special names.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   143
                    // Everything else is linked other dynalink bean linker!
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   144
                    // This avoids collision with Java methods of org.w3c.dom.Element class
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   145
                    // Assumption is that Java APIs won't start with "_" character!!
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   146
                    if (nameStr.equals("_")) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   147
                        // short-hand to get text content under a given DOM Element
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   148
                        return new GuardedInvocation(ELEMENT_TEXT, IS_ELEMENT);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   149
                    } else if (nameStr.startsWith("_")) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   150
                        return new GuardedInvocation(
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   151
                            MethodHandles.insertArguments(ELEMENTS_BY_NAME, 1, nameStr.substring(1)),
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   152
                            IS_ELEMENT);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   153
                    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   154
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   155
                }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   156
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   157
                return null;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   158
            }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   159
        });
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   160
        return linkers;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   161
    }
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   162
}