Java Doc for JDIThread.java in  » IDE-Eclipse » jdt » org » eclipse » jdt » internal » debug » core » model » 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 » IDE Eclipse » jdt » org.eclipse.jdt.internal.debug.core.model 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


org.eclipse.jdt.internal.debug.core.model.JDIDebugElement
   org.eclipse.jdt.internal.debug.core.model.JDIThread

JDIThread
public class JDIThread extends JDIDebugElement implements IJavaThread(Code)
Model thread implementation for an underlying thread on a VM.

Inner Class :abstract class StepHandler implements IJDIEventListener
Inner Class :class StepOverHandler extends StepHandler
Inner Class :class StepIntoHandler extends StepHandler
Inner Class :class StepReturnHandler extends StepHandler
Inner Class :class StepToFrameHandler extends StepReturnHandler
Inner Class :class DropToFrameHandler extends StepReturnHandler
Inner Class :static class ThreadJob extends Job
Inner Class :class SerialPerObjectRule implements ISchedulingRule

Field Summary
final public static  intSUSPEND_TIMEOUT
    

Constructor Summary
public  JDIThread(JDIDebugTarget target, ThreadReference thread)
     Creates a new thread on the underlying thread reference in the given debug target.

Method Summary
protected  voidabortStep()
     Aborts the current step, if any.
protected  voidaddCurrentBreakpoint(IBreakpoint bp)
    
public  booleancanResume()
    
protected  booleancanRunEvaluation()
     Returns whether this thread is in a valid state to run an evaluation.
protected  booleancanStep()
     Returns whether this thread is in a valid state to step.
public  booleancanStepInto()
    
public  booleancanStepOver()
    
public  booleancanStepReturn()
    
public  booleancanStepWithFilters()
    
public  booleancanSuspend()
    
public  booleancanTerminate()
    
public  booleancanTerminateEvaluation()
    
public  ListcomputeNewStackFrames()
    
See Also:   JDIThread.computeStackFrames
See Also:   This method differs from computeStackFrames() in that it
See Also:   always requests new stack frames from the VM.
protected synchronized  ListcomputeStackFrames(boolean refreshChildren)
    
public synchronized  ListcomputeStackFrames()
     Returns this thread's current stack frames as a list, computing them if required.
protected  voiddetermineIfDaemonThread()
     Determines whether this is a daemon thread.
protected  voiddetermineIfSystemThread()
     Determines and sets whether this thread represents a system thread.
exception:
  DebugException - if this method fails.
protected synchronized  voiddisposeStackFrames()
     Disposes stack frames, to be completely re-computed on the next suspend event.
protected  voiddropToFrame(IStackFrame frame)
     Drops to the given stack frame
exception:
  DebugException - if this method fails.
public  IJavaVariablefindVariable(String varName)
    
protected  voidforceReturn(IJavaValue value)
    
public  ObjectgetAdapter(Class adapter)
    
public synchronized  IBreakpoint[]getBreakpoints()
    
public  IJavaObjectgetContendedMonitor()
    
public  intgetFrameCount()
    
public  StringgetName()
    
protected  intgetOriginalStepKind()
    
protected  LocationgetOriginalStepLocation()
    
protected  intgetOriginalStepStackDepth()
    
public  IJavaObject[]getOwnedMonitors()
    
protected  StepHandlergetPendingStepHandler()
     Returns the step handler currently handling a step request, or null if none.
public  intgetPriority()
    
public synchronized  IStackFrame[]getStackFrames()
     NOTE: this method returns a copy of this thread's stack frames.
public  IJavaThreadGroupgetThreadGroup()
    
public  StringgetThreadGroupName()
    
public  ISchedulingRulegetThreadRule()
    
public synchronized  IStackFramegetTopStackFrame()
    
protected  intgetUnderlyingFrameCount()
     Returns the number of frames on the stack from the underlying thread. number of frames on the stack
