Java Doc for JDWPTestCase.java in  » Apache-Harmony-Java-SE » org-package » org » apache » harmony » jpda » tests » jdwp » share » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Apache Harmony Java SE » org package » org.apache.harmony.jpda.tests.jdwp.share 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase
   org.apache.harmony.jpda.tests.jdwp.share.JDWPTestCase

All known Subclasses:   org.apache.harmony.jpda.tests.jdwp.DebuggerOnDemand.LaunchedDebugger,  org.apache.harmony.jpda.tests.jdwp.VirtualMachine.IDSizesTest,  org.apache.harmony.jpda.tests.jdwp.share.JDWPSyncTestCase,  org.apache.harmony.jpda.tests.jdwp.VirtualMachine.ExitTest,
JDWPTestCase
abstract public class JDWPTestCase extends JDWPRawTestCase (Code)
Basic class for unit tests which use only one debuggee VM.


Field Summary
protected  JDWPUnitDebuggeeWrapperdebuggeeWrapper
     DebuggeeWrapper instance for launched debuggee VM.
protected  EventPacketinitialEvent
     EventPacket instance with received VM_START event.


Method Summary
protected  voidassertAllDataRead(Packet reply)
     Helper for checking reply packet data has been read.
protected  voidassertEquals(String message, long expected, long actual, String strExpected, String strActual)
     Helper for comparison numbers and printing string equivalents.
protected  voidassertString(String message, String expected, String actual)
     Asserts that two strings are equal.
protected  voidbeforeDebuggeeStart(JDWPUnitDebuggeeWrapper debuggeeWrapper)
     This method is invoked right before starting debuggee VM.
protected  longcheckField(long refTypeID, String fieldName)
     Single field verification routine.
protected  long[]checkFields(long refTypeID, String checkedFieldNames)
     Multiple field verification routine.
protected  long[]checkFields(long refTypeID, String checkedFieldNames, String expectedSignatures, int expectedModifiers)
     Multiple field verification routine.
protected  voidcheckReplyPacket(ReplyPacket reply, String message, int errorCodeExpected)
     Helper for checking reply packet error code.
protected  voidcheckReplyPacket(ReplyPacket reply, String message)
     Helper for checking reply packet error code.
protected  voidcheckReplyPacket(ReplyPacket reply, String message, int[] expected)
     Helper for checking reply packet error code.
protected  booleancheckReplyPacket(ReplyPacket reply, String message, int[] expected, boolean failSign)
     Helper for checking reply packet error code.
protected  booleancheckReplyPacketWithoutFail(ReplyPacket reply, String message)
     Helper for checking reply packet error code.
protected  voidclearEvent(byte eventKind, int requestID, boolean verbose)
     Removes breakpoint of the given event kind corresponding to the given request id.
public  voidcloseConnection()
     Closes JDWP connection with debuggee (doesn't terminate debuggee and doesn't stop synchronize connection).
protected  JDWPUnitDebuggeeWrappercreateDebuggeeWrapper()
     Creates wrapper for debuggee process.
protected  longcreateString(String value)
     Performs string creation in debuggee.
protected  longgetClassIDBySignature(String signature)
    
protected  StringgetClassSignature(long classID)
    
protected  ReplyPacketgetLineTable(long classID, long methodID)
     Issues LineTable command.
protected  longgetMethodID(long classID, String methodName)
     Helper for getting method ID of corresponding class and method name.
protected  StringgetMethodName(long classID, long methodID)
     Helper for getting method name of corresponding class and method ID.
protected  longgetObjectReferenceType(long objectID)
     Helper that returns reference type ID for input object ID.
protected  StringgetObjectSignature(long objectID)
     Helper that returns reference type signature of input object ID.
protected  longgetReferenceTypeID(String signature)
     Returns reference type ID.
protected  StringgetStringValue(long stringID)
     Returns corresponding string from string ID.
protected  voidinternalSetUp()
     Overrides inherited method to launch one debuggee VM, establish JDWP connection, and wait for VM_START event.
protected  voidinternalTearDown()
     Overrides inherited method to stop started debuggee VM and close all connections.
public  voidopenConnection()
     Opens JDWP connection with debuggee (doesn't run debuggee and doesn't establish synchronize connection).
protected  voidprintErrorAndFail(String message)
     Prints error message in log writer and in junit fail.
