Java Code Examples for jdk.nashorn.internal.objects.annotations.SpecializedFunction#LinkLogic

The following examples show how to use jdk.nashorn.internal.objects.annotations.SpecializedFunction#LinkLogic . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: NativeArray.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 2
Source File: NativeArray.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 3
Source File: NativeArray.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 4
Source File: NativeArray.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 5
Source File: NativeArray.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 6
Source File: NativeArray.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 7
Source File: NativeArray.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
@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;
}
 
Example 8
Source File: OptimisticBuiltins.java    From TencentKona-8 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 9
Source File: OptimisticBuiltins.java    From jdk8u60 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 10
Source File: OptimisticBuiltins.java    From openjdk-jdk8u with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 11
Source File: OptimisticBuiltins.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 12
Source File: OptimisticBuiltins.java    From openjdk-jdk9 with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 13
Source File: OptimisticBuiltins.java    From hottub with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);
 
Example 14
Source File: OptimisticBuiltins.java    From jdk8u_nashorn with GNU General Public License v2.0 2 votes vote down vote up
/**
 * 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);