incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r827952 [6/7] - in /incubator/kato/branches/experimental/thirdview/org.apache.kato: kato.api/src/main/java/javax/tools/diagnostics/ kato.api/src/main/java/javax/tools/diagnostics/image/ kato.api/src/main/java/javax/tools/diagnostics/runtime...
Date Wed, 21 Oct 2009 10:29:59 GMT
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaStackFrame_getHeapRoots.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaStackFrame_getHeapRoots.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaStackFrame_getHeapRoots.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaStackFrame_getHeapRoots.java Wed Oct 21 10:29:55 2009
@@ -21,13 +21,13 @@
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaLocation;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaReference;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
-import javax.tools.diagnostics.runtime.java.JavaStackFrame;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMLocation;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMReference;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
+import javax.tools.diagnostics.runtime.java.JVMStackFrame;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 import org.apache.kato.tck.api.ICheckpoint;
 import org.apache.kato.tck.harness.TCKJavaRuntimeTestcase;
@@ -41,7 +41,7 @@
 	class HeapRootsTestLocalVariable {}
 
 	public static final String threadName = "org.apache.kato.tck.tests.javaruntime.TestJavaStackFrame_getHeapRoots#configureJavaLocalsRoots";
-	private JavaStackFrame frame = null;     
+	private JVMStackFrame frame = null;     
 	private Map rootsCheckList = new HashMap();
 
 //	public String[] jvmDisableJIT()
