nashorn/samples/dynalink/DOMLinkerExporter.java
author dholmes
Wed, 24 Aug 2016 19:54:03 -0400
changeset 40669 252f9d8272af
parent 34549 412a690d4414
child 41422 97eda72f53b6
permissions -rw-r--r--
8157904: Atomic::cmpxchg for jbyte is missing a fence on initial failure Reviewed-by: simonis, aph, kbarrett
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.CompositeOperation;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    39
import jdk.dynalink.NamedOperation;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    40
import jdk.dynalink.Operation;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    41
import jdk.dynalink.StandardOperation;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    42
import jdk.dynalink.linker.GuardingDynamicLinker;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    43
import jdk.dynalink.linker.GuardingDynamicLinkerExporter;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    44
import jdk.dynalink.linker.GuardedInvocation;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    45
import jdk.dynalink.linker.TypeBasedGuardingDynamicLinker;
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;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    48
import jdk.dynalink.linker.support.Guards;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    49
import jdk.dynalink.linker.support.Lookup;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    50
import org.w3c.dom.Attr;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    51
import org.w3c.dom.Node;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    52
import org.w3c.dom.NodeList;
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    53
import org.w3c.dom.Element;
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.
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    68
    private static List<Element> getChildElements(Element elem, String name) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    69
        NodeList nodeList = elem.getChildNodes();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    70
        List<Element> childElems = new ArrayList<>();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    71
        int len = nodeList.getLength();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    72
        for (int i = 0; i < len; i++) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    73
            Node node = nodeList.item(i);
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).
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    84
    public static Object getElementsByName(Object elem, final String name) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    85
        List<Element> elems = getChildElements((Element)elem, name);
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
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    90
    public static Object getElementText(Object elem) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    91
        NodeList nodeList = ((Element)elem).getChildNodes();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    92
        int len = nodeList.getLength();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    93
        StringBuilder text = new StringBuilder();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    94
        for (int i = 0; i < len; i++) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
    95
            Node node = nodeList.item(i);
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
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   126
            public GuardedInvocation getGuardedInvocation(LinkRequest request,
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   127
                LinkerServices linkerServices) throws Exception {
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
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   133
                CallSiteDescriptor desc = request.getCallSiteDescriptor();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   134
                Operation op = desc.getOperation();
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   135
                Object name = NamedOperation.getName(op);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   136
                boolean getProp = CompositeOperation.contains(
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   137
                        NamedOperation.getBaseOperation(op),
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   138
                        StandardOperation.GET_PROPERTY);
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   139
                if (getProp && name instanceof String) {
c34f322b89b9 8144230: Add a sample for pluggable dynalink linker
sundar
parents:
diff changeset
   140
                    String nameStr = (String)name;
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
}