Examples of TaggedObject


Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        packet.setNextValueAsThreadID(testedThreadID);
        logWriter.println("send \"CurrentContendedMonitor\" command");
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "ThreadReference::CurrentContendedMonitor command");
       
        TaggedObject tobj = reply.getNextValueAsTaggedObject();
       
        logWriter.println("\ttagged-object tag: "
                + JDWPConstants.Tag.getName(tobj.tag) + "(" + tobj.tag + ") "
                + "ID: " + tobj.objectID);
       
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        String ownerName;
        long ownerThread;

        for (int i =0; i < owned; i++) {
            TaggedObject tobj = reply.getNextValueAsTaggedObject();

            logWriter.println("\t" + i + " tagged-object tag: "
                    + JDWPConstants.Tag.getName(tobj.tag) + "(" + tobj.tag + ") "
                    + "ID: " + tobj.objectID);
           
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        assertEquals("Invalid event kind,",
                JDWPConstants.EventKind.EXCEPTION,
                parsedEvents[0].getEventKind(),
                JDWPConstants.EventKind.getName(JDWPConstants.EventKind.EXCEPTION),
                JDWPConstants.EventKind.getName(parsedEvents[0].getEventKind()));
        TaggedObject returnedException =((ParsedEvent.Event_EXCEPTION)parsedEvents[0]).getException();
       
        // assert that exception ObjectID is not null
        logWriter.println(">> testExceptionEvent: returnedException.objectID = " + returnedException.objectID);
        assertTrue("Returned exception object is null.", returnedException.objectID != 0);
       
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        packet.setNextValueAsInt(0);
        logWriter.println("\nSend ClassType.NewInstance");
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "ClassType::NewInstance command");

        TaggedObject newObject = reply.getNextValueAsTaggedObject();
        logWriter.println(" ClassType.NewInstance: newObject.tag="
                + newObject.tag + " newObject.objectID=" + newObject.objectID);

        TaggedObject exception = reply.getNextValueAsTaggedObject();
        logWriter.println(" ClassType.NewInstance: exception.tag="
                + exception.tag + " exception.objectID=" + exception.objectID);

        assertTrue("newObject must be != null", newObject != null);
        assertTrue("newObject.objectID must be != 0", newObject.objectID != 0);
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        //  Let's clear event request
        clearEvent(requestID);

        // Make NewInstance
        TaggedObject newObject = makeNewInstance(typeID, targetThreadID,
                targetConstructorID, 1 /* test number */);

        //  Make InvokeMethod without exception
        CommandPacket packet = new CommandPacket(
                JDWPCommands.ObjectReferenceCommandSet.CommandSetID,
                JDWPCommands.ObjectReferenceCommandSet.InvokeMethodCommand);
        packet.setNextValueAsObjectID(newObject.objectID);
        packet.setNextValueAsThreadID(targetThreadID);
        packet.setNextValueAsClassID(typeID);
        packet.setNextValueAsMethodID(targetMethodID);
        packet.setNextValueAsInt(1);
        packet.setNextValueAsValue(new Value(false));
        packet.setNextValueAsInt(0);
        logWriter.println("\nSend ObjectReference.InvokeMethod without exception...");
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "ObjectReference::InvokeMethod command");

        Value returnValue = reply.getNextValueAsValue();
        logWriter.println(" ObjectReference.InvokeMethod: returnValue.getIntValue()="
                        + returnValue.getIntValue());

        TaggedObject exception = reply.getNextValueAsTaggedObject();
        logWriter.println(" ObjectReference.InvokeMethod: exception.tag="
                + exception.tag + " exception.objectID=" + exception.objectID);

        assertTrue("returnValue must be != null", returnValue != null);
        assertEquals("Invalid returned value,", 345, returnValue.getIntValue());
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        //  Let's clear event request
        clearEvent(requestID);

        // Make NewInstance
        TaggedObject newObject = makeNewInstance(typeIDChild, targetThreadID,
                targetConstructorID, 2 /* test number */);

        //  Make InvokeMethod: nonvirtual child method without exception
        CommandPacket packet = new CommandPacket(
                JDWPCommands.ObjectReferenceCommandSet.CommandSetID,
                JDWPCommands.ObjectReferenceCommandSet.InvokeMethodCommand);
        packet.setNextValueAsObjectID(newObject.objectID);
        packet.setNextValueAsThreadID(targetThreadID);
        packet.setNextValueAsClassID(typeIDChild);
        packet.setNextValueAsMethodID(targetMethodIDChild);
        packet.setNextValueAsInt(1);
        packet.setNextValueAsValue(new Value(false));
        packet.setNextValueAsInt(JDWPConstants.InvokeOptions.INVOKE_NONVIRTUAL);
        logWriter.println
        ("\nSend ObjectReference.InvokeMethod:: nonvirtual child method without exception...");
        ReplyPacket reply = debuggeeWrapper.vmMirror.performCommand(packet);
        checkReplyPacket(reply, "ObjectReference::InvokeMethod command");

        Value returnValue = reply.getNextValueAsValue();
        logWriter.println(" ObjectReference.InvokeMethod: returnValue.getIntValue()="
                + returnValue.getIntValue());

        TaggedObject exception = reply.getNextValueAsTaggedObject();
        logWriter.println(" ObjectReference.InvokeMethod: exception.tag="
                + exception.tag + " exception.objectID=" + exception.objectID);

        assertTrue("returnValue must be != null", returnValue != null);
        assertEquals("Invalid value,", 456, returnValue.getIntValue());
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

                JDWPConstants.EventKind.FIELD_MODIFICATION,
                parsedEvents[0].getEventKind(),
                JDWPConstants.EventKind.getName(JDWPConstants.EventKind.FIELD_MODIFICATION),
                JDWPConstants.EventKind.getName(parsedEvents[0].getEventKind()));

        TaggedObject modifiedField =((ParsedEvent.Event_FIELD_MODIFICATION)parsedEvents[0]).getObject();

        // assert that exception class is the expected one
        long typeID = getObjectReferenceType(modifiedField.objectID);
        String returnedExceptionSignature = getClassSignature(typeID);
        assertString("Invalid class signature,",
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

        assertNotNull("Returned value is null", returnValue);
        assertEquals("Invalid returned value,", 234, returnValue.getIntValue());
        logWriter.println(" ClassType.InvokeMethod: returnValue.getIntValue()="
                + returnValue.getIntValue());

        TaggedObject exception = reply.getNextValueAsTaggedObject();
        assertNotNull("Returned exception is null", exception);
        assertTrue("Invalid exception object ID:<" + exception.objectID + ">", exception.objectID == 0);
        assertEquals("Invalid exception tag,", JDWPConstants.Tag.OBJECT_TAG, exception.tag
                , JDWPConstants.Tag.getName(JDWPConstants.Tag.OBJECT_TAG)
                , JDWPConstants.Tag.getName(exception.tag));
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

            if (returnValue != null) {
                logWriter.println(" ClassType.InvokeMethod: returnValue.getIntValue()="
                        + returnValue.getIntValue());
            }

            TaggedObject exception = reply.getNextValueAsTaggedObject();
            if (exception != null) {
                logWriter.println(" ClassType.InvokeMethod: exception.tag="
                        + exception.tag + " exception.objectID=" + exception.objectID);
                if ( exception.objectID != 0 ) {
                    String exceptionSignature = getObjectSignature(exception.objectID);
View Full Code Here

Examples of org.apache.harmony.jpda.tests.framework.jdwp.TaggedObject

            if (returnValue != null) {
                logWriter.println(" ClassType.InvokeMethod: returnValue.getIntValue()="
                        + returnValue.getIntValue());
            }

            TaggedObject exception = reply.getNextValueAsTaggedObject();
            if (exception != null) {
                logWriter.println(" ClassType.InvokeMethod: exception.tag="
                        + exception.tag + " exception.objectID=" + exception.objectID);
                if ( exception.objectID != 0 ) {
                    String exceptionSignature = getObjectSignature(exception.objectID);
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.