protected  voidreceiveInitialEvent()
     Receives initial VM_INIT event if debuggee is suspended on event.
protected  voidresumeDebuggee()
     Helper function for resuming debuggee.
protected  booleansetStaticIntField(String classSignature, String fieldName, int newValue)
     Helper for setting static int field in class with new value.
protected  voidstartDebuggeeWrapper()
     Starts wrapper for debuggee process.

Field Detail
debuggeeWrapper
protected JDWPUnitDebuggeeWrapper debuggeeWrapper(Code)
DebuggeeWrapper instance for launched debuggee VM.



initialEvent
protected EventPacket initialEvent(Code)
EventPacket instance with received VM_START event.





Method Detail
assertAllDataRead
protected void assertAllDataRead(Packet reply)(Code)
Helper for checking reply packet data has been read.
Parameters:
  reply - -reply packet from debuggee



assertEquals
protected void assertEquals(String message, long expected, long actual, String strExpected, String strActual)(Code)
Helper for comparison numbers and printing string equivalents.
Parameters:
  message - -user message
Parameters:
  expected - -expected value
Parameters:
  actual - -actual value
Parameters:
  strExpected - -string equivalent of expected value
Parameters:
  strActual - -string equivalent of actual value



assertString
protected void assertString(String message, String expected, String actual)(Code)
Asserts that two strings are equal.
Parameters:
  message - -user message
Parameters:
  expected - -expected string
Parameters:
  actual - -actual string



beforeDebuggeeStart
protected void beforeDebuggeeStart(JDWPUnitDebuggeeWrapper debuggeeWrapper)(Code)
This method is invoked right before starting debuggee VM.



checkField
protected long checkField(long refTypeID, String fieldName)(Code)
Single field verification routine.
Parameters:
  refTypeID - -reference type ID
Parameters:
  fieldName - -name of single field filed ID



checkFields
protected long[] checkFields(long refTypeID, String checkedFieldNames)(Code)
Multiple field verification routine.
Parameters:
  refTypeID - -reference type ID
Parameters:
  checkedFieldNames - -list of field names to be checked list of field IDs



checkFields
protected long[] checkFields(long refTypeID, String checkedFieldNames, String expectedSignatures, int expectedModifiers)(Code)
Multiple field verification routine.
Parameters:
  refTypeID - -reference type ID
Parameters:
  checkedFieldNames - -list of field names to be checked
Parameters:
  expectedSignatures - -list of expected field signatures
Parameters:
  expectedModifiers - -list of expected field modifiers list of field IDs



checkReplyPacket
protected void checkReplyPacket(ReplyPacket reply, String message, int errorCodeExpected)(Code)
Helper for checking reply packet error code. Calls junit fail if packet error code does not equal to expected error code.
Parameters:
  reply - -returned from debuggee packet
Parameters:
  message - -additional message
Parameters:
  errorCodeExpected - -array of expected error codes



checkReplyPacket
protected void checkReplyPacket(ReplyPacket reply, String message)(Code)
Helper for checking reply packet error code. Calls junit fail if packet error code does not equal NONE.
Parameters:
  reply - -returned from debuggee packet
Parameters:
  message - -additional message



checkReplyPacket
protected void checkReplyPacket(ReplyPacket reply, String message, int[] expected)(Code)
Helper for checking reply packet error code. Calls junit fail if packet error code does not equal to expected error code.
Parameters:
  reply - -returned from debuggee packet
Parameters:
  message - -additional message
Parameters:
  expected - -array of expected error codes



checkReplyPacket
protected boolean checkReplyPacket(ReplyPacket reply, String message, int[] expected, boolean failSign)(Code)
Helper for checking reply packet error code. If reply packet does not have unexpected error - returns true. If reply packet has got unexpected error: If failSign param = true - calls junit fail. Otherwise prints message about error and returns false.
Parameters:
  reply - -returned from debuggee packet
Parameters:
  message - -additional message
Parameters:
  expected - -array of expected error codes
Parameters:
  failSign - -defines to call junit fail or not true if unexpected errors are not found, or false otherwise



checkReplyPacketWithoutFail
protected boolean checkReplyPacketWithoutFail(ReplyPacket reply, String message)(Code)
Helper for checking reply packet error code. If reply packet does not have error - returns true. Otherwise does not call junit fail - simply prints error message and returns false. if packet error code does not equal NONE.
Parameters:
  reply - -returned from debuggee packet