exception:
  DebugException - if this method fails.
public  ThreadReferencegetUnderlyingThread()
     Returns this thread on the underlying VM which this model thread is a proxy to.
protected  ThreadGroupReferencegetUnderlyingThreadGroup()
     Returns this thread's underlying thread group. thread group
exception:
  DebugException - if this method fails.
public synchronized  booleanhandleSuspendForBreakpoint(JavaBreakpoint breakpoint, boolean queueEvent)
     A breakpoint has suspended execution of this thread.
public synchronized  booleanhandleSuspendForBreakpointQuiet(JavaBreakpoint breakpoint)
     Updates the state of this thread to suspend for the given breakpoint but does not fire notification of the suspend.
public  booleanhasOwnedMonitors()
    
public  booleanhasStackFrames()
    
protected  voidinitialize()
    
protected synchronized  voidinvokeComplete(int restoreTimeout)
     Called when a method invocation has returned, successfully or not.
protected  voidinvokeFailed(Throwable e, int restoreTimeout)
     Called when an invocation fails.
protected  voidinvokeFailed(String message, int code, Throwable e, int restoreTimeout)
     Called when an invocation fails.
protected  ValueinvokeMethod(ClassType receiverClass, ObjectReference receiverObject, Method method, List args, boolean invokeNonvirtual)
     Invokes a method on the target, in this thread, and returns the result.
public  booleanisDaemon()
    
public  booleanisIgnoringBreakpoints()
     Returns whether this thread is currently ignoring breakpoints.
public  booleanisInvokingMethod()
    
public synchronized  booleanisOutOfSynch()
    
public  booleanisPerformingEvaluation()
    
public  booleanisStepping()
    
public  booleanisSuspended()
    
public  booleanisSuspendedQuiet()
    
public  booleanisSystemThread()
    
public  booleanisTerminated()
    
public  booleanisUnderlyingThreadSuspended()
    
public  booleanmayBeOutOfSynch()
    
protected  ObjectReferencenewInstance(ClassType receiverClass, Method constructor, List args)
     Invokes a constructor in this thread, creating a new instance of the given class, and returns the result as an object reference. This thread is left suspended after the invocation is complete.

Method invocations cannot be nested.

protected  voidpopFrame(IStackFrame frame)
    
protected synchronized  voidpreserveStackFrames()
     Preserves stack frames to be used on the next suspend event. Iterates through all current stack frames, setting their state as invalid.
public  voidqueueRunnable(Runnable evaluation)
    
protected  voidremoveCurrentBreakpoint(IBreakpoint bp)
    
public synchronized  voidresume()
    
public synchronized  voidresumeQuiet()
    
protected synchronized  voidresumedByVM()
     Notifies this thread that is about to be resumed due to a VM resume.
public  voidrunEvaluation(IEvaluationRunnable evaluation, IProgressMonitor monitor, int evaluationDetail, boolean hitBreakpoints)
    
public  voidsetEvaluatingConditionalBreakpoint(boolean evaluating)
     Sets whether or not this thread is currently evaluating a conditional breakpoint expression.
protected  voidsetInvokingMethod(boolean invoking)
    
protected  voidsetOriginalStepKind(int stepKind)
    
protected  voidsetOriginalStepLocation(Location location)
    
protected  voidsetOriginalStepStackDepth(int depth)
    
protected  voidsetPendingStepHandler(StepHandler handler)
     Sets the step handler currently handling a step request.
protected  voidsetRunning(boolean running)
     Sets whether this thread is currently executing.
protected  voidsetSuspendedQuiet(boolean suspendedQuiet)
    
protected  voidsetTerminated(boolean terminated)
    
protected  voidsetUnderlyingThread(ThreadReference thread)
     Sets the underlying thread that this model object is a proxy to.
protected  booleanshouldDoExtraStepInto(Location location)
     In cases where a user-requested step into encounters nothing but filtered code (static initializers, synthetic methods, etc.), the default JDI behavior is to put the instruction pointer back where it was before the step into.
