1 11 package org.eclipse.jdt.internal.debug.eval.ast.engine; 12 13 14 import org.eclipse.core.runtime.CoreException; 15 import org.eclipse.jdt.core.IJavaProject; 16 import org.eclipse.jdt.debug.core.IJavaDebugTarget; 17 import org.eclipse.jdt.debug.core.IJavaObject; 18 import org.eclipse.jdt.debug.core.IJavaReferenceType; 19 import org.eclipse.jdt.debug.core.IJavaThread; 20 import org.eclipse.jdt.debug.core.IJavaVariable; 21 22 public class JavaObjectRuntimeContext extends AbstractRuntimeContext { 23 24 27 private IJavaObject fThisObject; 28 29 32 private IJavaThread fThread; 33 34 41 public JavaObjectRuntimeContext(IJavaObject thisObject, IJavaProject javaProject, IJavaThread thread) { 42 super(javaProject); 43 fThisObject= thisObject; 44 fThread= thread; 45 } 46 47 50 public IJavaDebugTarget getVM() { 51 return (IJavaDebugTarget)fThisObject.getDebugTarget(); 52 } 53 54 57 public IJavaObject getThis() { 58 return fThisObject; 59 } 60 61 64 public IJavaReferenceType getReceivingType() throws CoreException { 65 return (IJavaReferenceType)getThis().getJavaType(); 66 } 67 68 71 public IJavaVariable[] getLocals() { 72 return new IJavaVariable[0]; 73 } 74 75 78 public IJavaThread getThread() { 79 return fThread; 80 } 81 82 85 public boolean isConstructor() { 86 return false; 87 } 88 89 } 90 | Popular Tags |