Parameters:
  message - -additional message true if error is not found, or false otherwise



clearEvent
protected void clearEvent(byte eventKind, int requestID, boolean verbose)(Code)
Removes breakpoint of the given event kind corresponding to the given request id.
Parameters:
  eventKind - request event kind
Parameters:
  requestID - request id
Parameters:
  verbose - print or don't extra log info



closeConnection
public void closeConnection()(Code)
Closes JDWP connection with debuggee (doesn't terminate debuggee and doesn't stop synchronize connection).



createDebuggeeWrapper
protected JDWPUnitDebuggeeWrapper createDebuggeeWrapper()(Code)
Creates wrapper for debuggee process.



createString
protected long createString(String value)(Code)
Performs string creation in debuggee.
Parameters:
  value - -content for new string StringID of new created string



getClassIDBySignature
protected long getClassIDBySignature(String signature)(Code)
Returns classID for the selected jni signature
Parameters:
  signature - classID for the selected jni signature



getClassSignature
protected String getClassSignature(long classID)(Code)
Returns jni signature for selected classID
Parameters:
  classID - jni signature for selected classID



getLineTable
protected ReplyPacket getLineTable(long classID, long methodID)(Code)
Issues LineTable command.
Parameters:
  classID - -class ID
Parameters:
  methodID - -method ID reply packet



getMethodID
protected long getMethodID(long classID, String methodName)(Code)
Helper for getting method ID of corresponding class and method name.
Parameters:
  classID - -class ID
Parameters:
  methodName - -method name method ID



getMethodName
protected String getMethodName(long classID, long methodID)(Code)
Helper for getting method name of corresponding class and method ID.
Parameters:
  classID - class id
Parameters:
  methodID - method id String



getObjectReferenceType
protected long getObjectReferenceType(long objectID)(Code)
Helper that returns reference type ID for input object ID.
Parameters:
  objectID - -debuggee object ID reference type ID



getObjectSignature
protected String getObjectSignature(long objectID)(Code)
Helper that returns reference type signature of input object ID.
Parameters:
  objectID - -debuggee object ID object signature of reference type



getReferenceTypeID
protected long getReferenceTypeID(String signature)(Code)
Returns reference type ID.
Parameters:
  signature - type ID for the selected jni signature



getStringValue
protected String getStringValue(long stringID)(Code)
Returns corresponding string from string ID.
Parameters:
  stringID - -string ID string value



internalSetUp
protected void internalSetUp() throws Exception(Code)
Overrides inherited method to launch one debuggee VM, establish JDWP connection, and wait for VM_START event.



internalTearDown
protected void internalTearDown()(Code)
Overrides inherited method to stop started debuggee VM and close all connections.



openConnection
public void openConnection()(Code)
Opens JDWP connection with debuggee (doesn't run debuggee and doesn't establish synchronize connection).



printErrorAndFail
protected void printErrorAndFail(String message)(Code)
Prints error message in log writer and in junit fail.
Parameters:
  message - -error message



receiveInitialEvent
protected void receiveInitialEvent()(Code)
Receives initial VM_INIT event if debuggee is suspended on event.



resumeDebuggee
protected void resumeDebuggee()(Code)
Helper function for resuming debuggee.



setStaticIntField
protected boolean setStaticIntField(String classSignature, String fieldName, int newValue)(Code)
Helper for setting static int field in class with new value.
Parameters:
  classSignature - -String defining signature of class
Parameters:
  fieldName - -String defining field name in specified class
Parameters:
  newValue - -int value to set for specified field true, if setting is successfully, or false otherwise



startDebuggeeWrapper
protected void startDebuggeeWrapper()(Code)
Starts wrapper for debuggee process.



Fields inherited from org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase
protected JPDALogWriter logWriter(Code)(Java Doc)
protected JPDATestOptions settings(Code)(Java Doc)

Methods inherited from org.apache.harmony.jpda.tests.jdwp.share.JDWPRawTestCase
protected JPDATestOptions createTestOptions()(Code)(Java Doc)
abstract protected String getDebuggeeClassName()(Code)(Java Doc)
protected void internalSetUp() throws Exception(Code)(Java Doc)
protected void internalTearDown()(Code)(Java Doc)
protected void setUp() throws Exception(Code)(Java Doc)
protected void tearDown() throws Exception(Code)(Java Doc)

w_ww.j___a___v_a_2_s.co_m | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.