protected  booleanshouldDoStepReturn()
     Determines if a user did a step into and stepped through filtered code.
public synchronized  voidstepInto()
     This method is synchronized, such that the step request begins before a background evaluation can be performed.
public synchronized  voidstepOver()
     This method is synchronized, such that the step request begins before a background evaluation can be performed.
public synchronized  voidstepReturn()
     This method is synchronized, such that the step request begins before a background evaluation can be performed.
protected synchronized  voidstepToFrame(IStackFrame frame)
     Steps until the specified stack frame is the top frame.
public  voidstepWithFilters()
    
public  voidstop(IJavaObject exception)
    
public synchronized  voidsuspend()
    
protected synchronized  voidsuspendUnderlyingThread()
     Suspends the underlying thread asynchronously and fires notification when the underlying thread is suspended.
protected synchronized  voidsuspendedByVM()
     Notifies this thread that it has been suspended due to a VM suspend.
public  voidterminate()
    
public  voidterminateEvaluation()
    
protected  voidterminated()
     Notification this thread has terminated - update state and fire a terminate event.
public  voidwonSuspendVote(JavaBreakpoint breakpoint)
    

Field Detail
SUSPEND_TIMEOUT
final public static int SUSPEND_TIMEOUT(Code)
Status code indicating that a request to suspend this thread has timed out




Constructor Detail
JDIThread
public JDIThread(JDIDebugTarget target, ThreadReference thread) throws ObjectCollectedException(Code)
Creates a new thread on the underlying thread reference in the given debug target.
Parameters:
  target - the debug target in which this thread is contained
Parameters:
  thread - the underlying thread on the VM
exception:
  ObjectCollectedException - if the underlying thread has beengarbage collected and cannot be properly initialized




Method Detail
abortStep
protected void abortStep()(Code)
Aborts the current step, if any.



addCurrentBreakpoint
protected void addCurrentBreakpoint(IBreakpoint bp)(Code)
Adds the given breakpoint to the list of breakpoints this thread is suspended at



canResume
public boolean canResume()(Code)

See Also:   ISuspendResume.canResume



canRunEvaluation
protected boolean canRunEvaluation()(Code)
Returns whether this thread is in a valid state to run an evaluation. whether this thread is in a valid state torun an evaluation



canStep
protected boolean canStep()(Code)
Returns whether this thread is in a valid state to step. whether this thread is in a valid state tostep



canStepInto
public boolean canStepInto()(Code)

See Also:   IStep.canStepInto



canStepOver
public boolean canStepOver()(Code)

See Also:   IStep.canStepOver



canStepReturn
public boolean canStepReturn()(Code)

See Also:   IStep.canStepReturn



canStepWithFilters
public boolean canStepWithFilters()(Code)

See Also:   org.eclipse.debug.core.model.IFilteredStep.canStepWithFilters



canSuspend
public boolean canSuspend()(Code)

See Also:   ISuspendResume.canSuspend



canTerminate
public boolean canTerminate()(Code)

See Also:   ITerminate.canTerminate



canTerminateEvaluation
public boolean canTerminateEvaluation()(Code)

See Also:   IJavaThread.canTerminateEvaluation



computeNewStackFrames
public List computeNewStackFrames() throws DebugException(Code)

See Also:   JDIThread.computeStackFrames
See Also:   This method differs from computeStackFrames() in that it
See Also:   always requests new stack frames from the VM. As this is
See Also:   an expensive operation, this method should only be used
See Also:   by clients who know for certain that the stack frames
See Also:   on the VM have changed.



computeStackFrames
protected synchronized List computeStackFrames(boolean refreshChildren) throws DebugException(Code)

See Also:    computeStackFrames()
Parameters:
  refreshChildren - whether or not this method should request new stackframes from the VM



