private void generateReturn( MethodVisitor method )
    {
        if ( returnType.isPrimitive() )
        {
            switch ( returnType.getName() )
            {
            case "boolean":
            case "byte":
            case "short":
            case "char":
            case "int":
                method.visitInsn( Opcodes.IRETURN );
                break;
            case "long":
                method.visitInsn( Opcodes.LRETURN );
                break;
            case "float":
                method.visitInsn( Opcodes.FRETURN );
                break;
            case "double":
                method.visitInsn( Opcodes.DRETURN );
                break;
            default:
                throw new IllegalStateException( "Unsupported primitive type:" + returnType );
            }
        }
        else
        {
            method.visitInsn( Opcodes.ARETURN );
        }
    }