Java Code Examples for jdk.nashorn.internal.codegen.types.Type#NUMBER_ARRAY

The following examples show how to use jdk.nashorn.internal.codegen.types.Type#NUMBER_ARRAY . 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: LiteralNode.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 2
Source File: LiteralNode.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isLong()) {
        return Type.LONG_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 3
Source File: LiteralNode.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 4
Source File: LiteralNode.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 5
Source File: LiteralNode.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 6
Source File: LiteralNode.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 7
Source File: LiteralNode.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the array element type as Java format, e.g. [I
 * @return array element type
 */
public ArrayType getArrayType() {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isLong()) {
        return Type.LONG_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 8
Source File: LiteralNode.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Get the array element type as Java format, e.g. [I
 * @return array element type
 */
public ArrayType getArrayType() {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isLong()) {
        return Type.LONG_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 9
Source File: LiteralNode.java    From jdk8u_nashorn with GNU General Public License v2.0 5 votes vote down vote up
private static ArrayType getArrayType(final Type elementType) {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}
 
Example 10
Source File: LiteralNode.java    From nashorn with GNU General Public License v2.0 5 votes vote down vote up
@Override
public Type getType() {
    if (elementType.isInteger()) {
        return Type.INT_ARRAY;
    } else if (elementType.isLong()) {
        return Type.LONG_ARRAY;
    } else if (elementType.isNumeric()) {
        return Type.NUMBER_ARRAY;
    } else {
        return Type.OBJECT_ARRAY;
    }
}