computeStackFrames
public synchronized List computeStackFrames() throws DebugException(Code)
Returns this thread's current stack frames as a list, computing them if required. Returns an empty collection if this thread is not currently suspended, or this thread is terminated. This method should be used internally to get the current stack frames, instead of calling #getStackFrames(), which makes a copy of the current list.

Before a thread is resumed a call must be made to one of:

  • preserveStackFrames()
  • disposeStackFrames()
If stack frames are disposed before a thread is resumed, stack frames are completely re-computed on the next call to this method. If stack frames are to be preserved, this method will attempt to re-use any stack frame objects which represent the same stack frame as on the previous suspend. Stack frames are cached until a subsequent call to preserve or dispose stack frames.

list of IJavaStackFrame
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



determineIfDaemonThread
protected void determineIfDaemonThread() throws DebugException(Code)
Determines whether this is a daemon thread.
throws:
  DebugException - on failure



determineIfSystemThread
protected void determineIfSystemThread() throws DebugException(Code)
Determines and sets whether this thread represents a system thread.
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



disposeStackFrames
protected synchronized void disposeStackFrames()(Code)
Disposes stack frames, to be completely re-computed on the next suspend event. This method should be called before this thread is resumed when stack frames are not to be re-used on the next suspend.
See Also:    computeStackFrames()



dropToFrame
protected void dropToFrame(IStackFrame frame) throws DebugException(Code)
Drops to the given stack frame
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



findVariable
public IJavaVariable findVariable(String varName) throws DebugException(Code)

See Also:   IJavaThread.findVariable(String)



forceReturn
protected void forceReturn(IJavaValue value) throws DebugException(Code)



getAdapter
public Object getAdapter(Class adapter)(Code)

See Also:   IAdaptable.getAdapter(Class)



getBreakpoints
public synchronized IBreakpoint[] getBreakpoints()(Code)

See Also:   org.eclipse.debug.core.model.IThread.getBreakpoints



getContendedMonitor
public IJavaObject getContendedMonitor() throws DebugException(Code)

See Also:   org.eclipse.jdt.debug.core.IJavaThread.getContendedMonitor



getFrameCount
public int getFrameCount() throws DebugException(Code)



getName
public String getName() throws DebugException(Code)

See Also:   IThread.getName



getOriginalStepKind
protected int getOriginalStepKind()(Code)



getOriginalStepLocation
protected Location getOriginalStepLocation()(Code)



getOriginalStepStackDepth
protected int getOriginalStepStackDepth()(Code)



getOwnedMonitors
public IJavaObject[] getOwnedMonitors() throws DebugException(Code)

See Also:   org.eclipse.jdt.debug.core.IJavaThread.getOwnedMonitors



getPendingStepHandler
protected StepHandler getPendingStepHandler()(Code)
Returns the step handler currently handling a step request, or null if none. step handler, or null if none



getPriority
public int getPriority() throws DebugException(Code)

See Also:   IThread.getPriority



getStackFrames
public synchronized IStackFrame[] getStackFrames() throws DebugException(Code)
NOTE: this method returns a copy of this thread's stack frames.
See Also:   IThread.getStackFrames



getThreadGroup
public IJavaThreadGroup getThreadGroup() throws DebugException(Code)



getThreadGroupName
public String getThreadGroupName() throws DebugException(Code)

See Also:   IJavaThread.getThreadGroupName



getThreadRule
public ISchedulingRule getThreadRule()(Code)
returns the scheduling rule for getting content while evaluations are running the ISchedulingRule for this thread
since:
   3.3.0



getTopStackFrame
public synchronized IStackFrame getTopStackFrame() throws DebugException(Code)

See Also:   IThread.getTopStackFrame



getUnderlyingFrameCount
protected int getUnderlyingFrameCount() throws DebugException(Code)
Returns the number of frames on the stack from the underlying thread. number of frames on the stack
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.
  • This thread is not suspended



