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


Java GuardedInvocation.asTypeSafeReturn方法代码示例

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


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

示例1: asTypeSafeReturn

import jdk.internal.dynalink.linker.GuardedInvocation; //导入方法依赖的package包/类
/**
 * Takes a guarded invocation, and ensures its method and guard conform to the type of the call descriptor, using
 * all type conversions allowed by the linker's services. This method is used by Nashorn's linkers as a last step
 * before returning guarded invocations. Most of the code used to produce the guarded invocations does not make an
 * effort to coordinate types of the methods, and so a final type adjustment before a guarded invocation is returned
 * to the aggregating linker is the responsibility of the linkers themselves.
 * @param inv the guarded invocation that needs to be type-converted. Can be null.
 * @param linkerServices the linker services object providing the type conversions.
 * @param desc the call site descriptor to whose method type the invocation needs to conform.
 * @return the type-converted guarded invocation. If input is null, null is returned. If the input invocation
 * already conforms to the requested type, it is returned unchanged.
 */
static GuardedInvocation asTypeSafeReturn(final GuardedInvocation inv, final LinkerServices linkerServices, final CallSiteDescriptor desc) {
    return inv == null ? null : inv.asTypeSafeReturn(linkerServices, desc.getMethodType());
}
 
开发者ID:SunburstApps,项目名称:OpenJSharp,代码行数:16,代码来源:Bootstrap.java


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