当前位置: 首页>>代码示例>>Java>>正文


Java MethodHandleFactory.LookupException方法代码示例

本文整理汇总了Java中jdk.nashorn.internal.lookup.MethodHandleFactory.LookupException方法的典型用法代码示例。如果您正苦于以下问题:Java MethodHandleFactory.LookupException方法的具体用法?Java MethodHandleFactory.LookupException怎么用?Java MethodHandleFactory.LookupException使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在jdk.nashorn.internal.lookup.MethodHandleFactory的用法示例。


在下文中一共展示了MethodHandleFactory.LookupException方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: findOwnMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
    try {
        return MH.findStatic(MethodHandles.lookup(), LinkerCallSite.class, name, MH.type(rtype, types));
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), LinkerCallSite.class, name, MH.type(rtype, types));
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:8,代码来源:LinkerCallSite.java

示例2: findMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findMH(final String name, final Class<?> target, final Class<?> rtype, final Class<?>... types) {
    final MethodType mt  = MH.type(rtype, types);
    try {
        return MH.findStatic(MethodHandles.lookup(), target, name, mt);
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), target, name, mt);
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:9,代码来源:JSObjectLinker.java

示例3: findOwnMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
    final Class<?>   own = ScriptObject.class;
    final MethodType mt  = MH.type(rtype, types);
    try {
        return MH.findStatic(MethodHandles.lookup(), own, name, mt);
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), own, name, mt);
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:10,代码来源:ScriptObject.java

示例4: findOwnMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
    final Class<?>   own = ScriptFunction.class;
    final MethodType mt  = MH.type(rtype, types);
    try {
        return MH.findStatic(MethodHandles.lookup(), own, name, mt);
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), own, name, mt);
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:10,代码来源:ScriptFunction.java

示例5: findOwnMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
    try {
        return MH.findStatic(MethodHandles.lookup(), RuntimeCallSite.class, name, MH.type(rtype, types));
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), RuntimeCallSite.class, name, MH.type(rtype, types));
    }
}
 
开发者ID:RedlineResearch,项目名称:OLD-OpenJDK8,代码行数:8,代码来源:RuntimeCallSite.java

示例6: findOwnMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findOwnMH(final String name, final Class<?> rtype, final Class<?>... types) {
    final Class<?>   own = JSObjectLinker.class;
    final MethodType mt  = MH.type(rtype, types);
    try {
        return MH.findStatic(MethodHandles.lookup(), own, name, mt);
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), own, name, mt);
    }
}
 
开发者ID:wro4j,项目名称:nashorn-backport,代码行数:10,代码来源:JSObjectLinker.java

示例7: findJSObjectMH

import jdk.nashorn.internal.lookup.MethodHandleFactory; //导入方法依赖的package包/类
private static MethodHandle findJSObjectMH(final String name, final Class<?> rtype, final Class<?>... types) {
    final Class<?>   own = JSObject.class;
    final MethodType mt  = MH.type(rtype, types);
    try {
        return MH.findVirtual(MethodHandles.publicLookup(), own, name, mt);
    } catch (final MethodHandleFactory.LookupException e) {
        return MH.findVirtual(MethodHandles.lookup(), own, name, mt);
    }
}
 
开发者ID:wro4j,项目名称:nashorn-backport,代码行数:10,代码来源:JSObjectLinker.java


注:本文中的jdk.nashorn.internal.lookup.MethodHandleFactory.LookupException方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。