getUnderlyingThread
public ThreadReference getUnderlyingThread()(Code)
Returns this thread on the underlying VM which this model thread is a proxy to. underlying thread



getUnderlyingThreadGroup
protected ThreadGroupReference getUnderlyingThreadGroup() throws DebugException(Code)
Returns this thread's underlying thread group. thread group
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.
  • Retrieving the underlying thread group is not supportedon the underlying VM



handleSuspendForBreakpoint
public synchronized boolean handleSuspendForBreakpoint(JavaBreakpoint breakpoint, boolean queueEvent)(Code)
A breakpoint has suspended execution of this thread. Aborts any step currently in process and fires a suspend event.
Parameters:
  breakpoint - the breakpoint that caused the suspend whether this thread suspended



handleSuspendForBreakpointQuiet
public synchronized boolean handleSuspendForBreakpointQuiet(JavaBreakpoint breakpoint)(Code)
Updates the state of this thread to suspend for the given breakpoint but does not fire notification of the suspend. Do no abort the current step as the program may be resumed quietly and the step may still finish.



hasOwnedMonitors
public boolean hasOwnedMonitors() throws DebugException(Code)

See Also:   org.eclipse.jdt.debug.core.IJavaThread.hasOwnedMonitors



hasStackFrames
public boolean hasStackFrames() throws DebugException(Code)

See Also:   IThread.hasStackFrames



initialize
protected void initialize() throws ObjectCollectedException(Code)
Thread initialization:
  • Determines if this thread is a system thread
  • Sets terminated state to false
  • Determines suspended state from underlying thread
  • Sets this threads stack frames to an empty collection

exception:
  ObjectCollectedException - if the thread has been garbagecollected and cannot be initialized



invokeComplete
protected synchronized void invokeComplete(int restoreTimeout)(Code)
Called when a method invocation has returned, successfully or not. This method performs cleanup:
  • Resets the state of this thread to suspended
  • Restores the communication timeout value
  • Computes the new set of stack frames for this thread

Parameters:
  restoreTimeout - the communication timeout value,in milliseconds, that should be reset
See Also:   JDIThread.invokeMethod(ClassType,ObjectReference,Method,List)
See Also:   JDIThread.newInstance(ClassType,Method,List)



invokeFailed
protected void invokeFailed(Throwable e, int restoreTimeout) throws DebugException(Code)
Called when an invocation fails. Performs cleanup and throws an exception.
Parameters:
  e - the exception that caused the failure
Parameters:
  restoreTimeout - the communication timeout value,in milliseconds, that should be reset
See Also:   JDIThread.invokeComplete(int)
exception:
  DebugException.Reasons - include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



invokeFailed
protected void invokeFailed(String message, int code, Throwable e, int restoreTimeout) throws DebugException(Code)
Called when an invocation fails. Performs cleanup and throws an exception.
Parameters:
  message - error message
Parameters:
  code - status code
Parameters:
  e - the exception that caused the failure
Parameters:
  restoreTimeout - the communication timeout value,in milliseconds, that should be reset
See Also:   JDIThread.invokeComplete(int)
exception:
  DebugException.Reasons - include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



invokeMethod
protected Value invokeMethod(ClassType receiverClass, ObjectReference receiverObject, Method method, List args, boolean invokeNonvirtual) throws DebugException(Code)
Invokes a method on the target, in this thread, and returns the result. Only one receiver may be specified - either a class or an object, the other must be null. This thread is left suspended after the invocation is complete, unless a call is made to abortEvaluation while performing a method invocation. In that case, this thread is automatically resumed when/if this invocation (eventually) completes.

Method invocations cannot be nested. That is, this method must return before another call to this method can be made. This method does not return until the invocation is complete. Breakpoints can suspend a method invocation, and it is possible that an invocation will not complete due to an infinite loop or deadlock.

Stack frames are preserved during method invocations, unless a timeout occurs. Although this thread's state is updated to running while performing an evaluation, no debug events are fired unless this invocation is interrupted by a breakpoint, or the invocation times out.