@@ -53,14 +53,14 @@
 
 	
 	public void setUp () {
-		JavaRuntime runtime = getJavaRuntime();
+		JVMRuntime runtime = getJavaRuntime();
 		Iterator threads = runtime.getThreads().iterator();
-		JavaThread contrivedThread = null;
+		JVMThread contrivedThread = null;
 		while (threads.hasNext()) {
 			Object next = threads.next();
 			
-			if (next instanceof JavaThread) {
-				JavaThread thread = (JavaThread) next;
+			if (next instanceof JVMThread) {
+				JVMThread thread = (JVMThread) next;
 				try {
 					//System.out.println("Thread: " + thread.getName());
 					if (threadName.equals( thread.getName())) {
@@ -80,14 +80,14 @@
 		}
 
 		Iterator frames = contrivedThread.getStackFrames().iterator();
-		JavaStackFrame currentFrame = null;
+		JVMStackFrame currentFrame = null;
 		while (frames.hasNext() && frame == null) {
 			Object next = frames.next();
 
-			if (next instanceof JavaStackFrame) {
-				currentFrame = (JavaStackFrame) next;
+			if (next instanceof JVMStackFrame) {
+				currentFrame = (JVMStackFrame) next;
 				try {
-					JavaLocation location = currentFrame.getLocation();
+					JVMLocation location = currentFrame.getLocation();
 					String methodName = location.getMethod().getName();
 //					System.out.println("Method is: " + methodName + " "+ location.getFilename() + "@" + location.getLineNumber());
 					if ("methodA".equals(methodName)) {
@@ -109,7 +109,7 @@
 			if (next instanceof CorruptData) {
 				continue;
 			}
-			JavaReference r = (JavaReference)next;
+			JVMReference r = (JVMReference)next;
 			try {
 				Object root = r.getTarget();
 				int type = r.getRootType();
@@ -159,10 +159,10 @@
 				continue;
 			}
 			try {
-				if (root instanceof JavaObject) {
-					className = ((JavaObject)root).getJavaClass().getName();
-				} else if (root instanceof JavaClass) {
-					className = ((JavaClass)root).getName();
+				if (root instanceof JVMObject) {
+					className = ((JVMObject)root).getJavaClass().getName();
+				} else if (root instanceof JVMClass) {
+					className = ((JVMClass)root).getName();
 				} else {
 					continue;
 				}
@@ -185,12 +185,12 @@
 
 	
 	public void testJavaLocalRoots() throws Exception {
-		HeapRoot[] roots = searchRootByClassName(rootsCheckList, "HeapRootsTestLocalVariable", JavaReference.HEAP_ROOT_STACK_LOCAL);
+		HeapRoot[] roots = searchRootByClassName(rootsCheckList, "HeapRootsTestLocalVariable", JVMReference.HEAP_ROOT_STACK_LOCAL);
 		assertTrue("Found Local Variable object not reported as root.", roots.length != 0);
 	}
 
 	public void testParameterRoots() throws Exception {
-		HeapRoot[] roots = searchRootByClassName(rootsCheckList, "HeapRootsTestParam", JavaReference.HEAP_ROOT_STACK_LOCAL);
+		HeapRoot[] roots = searchRootByClassName(rootsCheckList, "HeapRootsTestParam", JVMReference.HEAP_ROOT_STACK_LOCAL);
 		assertTrue("Found Local Variable object not reported as root.", roots.length != 0);
 	}
 

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThreadInspection.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThreadInspection.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThreadInspection.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThreadInspection.java Wed Oct 21 10:29:55 2009
@@ -17,9 +17,9 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 import org.apache.kato.tck.api.ICheckpoint;
 import org.apache.kato.tck.harness.TCKJavaRuntimeTestcase;
@@ -33,7 +33,7 @@
 
 
 public Thread[] configThreadInstances=null;
-private JavaObject[] threadDumpInstances=null;
+private JVMObject[] threadDumpInstances=null;
 
 	
 	public void configureValidJavaThreads(ICheckpoint cp) {
@@ -65,7 +65,7 @@
 	 */
 	public void setUp() throws CorruptDataException, MemoryAccessException {
 				
-		JavaObject thisTestInstanceInDump=getThis();
+		JVMObject thisTestInstanceInDump=getThis();
 		assertNotNull(thisTestInstanceInDump);
 		
 		
@@ -74,16 +74,16 @@
 		
 		while(i.hasNext()) {
 			Object o=i.next();
-			if(o instanceof JavaField) {
-				JavaField field=(JavaField) o;
+			if(o instanceof JVMField) {
+				JVMField field=(JVMField) o;
 				String name=field.getName();
 				if(name.equals("configThreadInstances")) {
-					JavaObject obj=(JavaObject) field.get(thisTestInstanceInDump);
+					JVMObject obj=(JVMObject) field.get(thisTestInstanceInDump);
 					// found field
 				
 					int arraySize=obj.getArraySize();
 					assertEquals(3,arraySize);
-					threadDumpInstances=new JavaObject[arraySize];
+					threadDumpInstances=new JVMObject[arraySize];
 					obj.arraycopy(0,threadDumpInstances,0,arraySize);
 					return;
 				}
@@ -101,10 +101,10 @@
 	 */
 	public void testSimpleThreadCreation() throws Exception {
 		assertNotNull(threadDumpInstances);
-		JavaObject o1=threadDumpInstances[0];
+		JVMObject o1=threadDumpInstances[0];
 		
 		Thread t=new Thread();
-		JavaThread jt;
+		JVMThread jt;
 		
 	}
 }

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getName.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getName.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getName.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getName.java Wed Oct 21 10:29:55 2009
@@ -18,8 +18,8 @@
 
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 import org.apache.kato.tck.harness.TCKJavaRuntimeTestcase;
 
@@ -61,7 +61,7 @@
 	{
 		boolean foundThread = false;
 
-		JavaRuntime runtime=getJavaRuntime();
+		JVMRuntime runtime=getJavaRuntime();
 
 		Iterator threads = runtime.getThreads().iterator();
 
@@ -73,7 +73,7 @@
 				break;
 			}
 
-			JavaThread thread = (JavaThread) next;
+			JVMThread thread = (JVMThread) next;
 
 			try {
 				if (0==threadName.compareTo(thread.getName())){

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getStackFrames.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getStackFrames.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getStackFrames.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/javaruntime/TestJavaThread_getStackFrames.java Wed Oct 21 10:29:55 2009
@@ -16,10 +16,10 @@
 import java.util.Iterator;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.runtime.java.JavaLocation;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
-import javax.tools.diagnostics.runtime.java.JavaStackFrame;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMLocation;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
+import javax.tools.diagnostics.runtime.java.JVMStackFrame;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 import org.apache.kato.tck.harness.TCKJavaRuntimeTestcase;
 
@@ -93,14 +93,14 @@
 	}
 
 	public void setUp () {
-		JavaRuntime runtime = getJavaRuntime();
+		JVMRuntime runtime = getJavaRuntime();
 		Iterator threads = runtime.getThreads().iterator();
 		
 		while (threads.hasNext()) {
 			Object next = threads.next();
 			
-			if (next instanceof JavaThread) {
-				JavaThread thread = (JavaThread) next;
+			if (next instanceof JVMThread) {
+				JVMThread thread = (JVMThread) next;
 				
 				try {
 					if (threadName.equals( thread.getName())) {
@@ -120,7 +120,7 @@
 		}
 	}
 
-	private JavaThread contrivedThread;
+	private JVMThread contrivedThread;
 
 	public void testGetStackFrames() throws Exception {
 		Iterator frames = contrivedThread.getStackFrames().iterator();
@@ -129,10 +129,10 @@
 		while (frames.hasNext()) {
 			Object next = frames.next();
 
-			if (next instanceof JavaStackFrame) {
-				JavaStackFrame frame = (JavaStackFrame) next;
+			if (next instanceof JVMStackFrame) {
+				JVMStackFrame frame = (JVMStackFrame) next;
 
-				JavaLocation location = frame.getLocation();
+				JVMLocation location = frame.getLocation();
 				
 				if ((methodIndex < methodNames.length)
 						&& methodNames[methodIndex].equals(location.getMethod().getName())) {

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java Wed Oct 21 10:29:55 2009
@@ -25,13 +25,13 @@
 import javax.tools.diagnostics.image.ImageModule;
 import javax.tools.diagnostics.image.ImageProcess;
 import javax.tools.diagnostics.image.ImageThread;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaClassLoader;
-import javax.tools.diagnostics.runtime.java.JavaHeap;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMClassLoader;
+import javax.tools.diagnostics.runtime.java.JVMHeap;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 import org.apache.kato.tck.harness.TCKProcessTestcase;
 import org.apache.kato.tests.junit.DTFJImageLoader.Capabilities;
@@ -103,15 +103,15 @@
 		return capabilities.factory;
 	}
 
-	public JavaRuntime defaultJavaRuntime() {
-		JavaRuntime runtime = null;
+	public JVMRuntime defaultJavaRuntime() {
+		JVMRuntime runtime = null;
 		Iterator it = defaultImageProcess().getRuntimes().iterator();
 		
 		assertFalse(null == it);
 		while ((null == runtime) && (it.hasNext())) {
 			Object maybeRuntime = it.next();
-			if (maybeRuntime instanceof JavaRuntime) {
-				runtime = (JavaRuntime) maybeRuntime;
+			if (maybeRuntime instanceof JVMRuntime) {
+				runtime = (JVMRuntime) maybeRuntime;
 			} else {
 				throw new TestNotImplementedException();
 			}
@@ -120,40 +120,40 @@
 		return runtime;
 	}
 
-	public JavaThread defaultJavaThread() {
-		JavaRuntime time = defaultJavaRuntime();
+	public JVMThread defaultJavaThread() {
+		JVMRuntime time = defaultJavaRuntime();
 		assertNotNull(time);
 		Iterator it = time.getThreads().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());
 		//threads without stack frames aren't very useful for testing so ignore them
 		// unless they are the only ones
-		JavaThread candidate = null;
+		JVMThread candidate = null;
 		do {
-			candidate = (JavaThread) it.next();
+			candidate = (JVMThread) it.next();
 		} while ((it.hasNext()) && (!candidate.getStackFrames().iterator().hasNext()));
 		return candidate;
 	}
 
-	public JavaClassLoader defaultJavaClassLoader() {
+	public JVMClassLoader defaultJavaClassLoader() {
 		Iterator loaders =  defaultJavaRuntime().getJavaClassLoaders().iterator();
 		assertTrue(loaders.hasNext());
-		JavaClassLoader loader = (JavaClassLoader) loaders.next();
+		JVMClassLoader loader = (JVMClassLoader) loaders.next();
 		Iterator i=loader.getDefinedClasses().iterator();
 		while ((!i.hasNext()) && (loaders.hasNext())) {
-			loader = (JavaClassLoader) loaders.next();
+			loader = (JVMClassLoader) loaders.next();
 		}
 		return loader;
 	}
 
-	public JavaClass defaultJavaClass() {
+	public JVMClass defaultJavaClass() {
 		// Choose a class loader
-		JavaClassLoader loader = defaultJavaClassLoader();
+		JVMClassLoader loader = defaultJavaClassLoader();
 		
 		// Choose a class which has a superclass
 		try {
 			for (Iterator iter = loader.getDefinedClasses().iterator(); iter.hasNext();) {
-				JavaClass clazz = (JavaClass) iter.next();
+				JVMClass clazz = (JVMClass) iter.next();
 				if ( !clazz.getName().equals("java/lang/Object") &&
 				     !clazz.getName().equals("boolean"         ) &&
 				     !clazz.getName().equals("byte"            ) &&						
@@ -177,32 +177,32 @@
 		return null;
 	}
 
-	public JavaHeap defaultJavaHeap() {
-		JavaRuntime runtime  = defaultJavaRuntime();
+	public JVMHeap defaultJavaHeap() {
+		JVMRuntime runtime  = defaultJavaRuntime();
 		Iterator it = runtime.getHeaps().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());
-		JavaHeap heap = (JavaHeap) it.next();
+		JVMHeap heap = (JVMHeap) it.next();
 
 		// This should use Middleware Heap as default
 		// move on to Middleware Heap
 		if (heap.getName().equalsIgnoreCase("System Heap")){
-			heap = (JavaHeap) it.next();
+			heap = (JVMHeap) it.next();
 			if (heap.getName().equalsIgnoreCase("Transient Heap")){
-				heap = (JavaHeap) it.next();
+				heap = (JVMHeap) it.next();
 			}				
 		}
 
-		return (JavaHeap) heap;
+		return (JVMHeap) heap;
 	}
 
-	public JavaObject defaultJavaObject(boolean isArray) {
-		JavaObject foundObject = null;
-		JavaHeap heap = defaultJavaHeap();
+	public JVMObject defaultJavaObject(boolean isArray) {
+		JVMObject foundObject = null;
+		JVMHeap heap = defaultJavaHeap();
 		Iterator objects = heap.getObjects().iterator();
 		
 		while ((null == foundObject) && (objects.hasNext())) {
-			JavaObject oneObject = (JavaObject) objects.next();
+			JVMObject oneObject = (JVMObject) objects.next();
 			
 			try {
 				if (isArray) {
@@ -251,11 +251,11 @@
 		return thread;
 	}
 
-	public JavaMethod defaultJavaMethod() {
-		JavaRuntime runtime = defaultJavaRuntime();
+	public JVMMethod defaultJavaMethod() {
+		JVMRuntime runtime = defaultJavaRuntime();
 		Iterator it = runtime.getCompiledMethods().iterator();
 		if (it.hasNext()) {
-			return (JavaMethod) it.next();
+			return (JVMMethod) it.next();
 		} else {
 			System.err.println("Warning:  No compiled methods found!  This core must have been without JIT!");
 			throw new TestNotImplementedException();

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageSectionTest.java Wed Oct 21 10:29:55 2009
@@ -17,7 +17,7 @@
 
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImageSection;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
 
 
 public class ImageSectionTest extends AbstractDTFJTestcase
@@ -27,7 +27,7 @@
 	public  ImageSection defaultImageSection()
 	{
 		//for now we will just grab a compiled method section
-		JavaMethod method = defaultJavaMethod();
+		JVMMethod method = defaultJavaMethod();
 		Iterator it = method.getCompiledSections().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassLoaderTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassLoaderTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassLoaderTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassLoaderTest.java Wed Oct 21 10:29:55 2009
@@ -16,14 +16,14 @@
 import java.util.Iterator;
 
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaClassLoader;
-import javax.tools.diagnostics.runtime.java.JavaObject;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMClassLoader;
+import javax.tools.diagnostics.runtime.java.JVMObject;
 
 
 public class JavaClassLoaderTest extends AbstractDTFJTestcase
 {
-	private JavaClassLoader _loader;
+	private JVMClassLoader _loader;
 	
 	protected void setUp() throws Exception
 	{
@@ -56,10 +56,10 @@
 	 */
 	public void testFindClass()
 	{
-		JavaClass oneClass = (JavaClass) _loader.getDefinedClasses().get(0);
+		JVMClass oneClass = (JVMClass) _loader.getDefinedClasses().get(0);
 		try {
 			String name = oneClass.getName();
-			JavaClass foundClass = _loader.findClass(name);
+			JVMClass foundClass = _loader.findClass(name);
 			//make sure that it came out
 			assertNotNull(foundClass);
 			//classes might not be the same instance but they should be comparable to each other if they are the same entity
@@ -76,9 +76,9 @@
 	public void testGetObject()
 	{
 		try {
-			JavaObject loader = _loader.getObject();
+			JVMObject loader = _loader.getObject();
 			boolean didMatch = false;
-			JavaClass oneClass = loader.getJavaClass();
+			JVMClass oneClass = loader.getJavaClass();
 			while ((!didMatch) && (null != oneClass)) {
 				if (oneClass.getName().equals("java/lang/ClassLoader")) {
 					didMatch = true;

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaClassTest.java Wed Oct 21 10:29:55 2009
@@ -21,12 +21,12 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaClassLoader;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaReference;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMClassLoader;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMReference;
 
 import org.apache.kato.tests.scenarios.ArrayletTest;
 
@@ -48,8 +48,8 @@
 		}
 	}
 	
-	private JavaClass _testClass;
-	private JavaObject _arrayInstance;	//array classes aren't loaded like normal classes and only come into existence when an array object is created
+	private JVMClass _testClass;
+	private JVMObject _arrayInstance;	//array classes aren't loaded like normal classes and only come into existence when an array object is created
 	private static Sub _subClassObject = null;
 	private static ArrayletTest _testDeadlock = null;
 	
@@ -79,10 +79,10 @@
 	public void testGetObject()
 	{
 		try {
-			JavaObject object = _testClass.getObject();
+			JVMObject object = _testClass.getObject();
 			assertNotNull(object);
 			/* validate that the object is an instance of java/lang/Class */
-			JavaClass javaLangClass = object.getJavaClass();
+			JVMClass javaLangClass = object.getJavaClass();
 			assertNotNull(javaLangClass);
 			assertEquals(javaLangClass.getName(), "java/lang/Class");
 			
@@ -100,7 +100,7 @@
 	public void testGetClassLoader()
 	{
 		try {
-			JavaClassLoader loader = _testClass.getClassLoader();
+			JVMClassLoader loader = _testClass.getClassLoader();
 			assertNotNull(loader);
 		} catch (CorruptDataException e) {
 			//allowed by the spec
@@ -132,7 +132,7 @@
 	public void testGetSuperclass()
 	{
 		try {
-			JavaClass superClass = _testClass.getSuperclass();
+			JVMClass superClass = _testClass.getSuperclass();
 			assertNotNull(superClass);
 		} catch (CorruptDataException e) {
 			//allowed by the spec
@@ -195,8 +195,8 @@
 	 */
 	public void testGetComponentType()
 	{
-		JavaClass arrayClass = null;
-		JavaClass component = null;
+		JVMClass arrayClass = null;
+		JVMClass component = null;
 		try {
 			arrayClass = _arrayInstance.getJavaClass();
 			component = arrayClass.getComponentType();
@@ -227,7 +227,7 @@
 			assertNotNull(fields);
 			while (fields.hasNext()) {
 				Object element = fields.next();
-				assertTrue((element instanceof JavaField) || (element instanceof CorruptData));
+				assertTrue((element instanceof JVMField) || (element instanceof CorruptData));
 			}
 		} catch (Exception e) {
 			//if we caught anything else, this is an error
@@ -248,7 +248,7 @@
 			assertNotNull(methods);
 			while (methods.hasNext()) {
 				Object instance = methods.next();
-				assertTrue((instance instanceof JavaMethod) || (instance instanceof CorruptData));
+				assertTrue((instance instanceof JVMMethod) || (instance instanceof CorruptData));
 			}
 		} catch (Exception e) {
 			//if we caught anything else, this is an error
@@ -269,11 +269,11 @@
 			assertNotNull(references);
 			while (references.hasNext()) {
 				Object instance = references.next();
-				assertTrue((instance instanceof JavaObject) || (instance instanceof CorruptData));
-				if (instance instanceof JavaObject) {
+				assertTrue((instance instanceof JVMObject) || (instance instanceof CorruptData));
+				if (instance instanceof JVMObject) {
 					// ensure that these are valid objects by reading the class
-					JavaObject object = (JavaObject)instance;
-					JavaClass clazz = object.getJavaClass();
+					JVMObject object = (JVMObject)instance;
+					JVMClass clazz = object.getJavaClass();
 					assertNotNull(clazz);
 				}
 			} 
@@ -314,10 +314,10 @@
 			assertNotNull(references);
 			while (references.hasNext()) {
 				Object instance = references.next();
-				assertTrue((instance instanceof JavaReference) || (instance instanceof CorruptData));
-				if (instance instanceof JavaReference) {
+				assertTrue((instance instanceof JVMReference) || (instance instanceof CorruptData));
+				if (instance instanceof JVMReference) {
 					// sniff these objects by getting the description
-					JavaReference object = (JavaReference)instance;
+					JVMReference object = (JVMReference)instance;
 					String description = object.getDescription();
 					assertNotNull(description);
 				}
@@ -362,13 +362,13 @@
 			//search all the loaders for a class which we know we had in the address space
 			String candidateClass = this.getClass().getName()+"$Sub";
 			candidateClass = candidateClass.replace('.', '/');
-			JavaClass subclass = _findClassForName(candidateClass);
+			JVMClass subclass = _findClassForName(candidateClass);
 			if (null == subclass) {
 				//not finding this testing class makes this test useless
 				//note that this can also happen if we are working with a corrupt core file
 				throw new TestNotImplementedException();
 			}
-			JavaClass superclass = null;
+			JVMClass superclass = null;
 			try {
 				superclass = subclass.getSuperclass();
 			} catch (CorruptDataException e) {
@@ -399,15 +399,15 @@
 		}
 	}
 
-	private JavaClass _findClassForName(String candidateClass)
+	private JVMClass _findClassForName(String candidateClass)
 	{
 		Iterator allLoaders = defaultJavaRuntime().getJavaClassLoaders().iterator();
-		JavaClass subclass = null;
+		JVMClass subclass = null;
 		while (allLoaders.hasNext() && (null == subclass)) {
-			JavaClassLoader loader = (JavaClassLoader) allLoaders.next();
+			JVMClassLoader loader = (JVMClassLoader) allLoaders.next();
 			Iterator classes = loader.getDefinedClasses().iterator();
 			while (classes.hasNext()  && (null == subclass)) {
-				JavaClass oneClass = (JavaClass) classes.next();
+				JVMClass oneClass = (JVMClass) classes.next();
 				try {
 					if (oneClass.getName().equals(candidateClass)) {
 						subclass = oneClass;
@@ -430,34 +430,34 @@
 	{
 		String staticSizeName = "DTFJ_ARRAYLET_LENGTH";
 		String staticName = "DTFJ_ARRAYLET_TEST_INSTANCE";
-		JavaClass candidateClass = _findClassForName("org/apache/kato/tests/scenarios/ArrayletTest");
+		JVMClass candidateClass = _findClassForName("org/apache/kato/tests/scenarios/ArrayletTest");
 		
 		if (null != candidateClass) {
 			int size = 0;
-			JavaObject container = null;
+			JVMObject container = null;
 			Iterator fields = candidateClass.getDeclaredFields().iterator();
 			
 			try {
 				while (fields.hasNext()) {
-					JavaField field = (JavaField) fields.next();
+					JVMField field = (JVMField) fields.next();
 					String fieldName = field.getName();
 					
 					if (fieldName.equals(staticSizeName)) {
 						size = field.getInt(null);
 					} else  if (fieldName.equals(staticName)) {
-						container = (JavaObject) field.get(null);
+						container = (JVMObject) field.get(null);
 					}
 				}
 				//now ensure that we actually have something to test with
 				if ((0 != size) && (null != container)) {
 					//now, pull apart the fields of the container
-					JavaClass containerClass = container.getJavaClass();
+					JVMClass containerClass = container.getJavaClass();
 					Iterator theseFields = containerClass.getDeclaredFields().iterator();
 					while (theseFields.hasNext()) {
-						JavaField oneField = (JavaField) theseFields.next();
+						JVMField oneField = (JVMField) theseFields.next();
 						if (oneField.getName().equals("DTFJ_ARRAYLET_INTS")) {
 							//run the int test
-							JavaObject array = (JavaObject) oneField.get(container);
+							JVMObject array = (JVMObject) oneField.get(container);
 							int remote[] = new int[size];
 							int whole[] = new int[size];
 							for (int i = 0; i < size; i++) {
@@ -468,7 +468,7 @@
 							assertTrue(Arrays.equals(whole, remote));
 						} else if (oneField.getName().equals("DTFJ_ARRAYLET_BYTES")) {
 							//run the byte test
-							JavaObject array = (JavaObject) oneField.get(container);
+							JVMObject array = (JVMObject) oneField.get(container);
 							byte remote[] = new byte[size];
 							byte whole[] = new byte[size];
 							for (int i = 0; i < size; i++) {
@@ -479,13 +479,13 @@
 							assertTrue(Arrays.equals(whole, remote));
 						} else if (oneField.getName().equals("DTFJ_ARRAYLET_STRINGCONTAINER")) {
 							//run the byte test
-							JavaObject array = (JavaObject) oneField.get(container);
-							JavaObject whole[] = new JavaObject[size];
+							JVMObject array = (JVMObject) oneField.get(container);
+							JVMObject whole[] = new JVMObject[size];
 							array.arraycopy(0, whole, 0, size);
-							JavaField stringField = null;
+							JVMField stringField = null;
 							Iterator iter = whole[0].getJavaClass().getDeclaredFields().iterator();
 							while(iter.hasNext()) {
-								JavaField testField = (JavaField) iter.next();
+								JVMField testField = (JVMField) iter.next();
 								if (testField.getName().equals("_stringField")) {
 									//this is the field
 									stringField = testField;

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaFieldTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaFieldTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaFieldTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaFieldTest.java Wed Oct 21 10:29:55 2009
@@ -17,21 +17,21 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaClassLoader;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaObject;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMClassLoader;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMObject;
 
 
 public class JavaFieldTest extends AbstractDTFJTestcase
 {
-	private JavaObject _testInstance;
-	private JavaField _field;
-	private JavaField _anotherField;
+	private JVMObject _testInstance;
+	private JVMField _field;
+	private JVMField _anotherField;
 
-	public static JavaField defaultJavaField(JavaClass clazz)
+	public static JVMField defaultJavaField(JVMClass clazz)
 	{
-		return (JavaField) clazz.getDeclaredFields().get(0);
+		return (JVMField) clazz.getDeclaredFields().get(0);
 	}
 	
 	protected void setUp() throws Exception
@@ -39,8 +39,8 @@
 		try {
 			_testInstance = defaultJavaObject(false);
 			Iterator declaredFields=_testInstance.getJavaClass().getDeclaredFields().iterator();
-			_field = (JavaField)declaredFields.next(); //guaranteed to exist - see JavaObjectTest#defaultJavaObject()
-			_anotherField=(JavaField)declaredFields.next(); //guaranteed to exist - see JavaObjectTest#defaultJavaObject()
+			_field = (JVMField)declaredFields.next(); //guaranteed to exist - see JavaObjectTest#defaultJavaObject()
+			_anotherField=(JVMField)declaredFields.next(); //guaranteed to exist - see JavaObjectTest#defaultJavaObject()
 			super.setUp();
 		} catch (TestNotImplementedException e) {
 			throw e;
@@ -244,14 +244,14 @@
 	 */
 	public void testJavaStaticFieldDouble()
 	{
-		JavaClass math = null;
+		JVMClass math = null;
 		Iterator loaders = defaultJavaRuntime().getJavaClassLoaders().iterator();
 		
 		while (loaders.hasNext()) {
-			JavaClassLoader loader = (JavaClassLoader) loaders.next();
+			JVMClassLoader loader = (JVMClassLoader) loaders.next();
 			try {
 				for (Iterator iter = loader.getDefinedClasses().iterator(); iter.hasNext();) {
-					JavaClass clazz = (JavaClass) iter.next();
+					JVMClass clazz = (JVMClass) iter.next();
 					if (clazz.getName().equals("java/lang/Math")) {
 						math = clazz;
 						break;
@@ -265,7 +265,7 @@
 		if (null != math) {
 			Iterator fields = math.getDeclaredFields().iterator();
 			while (fields.hasNext()) {
-				JavaField field = (JavaField) fields.next();
+				JVMField field = (JVMField) fields.next();
 				try {
 					if (field.getName().equals("PI")) {
 						double pi = field.getDouble(null);

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaHeapTest.java Wed Oct 21 10:29:55 2009
@@ -16,12 +16,12 @@
 import java.util.Iterator;
 import java.util.List;
 
-import javax.tools.diagnostics.runtime.java.JavaHeap;
+import javax.tools.diagnostics.runtime.java.JVMHeap;
 
 
 public class JavaHeapTest extends AbstractDTFJTestcase
 {
-	private JavaHeap _heap = null;
+	private JVMHeap _heap = null;
 	
 	protected void setUp() throws Exception
 	{

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaLocationTest.java Wed Oct 21 10:29:55 2009
@@ -16,17 +16,17 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImagePointer;
-import javax.tools.diagnostics.runtime.java.JavaLocation;
-import javax.tools.diagnostics.runtime.java.JavaStackFrame;
+import javax.tools.diagnostics.runtime.java.JVMLocation;
+import javax.tools.diagnostics.runtime.java.JVMStackFrame;
 
 public class JavaLocationTest extends AbstractDTFJTestcase
 {
-	private JavaLocation _location;
+	private JVMLocation _location;
 	
-	public  JavaLocation defaultLocation()
+	public  JVMLocation defaultLocation()
 	{
 		try {
-			return ((JavaStackFrame)defaultJavaThread().getStackFrames().get(0)).getLocation();
+			return ((JVMStackFrame)defaultJavaThread().getStackFrames().get(0)).getLocation();
 		} catch (CorruptDataException e) {
 			//XXX: how should this be handled?
 			throw new TestNotImplementedException();

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMethodTest.java Wed Oct 21 10:29:55 2009
@@ -18,13 +18,13 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.ImageSection;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
 
 
 public class JavaMethodTest extends AbstractDTFJTestcase
 {
-	private JavaMethod _method = null;
+	private JVMMethod _method = null;
 	
 	protected void setUp() throws Exception
 	{

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMonitorTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMonitorTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMonitorTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaMonitorTest.java Wed Oct 21 10:29:55 2009
@@ -17,20 +17,20 @@
 
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.runtime.java.JavaMonitor;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMMonitor;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 
 public class JavaMonitorTest extends AbstractDTFJTestcase
 {
-	private JavaMonitor _monitor = null;
+	private JVMMonitor _monitor = null;
 	
-	public  JavaMonitor defaultJavaMonitor()
+	public  JVMMonitor defaultJavaMonitor()
 	{
 		Iterator it = defaultJavaRuntime().getMonitors().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());
-		return (JavaMonitor) it.next();
+		return (JVMMonitor) it.next();
 	}
 	
 	protected void setUp() throws Exception
@@ -90,7 +90,7 @@
 		assertNotNull(iter);
 		while (iter.hasNext()) {
 			Object element = iter.next();
-			assertTrue((element instanceof JavaThread) || (element instanceof CorruptData));
+			assertTrue((element instanceof JVMThread) || (element instanceof CorruptData));
 		}
 	}
 
@@ -106,7 +106,7 @@
 		assertNotNull(iter);
 		while (iter.hasNext()) {
 			Object element = iter.next();
-			assertTrue((element instanceof JavaThread) || (element instanceof CorruptData));
+			assertTrue((element instanceof JVMThread) || (element instanceof CorruptData));
 		}
 	}
 	
@@ -158,8 +158,8 @@
 			Iterator it = defaultJavaRuntime().getMonitors().iterator();
 			
 			while (it.hasNext()) {
-				JavaMonitor monitor = (JavaMonitor) it.next();
-				JavaThread owner = monitor.getOwner();
+				JVMMonitor monitor = (JVMMonitor) it.next();
+				JVMThread owner = monitor.getOwner();
 				
 				if (null != owner) {
 					assertNotNull(owner.getName());

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaObjectTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaObjectTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaObjectTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaObjectTest.java Wed Oct 21 10:29:55 2009
@@ -21,9 +21,9 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaReference;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMReference;
 
 import org.apache.kato.tck.api.ICheckpoint;
 
@@ -41,8 +41,8 @@
 	protected static final char SIG_OBJECT = 'L';
 	protected static final char SIG_ARRAY = '[';
 
-	private JavaObject _object = null;
-	private JavaObject _array = null;
+	private JVMObject _object = null;
+	private JVMObject _array = null;
 	
 	
 	/**
@@ -77,7 +77,7 @@
 	 */
 	public void testGetJavaClass()
 	{
-		JavaClass theClass = null;
+		JVMClass theClass = null;
 		try {
 			theClass = _object.getJavaClass();
 		} catch (CorruptDataException e) {
@@ -453,7 +453,7 @@
 			int size = _array.getArraySize();		
 			Object destination = destArray(size);
 			try {
-				_array.arraycopy(0, new JavaClass[size], 0, size);
+				_array.arraycopy(0, new JVMClass[size], 0, size);
 				fail("Expected source index out of bounds");
 			} catch (IllegalArgumentException e) {
 				// Expected array unchanged
@@ -560,7 +560,7 @@
 	 * 
 	 * @throws CorruptDataException
 	 */
-	private Object destArray(JavaObject array, int start, int end, Object comp) throws CorruptDataException {
+	private Object destArray(JVMObject array, int start, int end, Object comp) throws CorruptDataException {
 		boolean fill = comp == null;
 		int size = end;
 		Object destination;
@@ -747,10 +747,10 @@
 			assertNotNull(references);
 			while (references.hasNext()) {
 				Object instance = references.next();
-				assertTrue((instance instanceof JavaReference) || (instance instanceof CorruptData));
-				if (instance instanceof JavaReference) {
+				assertTrue((instance instanceof JVMReference) || (instance instanceof CorruptData));
+				if (instance instanceof JVMReference) {
 					// sniff these objects by getting the description
-					JavaReference object = (JavaReference)instance;
+					JVMReference object = (JVMReference)instance;
 					String description = object.getDescription();
 					assertNotNull(description);
 				}
@@ -761,10 +761,10 @@
 			assertNotNull(references);
 			while (references.hasNext()) {
 				Object instance = references.next();
-				assertTrue((instance instanceof JavaReference) || (instance instanceof CorruptData));
-				if (instance instanceof JavaReference) {
+				assertTrue((instance instanceof JVMReference) || (instance instanceof CorruptData));
+				if (instance instanceof JVMReference) {
 					// sniff these objects by getting the description
-					JavaReference object = (JavaReference)instance;
+					JVMReference object = (JVMReference)instance;
 					String description = object.getDescription();
 					assertNotNull(description);
 				}

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaRuntimeTest.java Wed Oct 21 10:29:55 2009
@@ -22,18 +22,18 @@
 import javax.tools.diagnostics.image.ImagePointer;
 import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaHeap;
-import javax.tools.diagnostics.runtime.java.JavaMonitor;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaReference;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
-import javax.tools.diagnostics.runtime.java.JavaVMInitArgs;
-import javax.tools.diagnostics.runtime.java.JavaVMOption;
+import javax.tools.diagnostics.runtime.java.JVMHeap;
+import javax.tools.diagnostics.runtime.java.JVMMonitor;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMReference;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
+import javax.tools.diagnostics.runtime.java.JVMInitArgs;
+import javax.tools.diagnostics.runtime.java.JVMOption;
 
 
 public class JavaRuntimeTest extends AbstractDTFJTestcase
 {
-	private JavaRuntime _runtime = null;
+	private JVMRuntime _runtime = null;
 	
 	protected void setUp() throws Exception
 	{
@@ -84,8 +84,8 @@
 	 */
 	public void testGetObjectAtAddress()
 	{
-		JavaHeap heap = defaultJavaHeap();
-		JavaRuntime runtime = defaultJavaRuntime();
+		JVMHeap heap = defaultJavaHeap();
+		JVMRuntime runtime = defaultJavaRuntime();
 		ImageAddressSpace addressSpace = defaultAddressSpace();
 		ImagePointer address=null;
 		ImagePointer unalignedAddress=null;
@@ -121,9 +121,9 @@
 		boolean exception=false;
 		for (Iterator objects = heap.getObjects().iterator();objects.hasNext();) {
 			Object potentialObject = objects.next();
-			JavaObject object = null;
-			if (potentialObject instanceof JavaObject) {
-				object = (JavaObject)potentialObject;
+			JVMObject object = null;
+			if (potentialObject instanceof JVMObject) {
+				object = (JVMObject)potentialObject;
 			} else {
 				continue;
 			}
@@ -222,7 +222,7 @@
 			Iterator it = _runtime.getMonitors().iterator();
 			assertNotNull(it);
 			assertTrue(it.hasNext());
-			assertTrue(it.next() instanceof JavaMonitor);
+			assertTrue(it.next() instanceof JVMMonitor);
 		} catch (Exception e) {
 			//no exceptions should be thrown so catch it as a failure instead of an error
 			fail();
@@ -240,7 +240,7 @@
 			Iterator it = _runtime.getHeaps().iterator();
 			assertNotNull(it);
 			assertTrue(it.hasNext());
-			assertTrue(it.next() instanceof JavaHeap);
+			assertTrue(it.next() instanceof JVMHeap);
 		} catch (Exception e) {
 			//no exceptions should be thrown so catch it as a failure instead of an error
 			fail();
@@ -285,13 +285,13 @@
 	public void testGetJavaVMInitArgs() 
 	{
 		try {
-			JavaVMInitArgs args = _runtime.getJavaVMInitArgs(); 
+			JVMInitArgs args = _runtime.getJavaVMInitArgs(); 
 			assertNotNull(args);
 
 			int version = args.getVersion();
-			assertTrue((version == JavaVMInitArgs.JNI_VERSION_1_1) 
-					|| (version == JavaVMInitArgs.JNI_VERSION_1_2)
-					|| (version == JavaVMInitArgs.JNI_VERSION_1_4));
+			assertTrue((version == JVMInitArgs.JNI_VERSION_1_1) 
+					|| (version == JVMInitArgs.JNI_VERSION_1_2)
+					|| (version == JVMInitArgs.JNI_VERSION_1_4));
 
 			Iterator options = args.getOptions().iterator();
 			assertNotNull(options);
@@ -300,7 +300,7 @@
 			//assertTrue(options.hasNext());
 
 			while (options.hasNext()) {
-				JavaVMOption option = (JavaVMOption)options.next();
+				JVMOption option = (JVMOption)options.next();
 				assertNotNull(option.getOptionString());
 				// just make sure getExtraInfo() doesn't throw an exception
 				option.getExtraInfo();
@@ -351,13 +351,13 @@
 			assertTrue(it.hasNext());
 			while (it.hasNext()) {
 				Object next = it.next();
-				assertTrue(next instanceof JavaHeap);
-				JavaHeap heap = (JavaHeap) next;
+				assertTrue(next instanceof JVMHeap);
+				JVMHeap heap = (JVMHeap) next;
 				Iterator objects = heap.getObjects().iterator();
 				assertNotNull(objects);
 				while (objects.hasNext()) {
 					Object one = objects.next();
-					assertTrue(one instanceof JavaObject);
+					assertTrue(one instanceof JVMObject);
 				}
 			}
 		} catch (Exception e) {
@@ -378,7 +378,7 @@
 		assertNotNull(it);
 		assertTrue(it.hasNext());
 		Object first = it.next();
-		assertTrue( first instanceof JavaReference || first instanceof CorruptData);
+		assertTrue( first instanceof JVMReference || first instanceof CorruptData);
 
 	}
 }

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaStackFrameTest.java Wed Oct 21 10:29:55 2009
@@ -17,22 +17,22 @@
 
 import javax.tools.diagnostics.image.CorruptData;
 import javax.tools.diagnostics.image.CorruptDataException;
-import javax.tools.diagnostics.runtime.java.JavaReference;
-import javax.tools.diagnostics.runtime.java.JavaStackFrame;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMReference;
+import javax.tools.diagnostics.runtime.java.JVMStackFrame;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 
 public class JavaStackFrameTest extends AbstractDTFJTestcase
 {
-	private JavaStackFrame _frame = null;
+	private JVMStackFrame _frame = null;
 	
-	public  JavaStackFrame defaultJavaStackFrame()
+	public  JVMStackFrame defaultJavaStackFrame()
 	{
-		JavaThread thread = defaultJavaThread();
+		JVMThread thread = defaultJavaThread();
 		Iterator it = thread.getStackFrames().iterator();
 		assertNotNull(it);
 		assertTrue(it.hasNext());
-		return (JavaStackFrame) it.next();
+		return (JVMStackFrame) it.next();
 	}
 	
 	protected void setUp() throws Exception
@@ -104,7 +104,7 @@
 			/* some frames may legitimately not have any roots */
 			if (it.hasNext()){
 				Object first = it.next();
-				assertTrue( first instanceof JavaReference || first instanceof CorruptData);
+				assertTrue( first instanceof JVMReference || first instanceof CorruptData);
 			}
 		} catch (Throwable t) {
 			assertTrue(false);

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaThreadTest.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaThreadTest.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaThreadTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/JavaThreadTest.java Wed Oct 21 10:29:55 2009
@@ -17,13 +17,13 @@
 
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.DataUnavailable;
-import javax.tools.diagnostics.runtime.java.JavaThread;
+import javax.tools.diagnostics.runtime.java.JVMThread;
 
 
 public class JavaThreadTest extends AbstractDTFJTestcase
 {
-	private JavaThread _thread = null;
-	private JavaThread _sameThread = null;
+	private JVMThread _thread = null;
+	private JVMThread _sameThread = null;
 	
 	protected void setUp() throws Exception
 	{
@@ -174,7 +174,7 @@
 		Iterator threads = defaultJavaRuntime().getThreads().iterator();
 		
 		while (threads.hasNext()) {
-			JavaThread thread = (JavaThread) threads.next();
+			JVMThread thread = (JVMThread) threads.next();
 			
 			try {
 				assertNotNull(thread.getName());

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/DeadlockCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/DeadlockCommand.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/DeadlockCommand.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/DeadlockCommand.java Wed Oct 21 10:29:55 2009
@@ -63,7 +63,7 @@
 		while (itRuntime.hasNext())
 		{
 			SortedMap monitorNodes = new TreeMap();
-			JavaRuntime jr = (JavaRuntime)itRuntime.next();
+			JVMRuntime jr = (JVMRuntime)itRuntime.next();
 			Iterator itMonitor = jr.getMonitors().iterator();
 			int nodeListNum = 0;
 			
@@ -73,9 +73,9 @@
 			// contains the monitor (JavaMonitor) and some parameters and adding that MonitorNode 
 			// to a Hashtable, indexed by owner (JavaThread object address)
 			while (itMonitor.hasNext()) {
-				JavaMonitor monitor = (JavaMonitor)itMonitor.next();
+				JVMMonitor monitor = (JVMMonitor)itMonitor.next();
 				MonitorNode node = new MonitorNode(monitor);
-				JavaThread owner = null;
+				JVMThread owner = null;
 				Long id = null;
 				
 				try {
@@ -94,7 +94,7 @@
 					// the monitor's owner or the next monitor in a potential deadlock chain.
 					continue;
 				} else {
-					JavaObject threadObject;
+					JVMObject threadObject;
 					try {
 						threadObject = owner.getObject();
 					} catch (CorruptDataException e) {
@@ -118,12 +118,12 @@
 			// enter waiter, set that waiter's MonitorNode's waitingOn to m1.
 			while (values.hasNext()) {
 				MonitorNode currNode = (MonitorNode)values.next();
-				JavaMonitor currMonitor = currNode.getMonitor();
+				JVMMonitor currMonitor = currNode.getMonitor();
 				
 				Iterator itWaiters = currMonitor.getEnterWaiters().iterator();
 				while (itWaiters.hasNext()) {
-					JavaThread waiter = (JavaThread)itWaiters.next();
-					JavaObject threadObject;
+					JVMThread waiter = (JVMThread)itWaiters.next();
+					JVMObject threadObject;
 					Long id = null;
 					
 					try {

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/HeapdumpCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/HeapdumpCommand.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/HeapdumpCommand.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/HeapdumpCommand.java Wed Oct 21 10:29:55 2009
@@ -36,12 +36,12 @@
 import javax.tools.diagnostics.image.ImageProcess;
 import javax.tools.diagnostics.image.DiagnosticException;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaClassLoader;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaHeap;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMClassLoader;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMHeap;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
 
 import org.apache.kato.katoview.Output;
 import org.apache.kato.katoview.heapdump.HeapDumpFormatter;
@@ -108,7 +108,7 @@
 			return;
 		}
 
-		JavaRuntime runtime = getRuntime(addressSpace);
+		JVMRuntime runtime = getRuntime(addressSpace);
 		
 		if(runtime == null) {
 			return;
@@ -159,7 +159,7 @@
 	 * @param heapsToDump Set of strings the user passed as heaps to dump
 	 * @return True if all the names are valid heaps, false otherwise
 	 */
-	private boolean heapArgumentsAreValid(JavaRuntime runtime, Set heapsToDump)
+	private boolean heapArgumentsAreValid(JVMRuntime runtime, Set heapsToDump)
 	{
 		if(heapsToDump.size() == 0) {
 			return true;
@@ -173,8 +173,8 @@
 		while(heapIt.hasNext()) {
 			Object potential = heapIt.next();
 			
-			if(potential instanceof JavaHeap) {
-				JavaHeap thisHeap = (JavaHeap)potential;
+			if(potential instanceof JVMHeap) {
+				JVMHeap thisHeap = (JVMHeap)potential;
 				
 				workingSet.remove(thisHeap.getName());
 			} else if (potential instanceof CorruptData) {
@@ -209,7 +209,7 @@
 	/**
 	 * Extracts a minimal version string from the full -version output 
 	 */
-	private String getVersionString(JavaRuntime runtime)
+	private String getVersionString(JVMRuntime runtime)
 	{
 		try {
 			String rawVersion = runtime.getVersion();
@@ -233,7 +233,7 @@
 		}
 	}
 	
-	private JavaRuntime getRuntime(ImageAddressSpace addressSpace)
+	private JVMRuntime getRuntime(ImageAddressSpace addressSpace)
 	{
 		ImageProcess process = addressSpace.getCurrentProcess();
 		
@@ -256,10 +256,10 @@
 			return null;
 		}
 		
-		return (JavaRuntime) potential;
+		return (JVMRuntime) potential;
 	}
 
-	private void dumpMultipleHeapsInOneFile(JavaRuntime runtime,
+	private void dumpMultipleHeapsInOneFile(JVMRuntime runtime,
 			String version, boolean is64Bit, boolean phdFormat, String filename, Set heapsToDump) throws IOException
 	{
 		Iterator heapIterator = runtime.getHeaps().iterator();
@@ -280,7 +280,7 @@
 				continue;
 			}
 
-			JavaHeap thisHeap = (JavaHeap) thisHeapObj;
+			JVMHeap thisHeap = (JVMHeap) thisHeapObj;
 			
 			if(heapsToDump.size() > 0 && ! heapsToDump.contains(thisHeap.getName())) {
 				continue;
@@ -292,7 +292,7 @@
 		formatter.close();
 	}
 
-	private void dumpMultipleHeapsInSeparateFiles(JavaRuntime runtime,String version, boolean is64Bit, boolean phdFormat,String baseFileName, Set heapsToDump) throws IOException
+	private void dumpMultipleHeapsInSeparateFiles(JVMRuntime runtime,String version, boolean is64Bit, boolean phdFormat,String baseFileName, Set heapsToDump) throws IOException
 	{
 		Iterator heapIterator = runtime.getHeaps().iterator();
 		
@@ -308,7 +308,7 @@
 				continue;
 			}
 
-			JavaHeap thisHeap = (JavaHeap) thisHeapObj;
+			JVMHeap thisHeap = (JVMHeap) thisHeapObj;
 
 			// Create a new heapdump formatter for every heap we find
 			if (formatter != null) {
@@ -344,7 +344,7 @@
 	/**
 	 * Walks the runtime classes and passes them through the formatter interface
 	 */
-	private void dumpClasses(HeapDumpFormatter formatter, JavaRuntime runtime) throws IOException
+	private void dumpClasses(HeapDumpFormatter formatter, JVMRuntime runtime) throws IOException
 	{
 		Iterator classLoaderIt = runtime.getJavaClassLoaders().iterator();
 		
@@ -359,7 +359,7 @@
 				continue ITERATING_LOADERS;
 			}
 			
-			JavaClassLoader thisClassLoader = (JavaClassLoader)potential;
+			JVMClassLoader thisClassLoader = (JVMClassLoader)potential;
 			
 			Iterator classesIt = thisClassLoader.getDefinedClasses().iterator();
 			
@@ -378,11 +378,11 @@
 						continue ITERATING_CLASSES;
 					}
 
-					JavaClass thisJavaClass = (JavaClass)potential;
+					JVMClass thisJavaClass = (JVMClass)potential;
 					
-					JavaClass superClass = thisJavaClass.getSuperclass();
+					JVMClass superClass = thisJavaClass.getSuperclass();
 					
-					JavaObject classObject = thisJavaClass.getObject();
+					JVMObject classObject = thisJavaClass.getObject();
 					
 					int instanceSize = 0;
 
@@ -414,7 +414,7 @@
 	/**
 	 * Walks the supplied heap and passes the artifacts through the formatter
 	 */
-	private void dumpHeap(HeapDumpFormatter formatter, JavaHeap thisHeap)
+	private void dumpHeap(HeapDumpFormatter formatter, JVMHeap thisHeap)
 			throws IOException
 	{
 		Iterator objectIterator = thisHeap.getObjects().iterator();
@@ -430,8 +430,8 @@
 			}
 
 			try {
-				JavaObject thisObject = (JavaObject) next;
-				JavaClass thisClass = thisObject.getJavaClass();
+				JVMObject thisObject = (JVMObject) next;
+				JVMClass thisClass = thisObject.getJavaClass();
 
 				int hashcode = 0;
 
@@ -492,7 +492,7 @@
 	 * 
 	 * @param thisJavaClass Class being examined 
 	 */
-	private ReferenceIterator getClassReferences(JavaClass thisJavaClass)
+	private ReferenceIterator getClassReferences(JVMClass thisJavaClass)
 	{
 		List references = new LinkedList();
 		
@@ -503,10 +503,10 @@
 			addProtectionDomainReference(thisJavaClass,references);
 			
 			//Classloader
-			JavaClassLoader loader = thisJavaClass.getClassLoader();
+			JVMClassLoader loader = thisJavaClass.getClassLoader();
 			
 			if(loader != null) {
-				JavaObject loaderObject = loader.getObject();
+				JVMObject loaderObject = loader.getObject();
 				if(loaderObject != null) {
 					references.add(new Long(loaderObject.getID().getAddress()));
 				} else {
@@ -519,7 +519,7 @@
 			}
 		
 			//Heap object
-			JavaObject classObject = thisJavaClass.getObject();
+			JVMObject classObject = thisJavaClass.getObject();
 			if(classObject != null) {
 				references.add(new Long(classObject.getID().getAddress()));
 			} else {
@@ -535,17 +535,17 @@
 		return new LongListReferenceIterator(references);
 	}
 	
-	private JavaField _protectionDomainField;
+	private JVMField _protectionDomainField;
 	
-	private void addProtectionDomainReference(JavaClass thisJavaClass,
+	private void addProtectionDomainReference(JVMClass thisJavaClass,
 			List references) throws CorruptDataException, MemoryAccessException
 			
 	{
-		JavaObject classObject = thisJavaClass.getObject();
+		JVMObject classObject = thisJavaClass.getObject();
 		
 		//Protection domain hangs off the protectionDomain field on the class object
 		if(_protectionDomainField == null) {
-			JavaClass javaLangClassObject = classObject.getJavaClass();
+			JVMClass javaLangClassObject = classObject.getJavaClass();
 			if(javaLangClassObject == null) {
 				_numberOfErrors++;
 				reportError("Couldn't find java.lang.Class class",null);
@@ -556,8 +556,8 @@
 			while(fieldsIt.hasNext()) {
 				Object potential = fieldsIt.next();
 				
-				if(potential instanceof JavaField) {
-					JavaField field = (JavaField) potential;
+				if(potential instanceof JVMField) {
+					JVMField field = (JVMField) potential;
 					
 					if(field.getName().equals(PROTECTION_DOMAIN_FIELD_NAME)) {
 						_protectionDomainField = field;
@@ -585,8 +585,8 @@
 		
 		Object potential = _protectionDomainField.get(classObject);
 		
-		if(potential instanceof JavaObject) {
-			JavaObject protectionDomain = (JavaObject)potential;
+		if(potential instanceof JVMObject) {
+			JVMObject protectionDomain = (JVMObject)potential;
 			
 			references.add(new Long(protectionDomain.getID().getAddress()));
 		} else if (potential instanceof CorruptData) {
@@ -613,7 +613,7 @@
 	 * @param thisClass Class being examined
 	 * @param references List to add references to
 	 */
-	private void addStaticReferences(JavaClass thisClass, List references)
+	private void addStaticReferences(JVMClass thisClass, List references)
 			throws CorruptDataException, MemoryAccessException
 	{
 		Iterator fieldsIt = thisClass.getDeclaredFields().iterator();
@@ -631,7 +631,7 @@
 				continue;
 			}
 				
-			JavaField field = (JavaField) potential;
+			JVMField field = (JVMField) potential;
 				
 			if(! Modifier.isStatic(field.getModifiers())) {
 				continue;
@@ -648,8 +648,8 @@
 						+ " at address "
 						+ ((CorruptData)potential).getAddress()
 						,null);
-			} else if (referent instanceof JavaObject) {
-				JavaObject referredObject = (JavaObject) referent;
+			} else if (referent instanceof JVMObject) {
+				JVMObject referredObject = (JVMObject) referent;
 					
 				references.add(new Long(referredObject.getID().getAddress()));
 			} else if (referent == null) {
@@ -675,12 +675,12 @@
 	 * @param thisObject Object being examined
 	 * @return Iterator of references
 	 */
-	private ReferenceIterator getObjectReferences(JavaObject thisObject)
+	private ReferenceIterator getObjectReferences(JVMObject thisObject)
 	{
 		List references = new LinkedList();
 		
 		try {
-			JavaClass thisClass = thisObject.getJavaClass();
+			JVMClass thisClass = thisObject.getJavaClass();
 		
 			if(thisClass.isArray()) {
 				addArrayReferences(thisObject, references);
@@ -700,10 +700,10 @@
 	 * @param arrayObject Array
 	 * @param references List to add references to
 	 */
-	private void addArrayReferences(JavaObject arrayObject, List references)
+	private void addArrayReferences(JVMObject arrayObject, List references)
 			throws CorruptDataException, MemoryAccessException
 	{
-		JavaObject[] localArray = new JavaObject[arrayObject.getArraySize()];
+		JVMObject[] localArray = new JVMObject[arrayObject.getArraySize()];
 		arrayObject.arraycopy(0, localArray, 0, arrayObject.getArraySize());
 		
 		for(int i=0;i!=localArray.length;i++) {
@@ -721,8 +721,8 @@
 	 * @param references List to add references to
 	 * @param thisClass Class of object
 	 */
-	private void addRegularObjectReferences(JavaObject object,
-			List references, JavaClass thisClass) throws CorruptDataException,
+	private void addRegularObjectReferences(JVMObject object,
+			List references, JVMClass thisClass) throws CorruptDataException,
 			MemoryAccessException
 	{
 		while(thisClass != null) {
@@ -743,7 +743,7 @@
 					continue WALKING_FIELDS;
 				}
 				
-				JavaField field = (JavaField) potential;
+				JVMField field = (JVMField) potential;
 				
 				if(Modifier.isStatic(field.getModifiers())) {
 					continue WALKING_FIELDS;
@@ -762,8 +762,8 @@
 							+ "(" + thisClass.getID() + ")"
 							,null);
 					continue WALKING_FIELDS;
-				} else if (referent instanceof JavaObject) {
-					JavaObject referredObject = (JavaObject) referent;
+				} else if (referent instanceof JVMObject) {
+					JVMObject referredObject = (JVMObject) referent;
 					
 					references.add(new Long(referredObject.getID().getAddress()));
 				} else if (referent == null) {
@@ -787,7 +787,7 @@
 	 *            Class under test
 	 * @return True if clazz represents a primitive type, false otherwise
 	 */
-	private static boolean isPrimitive(JavaClass clazz)
+	private static boolean isPrimitive(JVMClass clazz)
 			throws CorruptDataException
 	{
 		String name = clazz.getName();
@@ -811,7 +811,7 @@
 	 * @param clazz
 	 * @return
 	 */
-	private int getPrimitiveTypeCode(JavaClass clazz)
+	private int getPrimitiveTypeCode(JVMClass clazz)
 			throws CorruptDataException
 	{
 		String name = clazz.getName();
@@ -843,7 +843,7 @@
 	 * Modifies the base file name to include the heap name, whilst maintaining
 	 * the suffix
 	 */
-	private String getFileNameForHeap(JavaHeap thisHeap, String baseFileName)
+	private String getFileNameForHeap(JVMHeap thisHeap, String baseFileName)
 	{
 		int pointIndex = baseFileName.lastIndexOf(".");
 		

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/WhatisCommand.java Wed Oct 21 10:29:55 2009
@@ -22,11 +22,11 @@
 import javax.tools.diagnostics.image.Image;
 import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.runtime.ManagedRuntime;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaHeap;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMHeap;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
 
 import org.apache.kato.katoview.Output;
 import org.apache.kato.katoview.commands.helpers.Utils;
@@ -70,24 +70,24 @@
 		out.print("\n");
 		while (itRuntime.hasNext()) {
 			mr = (ManagedRuntime)itRuntime.next();
-			if (mr instanceof JavaRuntime)
+			if (mr instanceof JVMRuntime)
 			{
 				out.print("\truntime #" + count + "\n");
 				
-				findInRuntime((JavaRuntime)mr, address);
+				findInRuntime((JVMRuntime)mr, address);
 			}
 			count++;
 		}
 	}
 	
-	private void findInRuntime(JavaRuntime jr, long address)
+	private void findInRuntime(JVMRuntime jr, long address)
 	{
-		JavaHeap jh;
+		JVMHeap jh;
 		Iterator itHeap = jr.getHeaps().iterator();
 		int count = 1;
 		
 		while (itHeap.hasNext()) {
-			jh = (JavaHeap)itHeap.next();
+			jh = (JVMHeap)itHeap.next();
 			
 			out.print("\t  heap #" + count + " - name: ");
 			out.print(jh.getName() + "\n");
@@ -97,7 +97,7 @@
 		}
 	}
 	
-	private void findInHeap(JavaHeap jh, long address)
+	private void findInHeap(JVMHeap jh, long address)
 	{
 		//TODO: checkWithinValidMemRange(sb, ...);
 		
@@ -123,8 +123,8 @@
 	
 	private void checkMethodInRange(Iterator objects, long address){
 		while(objects.hasNext()){
-			JavaObject jObject = (JavaObject)objects.next();
-			JavaClass jClass;
+			JVMObject jObject = (JVMObject)objects.next();
+			JVMClass jClass;
 			try{
 				jClass = jObject.getJavaClass();
 			}catch(CorruptDataException cde){
@@ -133,7 +133,7 @@
 			}
 			Iterator methods = jClass.getDeclaredMethods().iterator();
 			while(methods.hasNext()){
-				JavaMethod jMethod = (JavaMethod)methods.next();
+				JVMMethod jMethod = (JVMMethod)methods.next();
 				Iterator bytecodeSections = jMethod.getBytecodeSections().iterator();
 				Iterator compiledSections = jMethod.getCompiledSections().iterator();
 				isWithinImageSections(bytecodeSections, jMethod, false, address);
@@ -155,8 +155,8 @@
 	private void checkClassInRange(Iterator objects, long bound, long address){
 		long startAddress, endAddress ;
 		while(objects.hasNext()){
-			JavaObject jObject = (JavaObject)objects.next();
-			JavaClass jClass;
+			JVMObject jObject = (JVMObject)objects.next();
+			JVMClass jClass;
 			String className;
 			try{
 				jClass = jObject.getJavaClass();
@@ -184,7 +184,7 @@
 		long startAddress, endAddress ;
 		String className;
 		while(objects.hasNext()){
-			JavaObject jObject = (JavaObject)objects.next();
+			JVMObject jObject = (JVMObject)objects.next();
 			try{
 				className = jObject.getJavaClass().getName();
 				startAddress = jObject.getID().getAddress();
@@ -210,7 +210,7 @@
 	private boolean isStartOfObj(Iterator objects, long address){
 		String className;
 		while(objects.hasNext()){
-			JavaObject jObject = (JavaObject)objects.next();
+			JVMObject jObject = (JVMObject)objects.next();
 			if (address == jObject.getID().getAddress()){
 				try{
 					className = jObject.getJavaClass().getName();
@@ -239,12 +239,12 @@
 							Long.toHexString(baseAddress) + " -- " + Long.toHexString(endAddress) + "\n");
 					return true;
 				}
-				if (memType instanceof JavaMethod) {
+				if (memType instanceof JVMMethod) {
 					String methodName = "N/A", methodSig = "N/A", className = "N/A";
 					try{
-						methodName = ((JavaMethod)memType).getName();
-						methodSig = ((JavaMethod)memType).getSignature();
-						className = ((JavaMethod)memType).getDeclaringClass().getName();
+						methodName = ((JVMMethod)memType).getName();
+						methodSig = ((JVMMethod)memType).getSignature();
+						className = ((JVMMethod)memType).getDeclaringClass().getName();
 					}catch(CorruptDataException cde){				
 					}catch(DataUnavailable du){
 					}

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/XPathCommand.java Wed Oct 21 10:29:55 2009
@@ -20,7 +20,7 @@
 import javax.tools.diagnostics.image.Image;
 import javax.tools.diagnostics.image.ImageAddressSpace;
 import javax.tools.diagnostics.image.ImageProcess;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
 
 import org.apache.commons.jxpath.JXPathContext;
 import org.apache.kato.katoview.Output;
@@ -54,7 +54,7 @@
 	public void doCommand(Stack args, Image loadedImage, HashMap properties) {
 		String path = "";				
 		
-		JavaRuntime runtime=null;
+		JVMRuntime runtime=null;
 		
 		if (args.size() == 0 || args.size() > 2) {
 			out.println(LONG_DESCRIPTION);
@@ -64,7 +64,7 @@
 			
 		} else if (args.size() == 2) {
 			if (args.get(1).equals("runtime")) {
-				JavaRuntime rt=getJavaRuntime(loadedImage);
+				JVMRuntime rt=getJavaRuntime(loadedImage);
 				if(rt==null) {
 					out.println("Unable to locate Java Runtime");
 					return;
@@ -115,7 +115,7 @@
 	 * 
 	 * @return
 	 */
-	private JavaRuntime getJavaRuntime(Image loadedImage) {
+	private JVMRuntime getJavaRuntime(Image loadedImage) {
 		
 		for(Object space:loadedImage.getAddressSpaces()) {
 			if(space instanceof  ImageAddressSpace ) {
@@ -123,7 +123,7 @@
 				ImageProcess process=addr.getCurrentProcess();
 				if(process!=null) {
 					for(Object rt:process.getRuntimes()) {
-						if(rt instanceof JavaRuntime) return (JavaRuntime) rt;
+						if(rt instanceof JVMRuntime) return (JVMRuntime) rt;
 					}
 				}
 				

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/ClassOutput.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/ClassOutput.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/ClassOutput.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/ClassOutput.java Wed Oct 21 10:29:55 2009
@@ -21,11 +21,11 @@
 import javax.tools.diagnostics.image.CorruptDataException;
 import javax.tools.diagnostics.image.ImageSection;
 import javax.tools.diagnostics.image.MemoryAccessException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
-import javax.tools.diagnostics.runtime.java.JavaField;
-import javax.tools.diagnostics.runtime.java.JavaMethod;
-import javax.tools.diagnostics.runtime.java.JavaObject;
-import javax.tools.diagnostics.runtime.java.JavaRuntime;
+import javax.tools.diagnostics.runtime.java.JVMClass;
+import javax.tools.diagnostics.runtime.java.JVMField;
+import javax.tools.diagnostics.runtime.java.JVMMethod;
+import javax.tools.diagnostics.runtime.java.JVMObject;
+import javax.tools.diagnostics.runtime.java.JVMRuntime;
 
 import org.apache.kato.katoview.Output;
 
@@ -33,7 +33,7 @@
 
 public class ClassOutput {
 
-	public static void printStaticFields(JavaClass jc, Output out)
+	public static void printStaticFields(JVMClass jc, Output out)
 	{
 		// if the class name refers to an array, return because there are no fields
 		try {
@@ -56,7 +56,7 @@
 		Iterator itField = jc.getDeclaredFields().iterator();
 		while (itField.hasNext())
 		{
-			JavaField jf = (JavaField)itField.next();
+			JVMField jf = (JVMField)itField.next();
 			boolean isStatic;
 			
 			try {
@@ -88,7 +88,7 @@
 			out.print("\t  \"" + className + "\" has no static fields\n\n");
 	}
 
-	public static void printNonStaticFields(JavaClass jc, Output out)
+	public static void printNonStaticFields(JVMClass jc, Output out)
 	{
 		// if the class name refers to an array, return because there are no fields
 		try {
@@ -111,7 +111,7 @@
 		Iterator itField = jc.getDeclaredFields().iterator();
 		while (itField.hasNext())
 		{
-			JavaField jf = (JavaField)itField.next();
+			JVMField jf = (JVMField)itField.next();
 			boolean isStatic;
 			
 			try {
@@ -143,7 +143,7 @@
 			out.print("\t  \"" + className + "\" has no non-static fields\n\n");
 	}
 	
-	public static void printFields(JavaObject jo, JavaClass jc, JavaRuntime jr, Output out)
+	public static void printFields(JVMObject jo, JVMClass jc, JVMRuntime jr, Output out)
 	{
 		boolean array;
 		
@@ -196,7 +196,7 @@
 			} else if (componentType.equals("double")) {
 				dst = new double[arraySize];
 			} else {
-				dst = new JavaObject[arraySize];
+				dst = new JVMObject[arraySize];
 			}
 			
 			try {
@@ -231,7 +231,7 @@
 				} else if (componentType.equals("double")) {
 					out.print(Utils.getVal(new Double(((double[])dst)[i])));
 				} else {
-					out.print(Utils.getVal(((JavaObject[])dst)[i]));
+					out.print(Utils.getVal(((JVMObject[])dst)[i]));
 				}
 				out.print("\n");
 			}
@@ -239,7 +239,7 @@
 		else
 		{	
 			
-			JavaClass initialJC = jc;
+			JVMClass initialJC = jc;
 			List classList = new ArrayList(); 
 			while (jc != null){
 				
@@ -252,7 +252,7 @@
 			}
 			for (int i = (classList.size()-1); i >=0 ; i--){
 				
-				jc = (JavaClass)classList.get(i);
+				jc = (JVMClass)classList.get(i);
 				Iterator itField = jc.getDeclaredFields().iterator();
 				
 				if (itField.hasNext()){
@@ -270,7 +270,7 @@
 				
 				while (itField.hasNext())
 				{
-					JavaField jf = (JavaField)itField.next();
+					JVMField jf = (JVMField)itField.next();
 					boolean isStatic;
 					
 					try {
@@ -296,17 +296,17 @@
 		out.print("\n");
 	}
 	
-	private static void printStaticFieldData(JavaField jf, Output out)
+	private static void printStaticFieldData(JVMField jf, Output out)
 	{
 		printFieldData(null, jf, out, true);
 	}
 	
-	private static void printNonStaticFieldData(JavaObject jo, JavaField jf, Output out)
+	private static void printNonStaticFieldData(JVMObject jo, JVMField jf, Output out)
 	{
 		printFieldData(jo, jf, out, false);
 	}
 	
-	private static void printFieldData(JavaObject jo, JavaField jf, Output out, boolean isStatic)
+	private static void printFieldData(JVMObject jo, JVMField jf, Output out, boolean isStatic)
 	{
 		String signature;
 		
@@ -352,7 +352,7 @@
 	public static void printMethods(Iterator methods, Output out)
 	{
 		while(methods.hasNext()) {
-			JavaMethod jMethod = (JavaMethod)methods.next();
+			JVMMethod jMethod = (JVMMethod)methods.next();
 			try{
 				out.print("Bytecode range(s): ");
 				Iterator imageSections = jMethod.getBytecodeSections().iterator();

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaClassVisitor.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaClassVisitor.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaClassVisitor.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaClassVisitor.java Wed Oct 21 10:29:55 2009
@@ -14,7 +14,7 @@
 package org.apache.kato.katoview.commands.helpers;
 
 import javax.tools.diagnostics.image.DiagnosticException;
-import javax.tools.diagnostics.runtime.java.JavaClass;
+import javax.tools.diagnostics.runtime.java.JVMClass;
 
 /**
  * Interface for visiting classes.
@@ -28,5 +28,5 @@
 	 * @return false if visitor is to exit.
 	 * @throws DiagnosticException
 	 */
-	public boolean visit(JavaClass clazz) throws DiagnosticException;
+	public boolean visit(JVMClass clazz) throws DiagnosticException;
 }

Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaObjectVisitor.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaObjectVisitor.java?rev=827952&r1=827951&r2=827952&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaObjectVisitor.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/JavaObjectVisitor.java Wed Oct 21 10:29:55 2009
@@ -14,7 +14,7 @@
 package org.apache.kato.katoview.commands.helpers;
 
 import javax.tools.diagnostics.image.DiagnosticException;
-import javax.tools.diagnostics.runtime.java.JavaObject;
+import javax.tools.diagnostics.runtime.java.JVMObject;
 
 /**
  * Used to visit objects.
@@ -30,5 +30,5 @@
 	 * @return false if visiting is to stop
 	 * @throws DiagnosticException
 	 */
-	public boolean visit(JavaObject object) throws DiagnosticException;
+	public boolean visit(JVMObject object) throws DiagnosticException;
 }



Mime
View raw message