本文整理汇总了Java中jdk.nashorn.internal.objects.annotations.SpecializedFunction.LinkLogic方法的典型用法代码示例。如果您正苦于以下问题:Java SpecializedFunction.LinkLogic方法的具体用法?Java SpecializedFunction.LinkLogic怎么用?Java SpecializedFunction.LinkLogic使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类jdk.nashorn.internal.objects.annotations.SpecializedFunction
的用法示例。
在下文中一共展示了SpecializedFunction.LinkLogic方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getLinkLogic
import jdk.nashorn.internal.objects.annotations.SpecializedFunction; //导入方法依赖的package包/类
@Override
public SpecializedFunction.LinkLogic getLinkLogic(final Class<? extends LinkLogic> clazz) {
if (clazz == PushLinkLogic.class) {
return PushLinkLogic.INSTANCE;
} else if (clazz == PopLinkLogic.class) {
return PopLinkLogic.INSTANCE;
} else if (clazz == ConcatLinkLogic.class) {
return ConcatLinkLogic.INSTANCE;
}
return null;
}
示例2: getLinkLogic
import jdk.nashorn.internal.objects.annotations.SpecializedFunction; //导入方法依赖的package包/类
/**
* Return an instance of the linking logic we need for a particular LinkLogic
* subclass, gotten from the compile time annotation of a specialized builtin method
* No assumptions can be made about the lifetime of the instance. The receiver may
* keep it as a perpetual final instance field or create new linking logic depending
* on its current state for each call, depending on if the global state has changed
* or other factors
*
* @param clazz linking logic class
* @return linking logic instance for this class
*/
public SpecializedFunction.LinkLogic getLinkLogic(final Class<? extends LinkLogic> clazz);