When performing an invocation, the communication timeout with the target VM is set to infinite, as the invocation may not complete in a timely fashion, if at all. The timeout value is reset to its original value when the invocation completes.


Parameters:
  receiverClass - the class in the target representing the receiverof a static message send, or null
Parameters:
  receiverObject - the object in the target to be the receiver ofthe message send, or null
Parameters:
  method - the underlying method to be invoked
Parameters:
  args - the arguments to invoke the method with (an empty listif none) the result of the method, as an underlying value
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.
  • This thread is not suspended(status code IJavaThread.ERR_THREAD_NOT_SUSPENDED)
  • This thread is already invoking a method(status code IJavaThread.ERR_NESTED_METHOD_INVOCATION)
  • This thread is not suspended by a JDI request(status code IJavaThread.ERR_INCOMPATIBLE_THREAD_STATE)



isDaemon
public boolean isDaemon() throws DebugException(Code)



isIgnoringBreakpoints
public boolean isIgnoringBreakpoints()(Code)
Returns whether this thread is currently ignoring breakpoints.



isInvokingMethod
public boolean isInvokingMethod()(Code)
Returns whether this thread is currently performing a method invokation



isOutOfSynch
public synchronized boolean isOutOfSynch() throws DebugException(Code)



isPerformingEvaluation
public boolean isPerformingEvaluation()(Code)

See Also:   IJavaThread.isPerformingEvaluation



isStepping
public boolean isStepping()(Code)

See Also:   IStep.isStepping



isSuspended
public boolean isSuspended()(Code)

See Also:   ISuspendResume.isSuspended



isSuspendedQuiet
public boolean isSuspendedQuiet()(Code)

See Also:   ISuspendResume.isSuspended



isSystemThread
public boolean isSystemThread()(Code)

See Also:   IJavaThread.isSystemThread



isTerminated
public boolean isTerminated()(Code)

See Also:   ITerminate.isTerminated



isUnderlyingThreadSuspended
public boolean isUnderlyingThreadSuspended()(Code)



mayBeOutOfSynch
public boolean mayBeOutOfSynch()(Code)



newInstance
protected ObjectReference newInstance(ClassType receiverClass, Method constructor, List args) throws DebugException(Code)
Invokes a constructor in this thread, creating a new instance of the given class, and returns the result as an object reference. This thread is left suspended after the invocation is complete.

Method invocations cannot be nested. That is, this method must return before another call to this method can be made. This method does not return until the invocation is complete. Breakpoints can suspend a method invocation, and it is possible that an invocation will not complete due to an infinite loop or deadlock.

Stack frames are preserved during method invocations, unless a timeout occurs. Although this thread's state is updated to running while performing an evaluation, no debug events are fired unless this invocation is interrupted by a breakpoint, or the invocation times out.

When performing an invocation, the communication timeout with the target VM is set to infinite, as the invocation may not complete in a timely fashion, if at all. The timeout value is reset to its original value when the invocation completes.


Parameters:
  receiverClass - the class in the target representing the receiverof the 'new' message send
Parameters:
  constructor - the underlying constructor to be invoked
Parameters:
  args - the arguments to invoke the constructor with (an empty listif none) a new object reference
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



popFrame
protected void popFrame(IStackFrame frame) throws DebugException(Code)



preserveStackFrames
protected synchronized void preserveStackFrames()(Code)
Preserves stack frames to be used on the next suspend event. Iterates through all current stack frames, setting their state as invalid. This method should be called before this thread is resumed, when stack frames are to be re-used when it later suspends.
See Also:    computeStackFrames()



queueRunnable
public void queueRunnable(Runnable evaluation)(Code)

See Also:   org.eclipse.jdt.debug.core.IJavaThread.queueRunnable(Runnable)



