Package sun.invoke.util

Examples of sun.invoke.util.Wrapper.primitiveType()


        if (rtype != void.class && rtype.isPrimitive()) {
            Wrapper srcWrapper = Wrapper.forBasicType(rtype);
            Wrapper dstWrapper = srcWrapper.isSubwordOrInt() ? Wrapper.INT : srcWrapper;  // widen subword to int
            // boolean casts not allowed
            emitPrimCast(srcWrapper.basicTypeChar(), dstWrapper.basicTypeChar());
            emitBoxing(dstWrapper.primitiveType());
        }

        // If the return type is void we return a null reference.
        if (rtype == void.class) {
            mv.visitInsn(Opcodes.ACONST_NULL);
View Full Code Here


        boolean isGetter  = (formOp & 1) == (AF_GETFIELD & 1);
        boolean isStatic  = (formOp >= AF_GETSTATIC);
        boolean needsInit = (formOp >= AF_GETSTATIC_INIT);
        boolean needsCast = (ftypeKind == FT_CHECKED_REF);
        Wrapper fw = (needsCast ? Wrapper.OBJECT : Wrapper.values()[ftypeKind]);
        Class<?> ft = fw.primitiveType();
        assert(ftypeKind(needsCast ? String.class : ft) == ftypeKind);
        String tname  = fw.primitiveSimpleName();
        String ctname = Character.toUpperCase(tname.charAt(0)) + tname.substring(1);
        if (isVolatilectname += "Volatile";
        String getOrPut = (isGetter ? "get" : "put");
View Full Code Here

        Class<?> iret = internalType.returnType();
        Wrapper wrap = Wrapper.forBasicType(tret);
        if (!iret.isPrimitive()) {
            assert(iret == Object.class);
            return ValueConversions.identity();
        } else if (wrap.primitiveType() == iret) {
            return ValueConversions.box(wrap);
        } else {
            assert(tret == double.class ? iret == long.class : iret == int.class);
            return ValueConversions.boxRaw(wrap);
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.