You are viewing a plain text version of this content. The canonical link for it is here.
Posted to kato-commits@incubator.apache.org by sp...@apache.org on 2009/10/21 15:05:55 UTC
svn commit: r828041 - in
/incubator/kato/branches/experimental/thirdview/org.apache.kato: ./
.settings/ kato.anttasks/.settings/ kato.api.vm/.settings/
kato.api/src/main/java/javax/tools/diagnostics/
kato.api/src/main/java/javax/tools/diagnostics/image...
Author: spoole
Date: Wed Oct 21 15:05:52 2009
New Revision: 828041
URL: http://svn.apache.org/viewvc?rev=828041&view=rev
Log:
implemented removing lists from image impl and replaced with queryresults
Added:
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/QueryResult.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/src/main/java/org/apache/kato/common/ListBackedQueryResult.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.classpath
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.project
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/pom.xml
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/DatabaseStore.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassLoaderImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaInstanceImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/resources/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/test/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/test/java/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/test/resources/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/target/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/target/test-classes/
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.classpath
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.project
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.classpath
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.project
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.classpath
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.project
Modified:
incubator/kato/branches/experimental/thirdview/org.apache.kato/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.anttasks/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api.vm/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/Image.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/pom.xml
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/pom.xml
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.demo.tomcat/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.distro/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.docs/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageProcessImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/image/TestImage.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.reader/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/linux-x86/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/win32/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/tests/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.harness/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/pom.xml
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/process/image/TestImageGetIPAddresses.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/AbstractDTFJTestcase.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageTest.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/.settings/org.eclipse.jdt.core.prefs
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/Session.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/KatoSearch.java
incubator/kato/branches/experimental/thirdview/org.apache.kato/pom.xml
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sat May 23 12:46:07 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.anttasks/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.anttasks/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.anttasks/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.anttasks/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Tue Jun 16 16:47:54 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api.vm/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api.vm/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api.vm/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api.vm/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Thu May 28 16:30:48 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/QueryResult.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/QueryResult.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/QueryResult.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/QueryResult.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,66 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package javax.tools.diagnostics;
+
+import java.io.IOException;
+
+/**
+ * This interface defines the contract for accessing the contents
+ * of a query. QueryResult is a common entity with the API. It is
+ * used in places where traditionally classes in the java.util.collections
+ * package would have been used.
+ *
+ * It is important to understand that the user of this interface
+ * is expected to call {@see #dispose()} of it when no longer used.
+ *
+ * In many cases a QueryResult will be backed by resources of a limited
+ * type. Not releasing the QueryResult when finished will likely
+ * result in some sort of out of memory error.
+ *
+ *
+ * @param <T>
+ */
+public interface QueryResult<T> extends Iterable<T>{
+
+ /**
+ * Dispose of this query result. Calling this method
+ * indicates the the implementor that the QueryResult instance
+ * is no longer required and any held resources can be released.
+ *
+ *
+ * @throws IOException
+ */
+ public void dispose() throws IOException;
+
+ /**
+ * Returns the total number of entities within this query
+ * result.
+ *
+ * @return number of entries
+ * @throws IOException
+ */
+ public long size() throws IOException;
+
+ /**
+ * Returns the element at the location presented.
+ *
+ * @param element
+ * @return
+ * @throws IndexOutOfBoundsException if an in valid element no presented
+ */
+ T get(long element) throws IOException,IndexOutOfBoundsException;
+
+ public boolean isEmpty();
+}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/Image.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/Image.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/Image.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/Image.java Wed Oct 21 15:05:52 2009
@@ -15,8 +15,8 @@
import java.io.File;
import java.net.InetAddress;
-import java.util.Iterator;
-import java.util.List;
+
+import javax.tools.diagnostics.QueryResult;
/**
* This class represents an entire operating system image (e.g. a core file).
@@ -32,12 +32,12 @@
/**
* Get the set of address spaces within the image - typically one but may be more on some
* systems such as Z/OS.
- * @return an Iterator which iterates over all of the address spaces
+ * @return an QueryResult which provides access to all of the address spaces
* described by this Image
*
* @see ImageAddressSpace
*/
- List<ImageAddressSpace> getAddressSpaces();
+ QueryResult<ImageAddressSpace> getAddressSpaces();
/**
* Get the family name for the processor on which the image was
@@ -125,7 +125,7 @@
/**
* The set of IP addresses (as InetAddresses) which the system running the image possessed.
- * @return An Iterator over the IP addresses (as InetAddresses) which the system running
+ * @return An QueryResult of all the IP addresses (as InetAddresses) which the system running
* the image possessed. The iterator will be non-null (but can be empty if the host is
* known to have no IP addresses).
*
@@ -136,7 +136,7 @@
*
* @see java.net.InetAddress
*/
- public Iterator<InetAddress> getIPAddresses() throws DataUnavailable;
+ public QueryResult<InetAddress> getIPAddresses() throws DataUnavailable;
/**
* Experimenal
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.api/src/test/java/test/apache/kato/TestFactoryRegistry.java Wed Oct 21 15:05:52 2009
@@ -15,13 +15,15 @@
import java.io.File;
import java.io.IOException;
-import java.util.Iterator;
+import java.net.InetAddress;
import java.util.List;
import javax.tools.diagnostics.FactoryRegistry;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
+import javax.tools.diagnostics.image.ImageAddressSpace;
import javax.tools.diagnostics.image.ImageFactory;
import javax.tools.diagnostics.image.ImagePointer;
import javax.tools.diagnostics.image.MemoryAccessException;
@@ -170,7 +172,7 @@
}
private final class MockImage implements Image {
- public List getAddressSpaces() {
+ public QueryResult<ImageAddressSpace> getAddressSpaces() {
return null;
}
@@ -186,7 +188,7 @@
return null;
}
- public Iterator getIPAddresses() throws DataUnavailable {
+ public QueryResult<InetAddress> getIPAddresses() throws DataUnavailable {
return null;
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,12 +1,12 @@
-#Fri Aug 21 11:56:18 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.source=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/pom.xml?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/pom.xml (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/pom.xml Wed Oct 21 15:05:52 2009
@@ -15,6 +15,11 @@
<artifactId>kato.api</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.kato</groupId>
+ <artifactId>kato.common</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java Wed Oct 21 15:05:52 2009
@@ -17,11 +17,11 @@
import java.io.File;
import java.io.IOException;
import java.net.InetAddress;
-import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
@@ -33,6 +33,7 @@
import javax.tools.diagnostics.image.ImageThread;
import javax.tools.diagnostics.runtime.ManagedRuntime;
+import org.apache.kato.common.ListBackedQueryResult;
import org.apache.kato.jvmti.javaruntime.JavaRuntimeImpl;
import org.apache.kato.jvmti.javaruntime.model.EmptyList;
import org.apache.kato.jvmti.javaruntime.model.SimpleImagePointer;
@@ -153,8 +154,8 @@
}
@Override
- public List<ImageAddressSpace> getAddressSpaces() {
- return spaces;
+ public QueryResult<ImageAddressSpace> getAddressSpaces() {
+ return new ListBackedQueryResult<ImageAddressSpace>(spaces);
}
@Override
@@ -168,7 +169,7 @@
}
@Override
- public Iterator<InetAddress> getIPAddresses() throws DataUnavailable {
+ public QueryResult<InetAddress> getIPAddresses() throws DataUnavailable {
throw new DataUnavailable();
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Fri Jul 24 10:55:02 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/pom.xml?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/pom.xml (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/pom.xml Wed Oct 21 15:05:52 2009
@@ -10,4 +10,11 @@
<name>Common routines</name>
<version>0.0.1-SNAPSHOT</version>
<description>Support code etc that is dump agnostic </description>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kato</groupId>
+ <artifactId>kato.api</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/src/main/java/org/apache/kato/common/ListBackedQueryResult.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/src/main/java/org/apache/kato/common/ListBackedQueryResult.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/src/main/java/org/apache/kato/common/ListBackedQueryResult.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.common/src/main/java/org/apache/kato/common/ListBackedQueryResult.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,63 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+package org.apache.kato.common;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.tools.diagnostics.QueryResult;
+
+
+public class ListBackedQueryResult<T> implements QueryResult<T>{
+
+ private List<T> list=null;
+
+ public ListBackedQueryResult(List<T> list) {
+ if(list==null) throw new IllegalArgumentException("list is null");
+ this.list=list;
+ }
+ @Override
+ public void dispose() throws IOException {
+ list=null;
+
+ }
+
+ @Override
+ public T get(long element) throws IOException,
+ IndexOutOfBoundsException {
+
+ return list.get((int) element);
+
+ }
+
+ @Override
+ public long size() throws IOException {
+ return list.size();
+ }
+
+ @Override
+ public Iterator<T> iterator() {
+
+ return list.iterator();
+ }
+ /* (non-Javadoc)
+ * @see javax.tools.diagnostics.QueryResult#isEmpty()
+ */
+ @Override
+ public boolean isEmpty() {
+ return list.isEmpty();
+ }
+
+}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.demo.tomcat/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.demo.tomcat/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.demo.tomcat/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.demo.tomcat/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Thu May 28 16:37:38 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.distro/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.distro/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.distro/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.distro/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Fri Sep 18 08:19:59 BST 2009
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.docs/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.docs/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.docs/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.docs/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Thu Jul 16 08:21:03 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sat May 23 12:55:11 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageImpl.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageImpl.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageImpl.java Wed Oct 21 15:05:52 2009
@@ -14,14 +14,17 @@
package org.apache.kato.hprof.image;
import java.io.File;
-import java.util.Iterator;
+import java.net.InetAddress;
import java.util.LinkedList;
import java.util.List;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
+import javax.tools.diagnostics.image.ImageAddressSpace;
+import org.apache.kato.common.ListBackedQueryResult;
import org.apache.kato.hprof.datalayer.HProfFile;
public class ImageImpl implements Image {
@@ -35,8 +38,8 @@
addressSpaces.add(new ImageAddressSpaceImpl(this));
}
@Override
- public List getAddressSpaces() {
- return addressSpaces;
+ public QueryResult<ImageAddressSpace> getAddressSpaces() {
+ return new ListBackedQueryResult<ImageAddressSpace>( addressSpaces);
}
@Override
@@ -54,7 +57,7 @@
}
@Override
- public Iterator getIPAddresses() throws DataUnavailable {
+ public QueryResult<InetAddress> getIPAddresses() throws DataUnavailable {
throw new DataUnavailable();
}
@@ -95,5 +98,9 @@
public File getSource() {
return file.getSource();
}
+
+ public ImageAddressSpace getDefaultAddressSpace() {
+ return (ImageAddressSpace) addressSpaces.get(0);
+ }
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageProcessImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageProcessImpl.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageProcessImpl.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/main/java/org/apache/kato/hprof/image/ImageProcessImpl.java Wed Oct 21 15:05:52 2009
@@ -100,7 +100,8 @@
public List getRuntimes() {
if(javaRuntime==null) {
- javaRuntime=new JavaRuntimeImpl(this.view, (ImageAddressSpace) imageImpl.getAddressSpaces().get(0));
+
+ javaRuntime=new JavaRuntimeImpl(this.view, imageImpl.getDefaultAddressSpace());
}
List list=new LinkedList();
list.add(javaRuntime);
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/image/TestImage.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/image/TestImage.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/image/TestImage.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.api/src/test/java/test/apache/kato/hprof/image/TestImage.java Wed Oct 21 15:05:52 2009
@@ -18,6 +18,7 @@
import java.util.Iterator;
import java.util.List;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
@@ -128,8 +129,9 @@
public void testGetAddressSpaceIterator() throws IOException {
Image minimal=getMinimalImage();
- List i=minimal.getAddressSpaces();
- assertNotNull(i);
+ QueryResult<ImageAddressSpace> query=minimal.getAddressSpaces();
+ assertNotNull(query);
+ query.dispose();
}
public void testGetNonEmptyAddressSpaceIterator() throws IOException {
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.reader/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.reader/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.reader/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.hprof.reader/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sun May 24 11:52:38 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.classpath
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.classpath?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.classpath (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.classpath Wed Oct 21 15:05:52 2009
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.project
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.project?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.project (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/.project Wed Oct 21 15:05:52 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>kato.java.db</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/pom.xml?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/pom.xml (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/pom.xml Wed Oct 21 15:05:52 2009
@@ -0,0 +1,20 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <parent>
+ <artifactId>kato</artifactId>
+ <groupId>org.apache.kato</groupId>
+ <version>0.0.1-SNAPSHOT</version>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.kato</groupId>
+ <artifactId>kato.java.db</artifactId>
+ <name>Java language view implementation </name>
+ <version>0.0.1-SNAPSHOT</version>
+ <description>Java language view implementation backed by a jdbc database</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.kato</groupId>
+ <artifactId>kato.api</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/DatabaseStore.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/DatabaseStore.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/DatabaseStore.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/DatabaseStore.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,48 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package org.apache.kato.java.language.impl;
+
+import java.io.IOException;
+
+import javax.tools.diagnostics.QueryResult;
+
+/**
+ * This interface defines the methods that the view builder will use
+ * to construct a persistent view.
+ *
+ */
+public interface DatabaseStore {
+
+public void open() throws IOException;
+
+ void addJavaClassLoader(JavaClassLoaderImpl classloaderimpl);
+
+
+
+ void addJavaClass(JavaClassImpl classimpl);
+
+ JavaClassImpl getJavaClass(long classid);
+
+ void addJavaInstance(JavaInstanceImpl instanceimpl);
+
+ JavaClassLoaderImpl getJavaClassLoader(long loader);
+
+ public void close() throws IOException;
+
+ public QueryResult<JavaClassImpl> getAllClasses() throws IOException;
+
+ public void addClassLoaderRelationship(JavaClassLoaderImpl parent,
+ JavaClassLoaderImpl child);
+}
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassImpl.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassImpl.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassImpl.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package org.apache.kato.java.language.impl;
+
+/**
+ *
+ */
+public class JavaClassImpl {
+
+}
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassLoaderImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassLoaderImpl.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassLoaderImpl.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaClassLoaderImpl.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package org.apache.kato.java.language.impl;
+
+/**
+ *
+ */
+public class JavaClassLoaderImpl {
+
+}
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaInstanceImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaInstanceImpl.java?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaInstanceImpl.java (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.java.db/src/main/java/org/apache/kato/java/language/impl/JavaInstanceImpl.java Wed Oct 21 15:05:52 2009
@@ -0,0 +1,22 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package org.apache.kato.java.language.impl;
+
+/**
+ *
+ */
+public class JavaInstanceImpl {
+
+}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sun May 24 07:16:58 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jdi/src/main/java/org/apache/kato/tools/jdi/KatoReader.java Wed Oct 21 15:05:52 2009
@@ -22,9 +22,9 @@
import java.util.Iterator;
import java.util.List;
import java.util.Vector;
-import java.util.logging.Level;
import javax.tools.diagnostics.FactoryRegistry;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptData;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
@@ -456,11 +456,9 @@
logr.log(JDILogger.LEVEL_VERBOSE, " System Subtype: " + image.getSystemSubType()); //$NON-NLS-1$
}catch(Exception exxy){}
try{
- Iterator itr = image.getIPAddresses();
- while (itr.hasNext()){
- InetAddress addr = (InetAddress)itr.next();
+ QueryResult<InetAddress> addresses=image.getIPAddresses();
+ for(InetAddress addr:addresses) {
logr.log(JDILogger.LEVEL_VERBOSE, "IP: " + addr.toString()); //$NON-NLS-1$
-
}
}catch(Exception exxy){}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sat May 23 12:55:11 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.jvmti/src/main/java/org/apache/kato/jvmti/process/ImageImpl.java Wed Oct 21 15:05:52 2009
@@ -16,11 +16,12 @@
import java.io.File;
import java.io.IOException;
-import java.util.Iterator;
+import java.net.InetAddress;
import java.util.LinkedList;
import java.util.List;
import java.util.Properties;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
@@ -32,6 +33,7 @@
import javax.tools.diagnostics.runtime.ManagedRuntime;
import javax.xml.parsers.ParserConfigurationException;
+import org.apache.kato.common.ListBackedQueryResult;
import org.apache.kato.jvmti.javaruntime.JavaRuntimeImpl;
import org.apache.kato.jvmti.reader.BinReader;
import org.apache.kato.jvmti.reader.XMLReader;
@@ -179,12 +181,12 @@
this.file=base;
}
@Override
- public List getAddressSpaces() {
+ public QueryResult<ImageAddressSpace> getAddressSpaces() {
if(spaces==null) {
spaces=new LinkedList<ImageAddressSpace>();
spaces.add(new ImageAddressSpaceImpl());
}
- return spaces;
+ return new ListBackedQueryResult<ImageAddressSpace>(spaces);
}
@@ -199,7 +201,7 @@
}
@Override
- public Iterator getIPAddresses() throws DataUnavailable {
+ public QueryResult<InetAddress> getIPAddresses() throws DataUnavailable {
throw new DataUnavailable();
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Mon Sep 07 09:19:50 BST 2009
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.source=1.6
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Wed Oct 21 08:38:55 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.3
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/linux-x86/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/linux-x86/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/linux-x86/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/linux-x86/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Thu Sep 24 21:26:51 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.3
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/win32/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/win32/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/win32/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.cjvmti/win32/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Thu Sep 24 21:26:42 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
-org.eclipse.jdt.core.compiler.compliance=1.4
-org.eclipse.jdt.core.compiler.source=1.3
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.2
+org.eclipse.jdt.core.compiler.compliance=1.4
+org.eclipse.jdt.core.compiler.source=1.3
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Mon Sep 28 11:00:47 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.classpath
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.classpath?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.classpath (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.classpath Wed Oct 21 15:05:52 2009
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.project
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.project?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.project (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/javah/.project Wed Oct 21 15:05:52 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>javah</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.classpath
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.classpath?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.classpath (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.classpath Wed Oct 21 15:05:52 2009
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.project
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.project?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.project (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/linux-x86/.project Wed Oct 21 15:05:52 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>libkatovmapi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/tests/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/tests/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/tests/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/tests/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Mon Sep 28 15:32:54 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.classpath
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.classpath?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.classpath (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.classpath Wed Oct 21 15:05:52 2009
@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.project
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.project?rev=828041&view=auto
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.project (added)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.native/kato.native.vmapi/win32/.project Wed Oct 21 15:05:52 2009
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>katovmapi</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.harness/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.harness/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.harness/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.harness/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Tue Jun 16 16:30:29 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,5 +1,5 @@
-#Fri Jul 10 07:20:20 BST 2009
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.source=1.6
+#Wed Oct 21 13:13:44 BST 2009
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
+org.eclipse.jdt.core.compiler.compliance=1.6
+org.eclipse.jdt.core.compiler.source=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/pom.xml?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/pom.xml (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/pom.xml Wed Oct 21 15:05:52 2009
@@ -18,6 +18,12 @@
<scope>compile</scope>
</dependency>
<dependency>
+ <groupId>org.apache.kato</groupId>
+ <artifactId>kato.api</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+
+ </dependency>
+ <dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/process/image/TestImageGetIPAddresses.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/process/image/TestImageGetIPAddresses.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/process/image/TestImageGetIPAddresses.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tck/tests/process/image/TestImageGetIPAddresses.java Wed Oct 21 15:05:52 2009
@@ -13,41 +13,29 @@
******************************************************************************/
package org.apache.kato.tck.tests.process.image;
-import java.util.Iterator;
+import java.net.InetAddress;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptData;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
+
import org.apache.kato.tck.harness.TCKProcessTestcase;
public class TestImageGetIPAddresses extends TCKProcessTestcase{
/**
+ * @throws DataUnavailable
*
*/
- public void testGetIPAddresses() {
+ public void testGetIPAddresses() throws DataUnavailable {
Image image=getImage();
- Iterator IPAdresses;
- try {
- IPAdresses = image.getIPAddresses();
- while (IPAdresses.hasNext()) {
- Object nextIPAddress = IPAdresses.next();
- if (nextIPAddress instanceof CorruptData) {
- System.err.println("returned CorruptData `" + nextIPAddress + "'");
- break;
- }
- else
- {
- return;
- }
- }
-
- } catch (DataUnavailable e) {
- //this is acceptable
- return;
+ QueryResult<InetAddress> addresses=image.getIPAddresses();
+ for(InetAddress address:addresses) {
+ assertNotNull(address);
}
- assertTrue(false);
+
}
}
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=828041&r1=828040&r2=828041&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 15:05:52 2009
@@ -13,9 +13,11 @@
******************************************************************************/
package org.apache.kato.tests.junit;
+import java.io.IOException;
import java.util.Iterator;
import java.util.List;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptData;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
@@ -49,8 +51,22 @@
public ImageAddressSpace defaultAddressSpace() {
Image image = defaultTestingImage();
+ QueryResult<ImageAddressSpace> spaces=image.getAddressSpaces();
+ try {
+ ImageAddressSpace first=spaces.get(0);
+ spaces.dispose();
+ return first;
+ } catch (IndexOutOfBoundsException e) {
+
+ e.printStackTrace();
+ } catch (IOException e) {
+
+ e.printStackTrace();
+ }
+
+
//TODO: come up with a good way to test each address space. For now we will just grab the first one
- return (ImageAddressSpace) image.getAddressSpaces().get(0);
+ return null;
}
/**
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageTest.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/ImageTest.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageTest.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tck.testsuite/src/main/java/org/apache/kato/tests/junit/ImageTest.java Wed Oct 21 15:05:52 2009
@@ -13,13 +13,17 @@
******************************************************************************/
package org.apache.kato.tests.junit;
+import java.io.IOException;
+import java.net.InetAddress;
import java.util.Iterator;
import java.util.List;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptData;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
import javax.tools.diagnostics.image.Image;
+import javax.tools.diagnostics.image.ImageAddressSpace;
/**
@@ -47,12 +51,14 @@
/**
* ensure that the core has non-null address spaces and at least one
+ * @throws IOException
*/
- public void testGetAddressSpaces() {
- List it = _core.getAddressSpaces();
+ public void testGetAddressSpaces() throws IOException {
- assertNotNull(it);
- assertFalse(it.isEmpty());
+ QueryResult<ImageAddressSpace> spaces= _core.getAddressSpaces();
+ assertNotNull(spaces);
+ assertFalse(spaces.isEmpty());
+ spaces.dispose();
}
/**
@@ -182,22 +188,15 @@
/**
* Ensures that the iterator is non-null, throws no expected exceptions, and every member is an InetAddress
+ * @throws DataUnavailable
+ * @throws IOException
*/
- public void testGetIPAddresses()
+ public void testGetIPAddresses() throws DataUnavailable, IOException
{
- try {
- Iterator addresses = _core.getIPAddresses();
+
+ QueryResult<InetAddress> addq=_core.getIPAddresses();
+ Iterator addresses =addq.iterator();
assertNotNull(addresses);
- while (addresses.hasNext()) {
- Object address = addresses.next();
- assertTrue((address instanceof java.net.InetAddress)
- || (address instanceof CorruptData));
- }
- } catch (DataUnavailable e) {
- //this exception is supported by the API so it is ok
- } catch (Throwable t) {
- //exception fall-through
- fail();
- }
+ addq.dispose();
}
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/.settings/org.eclipse.jdt.core.prefs
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/.settings/org.eclipse.jdt.core.prefs?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/.settings/org.eclipse.jdt.core.prefs (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/.settings/org.eclipse.jdt.core.prefs Wed Oct 21 15:05:52 2009
@@ -1,4 +1,4 @@
-#Sat May 23 14:04:00 BST 2009
+#Wed Oct 21 13:13:44 BST 2009
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.compliance=1.6
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/Session.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/Session.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/Session.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/Session.java Wed Oct 21 15:05:52 2009
@@ -21,6 +21,7 @@
import java.util.Stack;
import javax.tools.diagnostics.FactoryRegistry;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.Image;
import javax.tools.diagnostics.image.ImageAddressSpace;
import javax.tools.diagnostics.image.ImageFactory;
@@ -142,10 +143,9 @@
// really know if multiple address spaces can actually exist in a given core
// file, but this capability is put in here just in case they can.
+ ImageAddressSpace space1= getFirstSpace(loadedImage);
variables.put(
- "current_address_space",
- (ImageAddressSpace)loadedImage.getAddressSpaces().get(0)
- );
+ "current_address_space",space1);
out.println("For a list of commands, type \"help\"; " +
"for how to use \"help\", type \"help help\"");
@@ -188,4 +188,27 @@
out.close();
}
+
+ /**
+ * @param loadedImage2
+ * @return
+ */
+ private ImageAddressSpace getFirstSpace(Image loadedImage) {
+
+ QueryResult<ImageAddressSpace> results=loadedImage.getAddressSpaces();
+ ImageAddressSpace space;
+ try {
+ space = results.get(0);
+ results.dispose();
+ return space;
+ } catch (IndexOutOfBoundsException e) {
+
+ e.printStackTrace();
+ } catch (IOException e) {
+
+ e.printStackTrace();
+ }
+ return null;
+
+ }
}
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/KatoSearch.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/KatoSearch.java?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/KatoSearch.java (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/kato.tools.katoview/src/main/java/org/apache/kato/katoview/commands/helpers/KatoSearch.java Wed Oct 21 15:05:52 2009
@@ -13,10 +13,12 @@
******************************************************************************/
package org.apache.kato.katoview.commands.helpers;
+import java.io.IOException;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import javax.tools.diagnostics.QueryResult;
import javax.tools.diagnostics.image.CorruptData;
import javax.tools.diagnostics.image.CorruptDataException;
import javax.tools.diagnostics.image.DataUnavailable;
@@ -49,12 +51,9 @@
* @param visitor
*/
public static void visitRuntimes(Image image, JavaRuntimeVisitor visitor) throws DiagnosticException {
- List spaces = image.getAddressSpaces();
+ QueryResult<ImageAddressSpace> spaces = image.getAddressSpaces();
- for(Object nextSpace : spaces) {
- if(nextSpace instanceof CorruptData) {
- continue;
- }
+ for(ImageAddressSpace nextSpace : spaces) {
ImageAddressSpace space = (ImageAddressSpace) nextSpace;
@@ -84,6 +83,12 @@
}
}
}
+ try {
+ spaces.dispose();
+ } catch (IOException e) {
+
+ e.printStackTrace();
+ }
}
/**
Modified: incubator/kato/branches/experimental/thirdview/org.apache.kato/pom.xml
URL: http://svn.apache.org/viewvc/incubator/kato/branches/experimental/thirdview/org.apache.kato/pom.xml?rev=828041&r1=828040&r2=828041&view=diff
==============================================================================
--- incubator/kato/branches/experimental/thirdview/org.apache.kato/pom.xml (original)
+++ incubator/kato/branches/experimental/thirdview/org.apache.kato/pom.xml Wed Oct 21 15:05:52 2009
@@ -24,6 +24,7 @@
<module>kato.cjvmti</module>
<module>kato.native</module>
<module>kato.distro</module>
+ <module>kato.java.db</module>
</modules>
<build>