removeCurrentBreakpoint
protected void removeCurrentBreakpoint(IBreakpoint bp)(Code)
Removes the given breakpoint from the list of breakpoints this thread is suspended at (called when a breakpoint is deleted, in case we are suspended at that breakpoint)



resume
public synchronized void resume() throws DebugException(Code)

See Also:   ISuspendResume.resume



resumeQuiet
public synchronized void resumeQuiet() throws DebugException(Code)

See Also:   ISuspendResume.resume
See Also:   Updates the state of this thread to resumed,
See Also:   but does not fire notification of the resumption.



resumedByVM
protected synchronized void resumedByVM() throws DebugException(Code)
Notifies this thread that is about to be resumed due to a VM resume.



runEvaluation
public void runEvaluation(IEvaluationRunnable evaluation, IProgressMonitor monitor, int evaluationDetail, boolean hitBreakpoints) throws DebugException(Code)

See Also:   IJavaThread.runEvaluation(IEvaluationRunnableIProgressMonitorintboolean)



setEvaluatingConditionalBreakpoint
public void setEvaluatingConditionalBreakpoint(boolean evaluating)(Code)
Sets whether or not this thread is currently evaluating a conditional breakpoint expression. This state is maintained as a workaround to problems that can occur related to the interaction of stepping and expression evaluation. See bug 81658 for more details.
Parameters:
  evaluating -



setInvokingMethod
protected void setInvokingMethod(boolean invoking)(Code)
Sets whether this thread is currently invoking a method
Parameters:
  evaluating - whether this thread is currentlyinvoking a method



setOriginalStepKind
protected void setOriginalStepKind(int stepKind)(Code)



setOriginalStepLocation
protected void setOriginalStepLocation(Location location)(Code)



setOriginalStepStackDepth
protected void setOriginalStepStackDepth(int depth)(Code)



setPendingStepHandler
protected void setPendingStepHandler(StepHandler handler)(Code)
Sets the step handler currently handling a step request.
Parameters:
  handler - the current step handler, or nullif none



setRunning
protected void setRunning(boolean running)(Code)
Sets whether this thread is currently executing. When set to true, this thread's current breakpoints are cleared.
Parameters:
  running - whether this thread is executing



setSuspendedQuiet
protected void setSuspendedQuiet(boolean suspendedQuiet)(Code)



setTerminated
protected void setTerminated(boolean terminated)(Code)
Sets whether this thread is terminated
Parameters:
  terminated - whether this thread is terminated



setUnderlyingThread
protected void setUnderlyingThread(ThreadReference thread)(Code)
Sets the underlying thread that this model object is a proxy to.
Parameters:
  thread - underlying thread on target VM



shouldDoExtraStepInto
protected boolean shouldDoExtraStepInto(Location location) throws DebugException(Code)
In cases where a user-requested step into encounters nothing but filtered code (static initializers, synthetic methods, etc.), the default JDI behavior is to put the instruction pointer back where it was before the step into. This requires a second step to move forward. Since this is confusing to the user, we do an extra step into in such situations. This method determines when such an extra step into is necessary. It compares the current Location to the original Location when the user step into was initiated. It also makes sure the stack depth now is the same as when the step was initiated.



shouldDoStepReturn
protected boolean shouldDoStepReturn() throws DebugException(Code)
Determines if a user did a step into and stepped through filtered code. In this case, do a step return if the user has requested not to step thru to an un-filtered location.



stepInto
public synchronized void stepInto() throws DebugException(Code)
This method is synchronized, such that the step request begins before a background evaluation can be performed.
See Also:   IStep.stepInto



stepOver
public synchronized void stepOver() throws DebugException(Code)
This method is synchronized, such that the step request begins before a background evaluation can be performed.
See Also:   IStep.stepOver



stepReturn
public synchronized void stepReturn() throws DebugException(Code)
This method is synchronized, such that the step request begins before a background evaluation can be performed.
See Also:   IStep.stepReturn



