sun.invoke.util.VerifyType Java Examples

The following examples show how to use sun.invoke.util.VerifyType. 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: MethodType.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #2
Source File: MethodType.java    From jdk1.8-source-analysis with Apache License 2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #3
Source File: MethodType.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #4
Source File: MethodType.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #5
Source File: InvokerBytecodeGenerator.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #6
Source File: MethodType.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #7
Source File: MethodType.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #8
Source File: InvokerBytecodeGenerator.java    From JDKSourceCode1.8 with MIT License 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #9
Source File: MethodType.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #10
Source File: MethodType.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/** True if the old return type can always be viewed (w/o casting) under new return type,
 *  and the new parameters can be viewed (w/o casting) under the old parameter types.
 */
/*non-public*/
boolean isViewableAs(MethodType newType, boolean keepInterfaces) {
    if (!VerifyType.isNullConversion(returnType(), newType.returnType(), keepInterfaces))
        return false;
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #11
Source File: InvokerBytecodeGenerator.java    From Bytecoder with Apache License 2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #12
Source File: MethodType.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/** True if the old return type can always be viewed (w/o casting) under new return type,
 *  and the new parameters can be viewed (w/o casting) under the old parameter types.
 */
/*non-public*/
boolean isViewableAs(MethodType newType, boolean keepInterfaces) {
    if (!VerifyType.isNullConversion(returnType(), newType.returnType(), keepInterfaces))
        return false;
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #13
Source File: InvokerBytecodeGenerator.java    From openjdk-jdk9 with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #14
Source File: InvokerBytecodeGenerator.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #15
Source File: MethodType.java    From Java8CN with Apache License 2.0 6 votes vote down vote up
/** True if the new parameters can be viewed (w/o casting) under the old parameter types. */
/*non-public*/
boolean parametersAreViewableAs(MethodType newType, boolean keepInterfaces) {
    if (form == newType.form && form.erasedType == this)
        return true;  // my reference parameters are all Object
    if (ptypes == newType.ptypes)
        return true;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i), keepInterfaces))
            return false;
    }
    return true;
}
 
Example #16
Source File: InvokerBytecodeGenerator.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #17
Source File: InvokerBytecodeGenerator.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #18
Source File: InvokerBytecodeGenerator.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Emit an implicit conversion for an argument which must be of the given pclass.
 * This is usually a no-op, except when pclass is a subword type or a reference other than Object or an interface.
 *
 * @param ptype type of value present on stack
 * @param pclass type of value required on stack
 * @param arg compile-time representation of value on stack (Node, constant) or null if none
 */
private void emitImplicitConversion(BasicType ptype, Class<?> pclass, Object arg) {
    assert(basicType(pclass) == ptype);  // boxing/unboxing handled by caller
    if (pclass == ptype.basicTypeClass() && ptype != L_TYPE)
        return;   // nothing to do
    switch (ptype) {
        case L_TYPE:
            if (VerifyType.isNullConversion(Object.class, pclass, false)) {
                if (PROFILE_LEVEL > 0)
                    emitReferenceCast(Object.class, arg);
                return;
            }
            emitReferenceCast(pclass, arg);
            return;
        case I_TYPE:
            if (!VerifyType.isNullConversion(int.class, pclass, false))
                emitPrimCast(ptype.basicTypeWrapper(), Wrapper.forPrimitiveType(pclass));
            return;
    }
    throw newInternalError("bad implicit conversion: tc="+ptype+": "+pclass);
}
 
Example #19
Source File: MethodHandleImpl.java    From jdk8u_jdk with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #20
Source File: MethodType.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
/** True if the old return type can always be viewed (w/o casting) under new return type,
 *  and the new parameters can be viewed (w/o casting) under the old parameter types.
 */
/*non-public*/
boolean isViewableAs(MethodType newType, boolean keepInterfaces) {
    if (!VerifyType.isNullConversion(returnType(), newType.returnType(), keepInterfaces))
        return false;
    return parametersAreViewableAs(newType, keepInterfaces);
}
 
Example #21
Source File: MethodHandleImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #22
Source File: MethodHandleImpl.java    From jdk8u-dev-jdk with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #23
Source File: MethodHandleImpl.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #24
Source File: MethodType.java    From jdk8u-jdk with GNU General Public License v2.0 5 votes vote down vote up
/** True if the old return type can always be viewed (w/o casting) under new return type,
 *  and the new parameters can be viewed (w/o casting) under the old parameter types.
 */
/*non-public*/
boolean isViewableAs(MethodType newType, boolean keepInterfaces) {
    if (!VerifyType.isNullConversion(returnType(), newType.returnType(), keepInterfaces))
        return false;
    return parametersAreViewableAs(newType, keepInterfaces);
}
 
Example #25
Source File: MethodHandleImpl.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #26
Source File: MethodType.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
boolean isViewableAs(MethodType newType) {
    if (!VerifyType.isNullConversion(returnType(), newType.returnType()))
        return false;
    int argc = parameterCount();
    if (argc != newType.parameterCount())
        return false;
    for (int i = 0; i < argc; i++) {
        if (!VerifyType.isNullConversion(newType.parameterType(i), parameterType(i)))
            return false;
    }
    return true;
}
 
Example #27
Source File: MethodHandleImpl.java    From dragonwell8_jdk with GNU General Public License v2.0 5 votes vote down vote up
static Object[] computeValueConversions(MethodType srcType, MethodType dstType,
                                        boolean strict, boolean monobox) {
    final int INARG_COUNT = srcType.parameterCount();
    Object[] convSpecs = new Object[INARG_COUNT+1];
    for (int i = 0; i <= INARG_COUNT; i++) {
        boolean isRet = (i == INARG_COUNT);
        Class<?> src = isRet ? dstType.returnType() : srcType.parameterType(i);
        Class<?> dst = isRet ? srcType.returnType() : dstType.parameterType(i);
        if (!VerifyType.isNullConversion(src, dst, /*keepInterfaces=*/ strict)) {
            convSpecs[i] = valueConversion(src, dst, strict, monobox);
        }
    }
    return convSpecs;
}
 
Example #28
Source File: DirectMethodHandle.java    From jdk1.8-source-analysis with Apache License 2.0 5 votes vote down vote up
private static int ftypeKind(Class<?> ftype) {
    if (ftype.isPrimitive())
        return Wrapper.forPrimitiveType(ftype).ordinal();
    else if (VerifyType.isNullReferenceConversion(Object.class, ftype))
        return FT_UNCHECKED_REF;
    else
        return FT_CHECKED_REF;
}
 
Example #29
Source File: DirectMethodHandle.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
static int ftypeKind(Class<?> ftype) {
    if (ftype.isPrimitive())
        return Wrapper.forPrimitiveType(ftype).ordinal();
    else if (VerifyType.isNullReferenceConversion(Object.class, ftype))
        return FT_UNCHECKED_REF;
    else
        return FT_CHECKED_REF;
}
 
Example #30
Source File: DirectMethodHandle.java    From Bytecoder with Apache License 2.0 5 votes vote down vote up
static int ftypeKind(Class<?> ftype) {
    if (ftype.isPrimitive())
        return Wrapper.forPrimitiveType(ftype).ordinal();
    else if (VerifyType.isNullReferenceConversion(Object.class, ftype))
        return FT_UNCHECKED_REF;
    else
        return FT_CHECKED_REF;
}