stepToFrame
protected synchronized void stepToFrame(IStackFrame frame) throws DebugException(Code)
Steps until the specified stack frame is the top frame. Provides ability to step over/return in the non-top stack frame. This method is synchronized, such that the step request begins before a background evaluation can be performed.
exception:
  DebugException - if this method fails. Reasons include:
  • Failure communicating with the VM. The DebugException'sstatus code contains the underlying exception responsible forthe failure.



stepWithFilters
public void stepWithFilters() throws DebugException(Code)

See Also:   org.eclipse.debug.core.model.IFilteredStep.stepWithFilters



stop
public void stop(IJavaObject exception) throws DebugException(Code)

See Also:   org.eclipse.jdt.debug.core.IJavaThread.stop(org.eclipse.jdt.debug.core.IJavaValue)



suspend
public synchronized void suspend() throws DebugException(Code)

See Also:   ISuspendResume.suspend



suspendUnderlyingThread
protected synchronized void suspendUnderlyingThread()(Code)
Suspends the underlying thread asynchronously and fires notification when the underlying thread is suspended.



suspendedByVM
protected synchronized void suspendedByVM()(Code)
Notifies this thread that it has been suspended due to a VM suspend.



terminate
public void terminate() throws DebugException(Code)

See Also:   ITerminate.terminate



terminateEvaluation
public void terminateEvaluation() throws DebugException(Code)

See Also:   IJavaThread.terminateEvaluation



terminated
protected void terminated()(Code)
Notification this thread has terminated - update state and fire a terminate event.



wonSuspendVote
public void wonSuspendVote(JavaBreakpoint breakpoint)(Code)



Methods inherited from org.eclipse.jdt.internal.debug.core.model.JDIDebugElement
public void addJDIEventListener(IJDIEventListener listener, EventRequest request)(Code)(Java Doc)
public boolean canDisconnect()(Code)(Java Doc)
public void disconnect() throws DebugException(Code)(Java Doc)
protected void disconnected()(Code)(Java Doc)
public void fireSuspendEvent(int detail)(Code)(Java Doc)
public Object getAdapter(Class adapter)(Code)(Java Doc)
public EventRequestManager getEventRequestManager()(Code)(Java Doc)
protected JDIDebugTarget getJavaDebugTarget()(Code)(Java Doc)
public String getModelIdentifier()(Code)(Java Doc)
public int getRequestTimeout()(Code)(Java Doc)
protected String getUnknownMessage()(Code)(Java Doc)
protected VirtualMachine getVM()(Code)(Java Doc)
public void internalError(RuntimeException e)(Code)(Java Doc)
protected void internalError(String message)(Code)(Java Doc)
public boolean isDisconnected()(Code)(Java Doc)
public boolean isStepFiltersEnabled()(Code)(Java Doc)
public void jdiRequestFailed(String message, Throwable e) throws DebugException(Code)(Java Doc)
protected void logError(Exception e)(Code)(Java Doc)
public void notSupported(String message) throws DebugException(Code)(Java Doc)
public void queueEvent(DebugEvent event)(Code)(Java Doc)
public void queueSuspendEvent(int detail)(Code)(Java Doc)
public void removeJDIEventListener(IJDIEventListener listener, EventRequest request)(Code)(Java Doc)
public void requestFailed(String message, Exception e) throws DebugException(Code)(Java Doc)
public void requestFailed(String message, Throwable e, int code) throws DebugException(Code)(Java Doc)
public void setRequestTimeout(int timeout)(Code)(Java Doc)
public boolean supportsRequestTimeout()(Code)(Java Doc)
public void targetRequestFailed(String message, RuntimeException e) throws DebugException(Code)(Java Doc)
public void targetRequestFailed(String message, Throwable e) throws DebugException(Code)(Java Doc)
protected void throwDebugException(String message, int code, Throwable exception) throws DebugException(Code)(Java Doc)

w__ww.___j_a__v___a2_s__.__co___m__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.